Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Daniel Santibáñez Polanco
l10n_cl_dte_exportacion
Commits
e313743f
Commit
e313743f
authored
Dec 27, 2019
by
Daniel Santibáñez Polanco
Browse files
Todos los porductos deben ser exentos
parent
92e78cea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
models/account_invoice.py
models/account_invoice.py
+6
-3
No files found.
models/account_invoice.py
View file @
e313743f
...
...
@@ -113,6 +113,8 @@ class Exportacion(models.Model):
return
super
(
Exportacion
,
self
).
_totales_normal
(
currency_id
,
MntExe
,
MntNeto
,
IVA
,
TasaIVA
,
MntTotal
,
MntBase
)
if
IVA
>
0
or
MntExe
==
0
:
raise
UserError
(
"Deben ser todos los productos Exentos!"
)
Totales
=
{}
if
currency_id
:
Totales
[
'TpoMoneda'
]
=
currency_id
.
abreviatura
...
...
@@ -165,13 +167,14 @@ class Exportacion(models.Model):
#if not in 3,4,5
if
self
.
payment_term_id
:
Aduana
[
'CodModVenta'
]
=
self
.
payment_term_id
.
forma_pago_aduanas
.
code
mnt_clau
=
self
.
payment_term_id
.
with_context
(
currency_id
=
self
.
currency_id
.
id
).
compute
(
self
.
amount_total
,
date_ref
=
self
.
date_invoice
)[
0
]
Aduana
[
'TotClauVenta'
]
=
round
(
mnt_clau
[
0
][
1
],
2
)
elif
not
self
.
_es_nc_exportacion
():
raise
UserError
(
"Debe Ingresar un Término de Pago"
)
if
self
.
incoterms_id
:
Aduana
[
'CodClauVenta'
]
=
self
.
incoterms_id
.
aduanas_code
if
self
.
payment_term_id
:
mnt_clau
=
self
.
payment_term_id
.
with_context
(
currency_id
=
self
.
currency_id
.
id
).
compute
(
self
.
amount_total
,
date_ref
=
self
.
date_invoice
)[
0
]
Aduana
[
'TotClauVenta'
]
=
round
(
mnt_clau
[
0
][
1
],
2
)
if
expo
.
via
:
Aduana
[
'CodViaTransp'
]
=
expo
.
via
.
code
if
expo
.
chofer_id
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment