Commit e313743f authored by Daniel Santibáñez Polanco's avatar Daniel Santibáñez Polanco
Browse files

Todos los porductos deben ser exentos

parent 92e78cea
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment