Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Maria Agustina
/
tpv_correcciones
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit ab7b23fa
authored
2021-09-19 12:13:12 -0300
by
root
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
onfly
1 parent
6b720b66
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
__manifest__.py
views/comprobante.xml
views/menu_compras.xml
wizard/generar_nota.py
__manifest__.py
View file @
ab7b23f
...
...
@@ -30,7 +30,7 @@
'asw_tpv'
,
'asw_afipws_fe'
,
'asw_tpv_impuestos'
,
'asw_cajas'
,
#
'asw_cajas',
],
# always loaded
...
...
@@ -50,4 +50,4 @@
'demo'
:
[
'demo/demo.xml'
,
],
}
\ No newline at end of file
}
views/comprobante.xml
View file @
ab7b23f
...
...
@@ -9,7 +9,7 @@
<xpath
expr=
"//button[@name='validar']"
position=
"before"
>
<button
name=
"abrir_wizard_ppf"
class=
'btn btn-success'
string=
"+ Producto por precio final"
type=
"object"
attrs=
"{'invisible':[('comp_estado','!=','b')]}"
/>
<button
name=
"recalcularTotal"
class=
'btn btn-warning'
string=
"Recalcular Monto"
type=
"object"
attrs=
"{'invisible':[('comp_estado','!=','b')]}"
/>
<button
name=
"generarNota"
class=
'btn btn-
info'
string=
"Generar Nota"
type=
"object"
attrs=
"{'invisible':[('comp_estado','in',['b','a
'])]}"
/>
<button
name=
"generarNota"
class=
'btn btn-
success'
string=
"Generar Nota"
type=
"object"
attrs=
"{'invisible':[('comp_estado','in',['b','c','r
'])]}"
/>
</xpath>
<xpath
expr=
"//group[1]"
position=
"after"
>
<group
string=
"Referencias"
col=
"2"
>
...
...
@@ -33,7 +33,7 @@
<button
name=
"recalcularTotal"
class=
'btn btn-warning'
string=
"Recalcular Monto"
type=
"object"
attrs=
"{'invisible':[('comp_estado','!=','b')]}"
/>
<button
name=
"impresion_directa"
class=
'btn btn-info'
string=
"Impresion directa"
type=
"object"
attrs=
"{'invisible':[('comp_estado','=','b')]}"
/>
<button
name=
"abrir_wizard_cn"
type=
"object"
class=
"btn btn-info"
string=
"Corregir núm. AFIP"
/>
>
<button
name=
"generarNota"
class=
'btn btn-
info'
string=
"Generar Nota"
type=
"object"
attrs=
"{'invisible':[('comp_estado','in',['b','a
'])]}"
/>
<button
name=
"generarNota"
class=
'btn btn-
success'
string=
"Generar Nota"
type=
"object"
attrs=
"{'invisible':[('comp_estado','in',['b','c','r
'])]}"
/>
</xpath>
</data>
...
...
@@ -77,4 +77,4 @@
</record>
</data>
</odoo>
\ No newline at end of file
</odoo>
views/menu_compras.xml
View file @
ab7b23f
...
...
@@ -2,6 +2,6 @@
<data>
<menuitem
name=
"Referencias"
sequence=
"90"
id=
"asw_tpv_compras_referencias"
parent=
"asw_tpv.asw_tpv_compras"
/>
<menuitem
name=
"Referencias de Compras"
id=
"asw_tpv_compras_referencias_refcompras"
parent=
"asw_tpv_compras_referencias"
action=
"hgt_refcompra_list_action"
/>
<menuitem
name=
"Configuracion Mobil"
sequence=
"99"
id=
"asw_tpv_gasto_mobil_config"
parent=
"asw_tpv.asw_tpv_compras_gastos"
action=
"hgt_gastos_mobil_list_action"
groups=
"hgt_dispositivos.group_administrador_dispositivos"
/
>
<!-- <menuitem name="Configuracion Mobil" sequence="99" id="asw_tpv_gasto_mobil_config" parent="asw_tpv.asw_tpv_compras_gastos" action="hgt_gastos_mobil_list_action" groups="hgt_dispositivos.group_administrador_dispositivos"/> --
>
</data>
</odoo>
\ No newline at end of file
</odoo>
wizard/generar_nota.py
View file @
ab7b23f
...
...
@@ -17,7 +17,7 @@ class tpv_generar_nota(models.TransientModel):
comprobante
=
self
.
gn_comprobante
referencia
=
'Reintegro del comprobante : '
+
comprobante
.
comp_talonario
.
tal_codigo
+
"/"
+
comprobante
.
comp_nro_letras
talonario
=
self
.
env
[
'asw.talonario'
]
.
search
([(
'tal_pto_vta'
,
'='
,
comprobante
.
comp_talonario
.
tal_pto_vta
),(
'tal_letra'
,
'='
,
comprobante
.
comp_talonario
.
tal_letra
),(
'tal_codigo'
,
'
='
,
'NCRED'
)])
talonario
=
self
.
env
[
'asw.talonario'
]
.
search
([(
'tal_pto_vta'
,
'='
,
comprobante
.
comp_talonario
.
tal_pto_vta
),(
'tal_letra'
,
'='
,
comprobante
.
comp_talonario
.
tal_letra
),(
'tal_codigo'
,
'
in'
,[
'NCAN'
,
'NCBN'
]
)])
if
talonario
:
contra_comprobante
=
self
.
generar_comprobante
(
...
...
@@ -50,12 +50,12 @@ class tpv_generar_nota(models.TransientModel):
'lcp_importe'
:
comprobante
.
comp_total
,
})
contra_comprobante
.
validar
()
#
contra_comprobante.validar()
#se agrega al recibo original
comprobante
.
write
({
'comp_nota_credito'
:
contra_comprobante
.
id
})
#
comprobante.write({
#
'comp_nota_credito' : contra_comprobante.id
#
})
return
{
'name'
:
"Nota de Crédito"
,
...
...
@@ -73,7 +73,7 @@ class tpv_generar_nota(models.TransientModel):
comprobante
=
self
.
gn_comprobante
referencia
=
'Nota de débito del comprobante : '
+
comprobante
.
comp_talonario
.
tal_codigo
+
"/"
+
comprobante
.
comp_nro_letras
talonario
=
self
.
env
[
'asw.talonario'
]
.
search
([(
'tal_pto_vta'
,
'='
,
comprobante
.
comp_talonario
.
tal_pto_vta
),(
'tal_letra'
,
'='
,
comprobante
.
comp_talonario
.
tal_letra
),(
'tal_codigo'
,
'
='
,
'NDEB'
)])
talonario
=
self
.
env
[
'asw.talonario'
]
.
search
([(
'tal_pto_vta'
,
'='
,
comprobante
.
comp_talonario
.
tal_pto_vta
),(
'tal_letra'
,
'='
,
comprobante
.
comp_talonario
.
tal_letra
),(
'tal_codigo'
,
'
in'
,[
'NDAN'
,
'NDBN'
]
)])
if
talonario
:
contra_comprobante
=
self
.
generar_comprobante
(
...
...
@@ -118,4 +118,4 @@ class tpv_generar_nota(models.TransientModel):
'target'
:
'new'
,
}
else
:
raise
UserError
(
'No existe talonario para la Nota de Débito correspondiente. Créelo o diríjase a soporte para que lo haga, y vuelva a este menú'
)
\ No newline at end of file
raise
UserError
(
'No existe talonario para la Nota de Débito correspondiente. Créelo o diríjase a soporte para que lo haga, y vuelva a este menú'
)
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment