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

[FIX]Cambio de moneda

parent 3aa2aa16
......@@ -2,7 +2,7 @@
{
"name": """Factura de Exportación Electrónica para Chile\
""",
'version': '0.18.4',
'version': '0.18.5',
'category': 'Localization/Chile',
'sequence': 12,
'author': 'Daniel Santibáñez Polanco, Cooperativa OdooCoop',
......
......@@ -171,14 +171,16 @@ class Exportacion(models.Model):
IVA, TasaIVA,
MntTotal, MntBase)
Totales = {}
Totales['TpoMoneda'] = self._acortar_str(currency_id.abreviatura, 15)
Totales['TpoCambio'] = currency_id.rate
currency_target = self.currency_target()
Totales['TpoMoneda'] = self._acortar_str(currency_target.abreviatura, 15)
base = self.currency_base()
Totales['TpoCambio'] = base.rate
if MntExe:
if currency_id:
MntExe = currency_id.compute(MntExe, self.company_id.currency_id)
MntExe = base.compute(MntExe, currency_target)
Totales['MntExeOtrMnda'] = MntExe
if currency_id:
MntTotal = currency_id.compute(MntTotal, self.company_id.currency_id)
MntTotal = base.compute(MntTotal, currency_target)
Totales['MntTotOtrMnda'] = MntTotal
return Totales
......
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