From ab31bf9363e8308ba93b6ca85fd4914a0e6afff4 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Wed, 18 Aug 2021 21:13:26 +0200 Subject: [PATCH] [13.0][FIX]intrastat_product_declaration - fix amount by removing legacy currency conversion --- .../models/intrastat_product_declaration.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/intrastat_product/models/intrastat_product_declaration.py b/intrastat_product/models/intrastat_product_declaration.py index fcbcb79..b48d8da 100644 --- a/intrastat_product/models/intrastat_product_declaration.py +++ b/intrastat_product/models/intrastat_product_declaration.py @@ -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: