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 b64eba18
authored
2021-12-27 12:50:37 -0300
by
Juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
comienzo a agregar caja
1 parent
a119d1b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
10 deletions
__manifest__.py
wizard/cobro_discriminado.py
wizard/vista_cobro_discriminado.xml
__manifest__.py
View file @
b64eba1
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
'asw_tpv'
,
'asw_tpv'
,
'asw_afipws_fe'
,
'asw_afipws_fe'
,
'asw_tpv_impuestos'
,
'asw_tpv_impuestos'
,
#
'asw_cajas',
'asw_cajas'
,
],
],
# always loaded
# always loaded
...
...
wizard/cobro_discriminado.py
View file @
b64eba1
...
@@ -21,6 +21,11 @@ class hgt_cobro_multiple(models.TransientModel):
...
@@ -21,6 +21,11 @@ class hgt_cobro_multiple(models.TransientModel):
compute
=
'_compute_cliente'
,
compute
=
'_compute_cliente'
,
)
)
caja_efectivo
=
fields
.
Many2one
(
comodel_name
=
'asw.caja'
,
string
=
'Caja Efectivo'
,
)
nota
=
fields
.
Text
(
string
=
'nota'
,
readonly
=
True
)
nota
=
fields
.
Text
(
string
=
'nota'
,
readonly
=
True
)
pcw_referencia
=
fields
.
Char
(
pcw_referencia
=
fields
.
Char
(
...
@@ -67,6 +72,14 @@ class hgt_cobro_multiple(models.TransientModel):
...
@@ -67,6 +72,14 @@ class hgt_cobro_multiple(models.TransientModel):
string
=
'Cheques Emitidos'
string
=
'Cheques Emitidos'
)
)
pcw_chq_resiv2
=
fields
.
Many2many
(
comodel_name
=
'asw.cheque'
,
relation
=
'pago_cliente_chq_emitido_nuevo123'
,
column1
=
'asw_cheque_id'
,
column2
=
'asw_cliente_id'
,
string
=
'Cheques Emitidos'
)
pcw_transferencias_recibidas
=
fields
.
Many2many
(
pcw_transferencias_recibidas
=
fields
.
Many2many
(
comodel_name
=
'asw.valores'
,
comodel_name
=
'asw.valores'
,
relation
=
'pago_cliente_transferencia_recibida'
,
relation
=
'pago_cliente_transferencia_recibida'
,
...
@@ -132,7 +145,7 @@ class hgt_cobro_multiple(models.TransientModel):
...
@@ -132,7 +145,7 @@ class hgt_cobro_multiple(models.TransientModel):
Total
=
Total
+
factura
.
comp_adeudado
Total
=
Total
+
factura
.
comp_adeudado
Texto
=
f
"{Texto}
\n
{factura.display_name} {factura.comp_adeudado}"
Texto
=
f
"{Texto}
\n
{factura.display_name} {factura.comp_adeudado}"
if
not
len
(
idc
)
==
1
:
if
not
len
(
idc
)
==
1
:
raise
UserError
(
"Solo se puede cobrar a un cliente a la vez"
)
raise
UserError
(
"Solo se puede cobrar a un cliente a la vez
, cierre la ventana y seleccione de vuelta los comprobantes a operar
"
)
Texto
=
f
"{Texto}
\n
Total {Total}"
Texto
=
f
"{Texto}
\n
Total {Total}"
self
.
pcw_cliente
=
idc
[
0
]
self
.
pcw_cliente
=
idc
[
0
]
self
.
nota
=
Texto
self
.
nota
=
Texto
...
@@ -141,10 +154,10 @@ class hgt_cobro_multiple(models.TransientModel):
...
@@ -141,10 +154,10 @@ class hgt_cobro_multiple(models.TransientModel):
@api.depends
(
'pcw_efectivo'
,
'pcw_che_recibidos'
,
'pcw_transferencias_recibidas'
,
'pcw_tarjetas'
,
'pcw_chq_
emitidos
'
,
'pcw_transferencias_emitidas'
,
'pcw_retencion_recibida'
,
'pcw_retenciones'
)
@api.depends
(
'pcw_efectivo'
,
'pcw_che_recibidos'
,
'pcw_transferencias_recibidas'
,
'pcw_tarjetas'
,
'pcw_chq_
resiv2
'
,
'pcw_transferencias_emitidas'
,
'pcw_retencion_recibida'
,
'pcw_retenciones'
)
def
_calcular_total
(
self
):
def
_calcular_total
(
self
):
total
=
0
total
=
0
for
record
in
self
.
pcw_ch
e_recibidos
:
for
record
in
self
.
pcw_ch
q_resiv2
:
total
=
total
+
record
.
che_monto
total
=
total
+
record
.
che_monto
for
record
in
self
.
pcw_transferencias_recibidas
:
for
record
in
self
.
pcw_transferencias_recibidas
:
total
=
total
+
record
.
val_monto
total
=
total
+
record
.
val_monto
...
@@ -203,10 +216,10 @@ class hgt_cobro_multiple(models.TransientModel):
...
@@ -203,10 +216,10 @@ class hgt_cobro_multiple(models.TransientModel):
print
(
factura
.
id
,
factura
.
comp_adeudado
,
total
)
print
(
factura
.
id
,
factura
.
comp_adeudado
,
total
)
tmp
=
total
tmp
=
total
total
=
total
-
factura
.
comp_adeudado
total
=
total
-
factura
.
comp_adeudado
if
total
!
=
0.0
:
if
total
>
=
0.0
:
self
.
MovimientoCuentaCorriente
(
factura
,
resivo
,
tmp
)
self
.
MovimientoCuentaCorriente
(
factura
,
resivo
,
tmp
)
if
total
<
0.0
:
#
if total < 0.0:
total
=
0.0
#
total = 0.0
return
(
total
)
return
(
total
)
#Nombre heredado no me gusto pero bue....
#Nombre heredado no me gusto pero bue....
...
@@ -263,11 +276,11 @@ class hgt_cobro_multiple(models.TransientModel):
...
@@ -263,11 +276,11 @@ class hgt_cobro_multiple(models.TransientModel):
self
.
pcw_recibo
.
agregar_valor
(
linea
.
val_monto
,
retencion
,
self
.
env
.
user
.
turno
.
caja
.
id
)
self
.
pcw_recibo
.
agregar_valor
(
linea
.
val_monto
,
retencion
,
self
.
env
.
user
.
turno
.
caja
.
id
)
def
agregar_cheques_recibidos
(
self
):
def
agregar_cheques_recibidos
(
self
):
if
(
len
(
self
.
pcw_ch
e_recibidos
)
>
0
):
if
(
len
(
self
.
pcw_ch
q_resiv2
)
>
0
):
print
(
"cszdfcvaszdcv"
)
print
(
"cszdfcvaszdcv"
)
cheque_recibido
=
self
.
env
[
'asw.tipos_valores'
]
.
search
([(
'tv_tipo'
,
'='
,
'chr'
)])
cheque_recibido
=
self
.
env
[
'asw.tipos_valores'
]
.
search
([(
'tv_tipo'
,
'='
,
'chr'
)])
for
cheque
in
self
.
pcw_ch
e_recibidos
:
for
cheque
in
self
.
pcw_ch
q_resiv2
:
print
(
cheque
,
cheque_recibido
,
self
.
env
.
user
.
turno
.
caja
.
id
)
print
(
cheque
,
cheque_recibido
,
self
.
env
.
user
.
turno
.
caja
.
id
)
self
.
pcw_recibo
.
agregar_cheque
(
cheque
,
cheque_recibido
,
self
.
env
.
user
.
turno
.
caja
.
id
)
self
.
pcw_recibo
.
agregar_cheque
(
cheque
,
cheque_recibido
,
self
.
env
.
user
.
turno
.
caja
.
id
)
...
...
wizard/vista_cobro_discriminado.xml
View file @
b64eba1
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
<field
name=
"pcw_cliente"
colspan=
'2'
domain=
"[('cli_es_cliente','=', True )]"
/>
<field
name=
"pcw_cliente"
colspan=
'2'
domain=
"[('cli_es_cliente','=', True )]"
/>
<field
name=
"pcw_referencia"
/>
<field
name=
"pcw_referencia"
/>
<field
name=
"pcw_efectivo"
colspan=
'2'
/>
<field
name=
"pcw_efectivo"
colspan=
'2'
/>
<field
name=
"caja_efectivo"
/>
</group>
</group>
<group
string=
"Detalles"
>
<group
string=
"Detalles"
>
<field
name=
"nota"
nolabel=
"1"
/>
<field
name=
"nota"
nolabel=
"1"
/>
...
@@ -24,7 +25,7 @@
...
@@ -24,7 +25,7 @@
<notebook
colspan=
"4"
>
<notebook
colspan=
"4"
>
<page
string=
"Cheques Recibidos"
>
<page
string=
"Cheques Recibidos"
>
<group
col=
"4"
>
<group
col=
"4"
>
<field
name=
"pcw_ch
e_recibidos
"
colspan=
'4'
nolabel=
'1'
widget=
'one2many'
context=
"{'default_val_razon_social' : pcw_cli_razon_social}"
>
<field
name=
"pcw_ch
q_resiv2
"
colspan=
'4'
nolabel=
'1'
widget=
'one2many'
context=
"{'default_val_razon_social' : pcw_cli_razon_social}"
>
<tree
create=
"1"
delete=
"1"
edit=
"1"
editable=
"bottom"
>
<tree
create=
"1"
delete=
"1"
edit=
"1"
editable=
"bottom"
>
<field
name=
"che_banco"
/>
<field
name=
"che_banco"
/>
<field
name=
"che_nro_cheque"
/>
<field
name=
"che_nro_cheque"
/>
...
@@ -44,6 +45,7 @@
...
@@ -44,6 +45,7 @@
<tree
create=
"1"
delete=
"1"
edit=
"1"
editable=
"bottom"
>
<tree
create=
"1"
delete=
"1"
edit=
"1"
editable=
"bottom"
>
<field
name=
"val_cuenta_bancaria"
/>
<field
name=
"val_cuenta_bancaria"
/>
<field
name=
"val_fecha_emision"
/>
<field
name=
"val_fecha_emision"
/>
<field
name=
"valor_caja_id"
/>
<field
name=
"val_nro_pago"
/>
<field
name=
"val_nro_pago"
/>
<field
name=
"val_monto"
required=
'1'
/>
<field
name=
"val_monto"
required=
'1'
/>
</tree>
</tree>
...
...
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