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 8821e6b3
authored
2022-05-07 13:52:00 -0300
by
Juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
No genero qr en nueva factura
1 parent
279cee12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
models/comprobante.py
models/comprobante.py
View file @
8821e6b
...
@@ -48,7 +48,10 @@ class asw_comprobante(models.Model):
...
@@ -48,7 +48,10 @@ class asw_comprobante(models.Model):
@api.depends
(
'afip_qr_img'
)
@api.depends
(
'afip_qr_img'
)
def
_compute_afip_qr
(
self
):
def
_compute_afip_qr
(
self
):
for
rec
in
self
:
for
rec
in
self
:
#import ipdb; ipdb.def_colors='NoColor'; ipdb.set_trace()
if
type
(
rec
.
id
)
!=
int
:
rec
.
afip_qr_img
=
False
return
()
#Si es uno nuevo no hago nada
fecha_emision
=
rec
.
comp_fecha
fecha_emision
=
rec
.
comp_fecha
cod_afip
=
rec
.
comp_talonario
.
tal_tpc_id
.
tc_cod_afip
cod_afip
=
rec
.
comp_talonario
.
tal_tpc_id
.
tc_cod_afip
punt_venta
=
rec
.
comp_talonario
.
tal_ptv_id
.
ptv_nro
punt_venta
=
rec
.
comp_talonario
.
tal_ptv_id
.
ptv_nro
...
@@ -90,6 +93,7 @@ class asw_comprobante(models.Model):
...
@@ -90,6 +93,7 @@ class asw_comprobante(models.Model):
#como el campo es one2many puse que tome el nombre de la primer referencia elegida
#como el campo es one2many puse que tome el nombre de la primer referencia elegida
@api.onchange
(
'referencia_corr'
)
@api.onchange
(
'referencia_corr'
)
def
_onchange_name
(
self
):
def
_onchange_name
(
self
):
first_line
=
self
.
env
[
'asw.referencias'
]
.
search
([(
'id'
,
'in'
,
self
.
referencia_corr
.
ids
)],
limit
=
1
)
first_line
=
self
.
env
[
'asw.referencias'
]
.
search
([(
'id'
,
'in'
,
self
.
referencia_corr
.
ids
)],
limit
=
1
)
if
first_line
and
first_line
.
name
:
if
first_line
and
first_line
.
name
:
self
.
name_ref
=
first_line
.
name
self
.
name_ref
=
first_line
.
name
...
...
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