[13.0][FIX]intrastat_product_declaration - fix amount by removing legacy currency conversion

This commit is contained in:
Luc De Meyer
2021-08-18 21:13:26 +02:00
parent 02542b8fd1
commit ab31bf9363

View File

@@ -344,16 +344,6 @@ class IntrastatProductDeclaration(models.Model):
return weight, suppl_unit_qty
def _get_amount(self, inv_line):
invoice = inv_line.move_id
amount = invoice.currency_id._convert(
inv_line.price_subtotal,
self.company_id.currency_id,
self.company_id,
invoice.date,
)
return amount
def _get_region(self, inv_line):
"""
For supplier invoices/refunds: if the invoice line is linked
@@ -607,7 +597,7 @@ class IntrastatProductDeclaration(models.Model):
)
total_inv_weight += weight
amount_company_currency = self._get_amount(inv_line)
amount_company_currency = -inv_line.balance
total_inv_product_cc += amount_company_currency
if inv_intrastat_line: