From ebf4a37cea2d2bc54403f40ef8e4278b4c829550 Mon Sep 17 00:00:00 2001 From: Carlos Fonseca Date: Fri, 29 Dec 2023 11:41:25 +0000 Subject: [PATCH] [IMP] currency conversion date when converting other currencies to company currency --- l10n_pt_account_invoicexpress/models/account_move.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/l10n_pt_account_invoicexpress/models/account_move.py b/l10n_pt_account_invoicexpress/models/account_move.py index 61305e65..48d483df 100644 --- a/l10n_pt_account_invoicexpress/models/account_move.py +++ b/l10n_pt_account_invoicexpress/models/account_move.py @@ -108,7 +108,6 @@ def _get_invoicexpress_prefix(self, doctype): }.get(doctype) def _prepare_invoicexpress_lines(self): - date_today = fields.Date.today() # FIXME: set user lang, based on country? lines = self.invoice_line_ids.filtered( lambda l: l.display_type not in ("line_section", "line_note") @@ -129,7 +128,7 @@ def _prepare_invoicexpress_lines(self): line.price_unit, line.company_id.currency_id, line.company_id, - date_today, + line.move_id.invoice_date or line.move_id.date or fields.Date.context_today(line), ) items.append( {