From fe615f402fec35995515d187a866a8e17a06443e Mon Sep 17 00:00:00 2001 From: JordiMForgeFlow Date: Wed, 10 Aug 2022 12:23:35 +0200 Subject: [PATCH 01/24] [IMP] account_multicurrency_revaluation: filter accounts by company --- .../wizard/print_currency_unrealized_report.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/account_multicurrency_revaluation/wizard/print_currency_unrealized_report.py b/account_multicurrency_revaluation/wizard/print_currency_unrealized_report.py index 38a5976faae..8aad0d815cf 100644 --- a/account_multicurrency_revaluation/wizard/print_currency_unrealized_report.py +++ b/account_multicurrency_revaluation/wizard/print_currency_unrealized_report.py @@ -20,7 +20,10 @@ class UnrealizedCurrencyReportPrinter(models.TransientModel): def _default_account_ids(self): account_model = self.env["account.account"] - account_ids = account_model.search([("currency_revaluation", "=", True)]).ids + company = self.env.company + account_ids = account_model.search( + [("currency_revaluation", "=", True), ("company_id", "=", company.id)] + ).ids return [(6, 0, account_ids)] def print_report(self): From 1a83703b9eca950d38433cfccb4ba7b945a50bec Mon Sep 17 00:00:00 2001 From: JordiMForgeFlow Date: Wed, 10 Aug 2022 13:53:44 +0200 Subject: [PATCH 02/24] [IMP] account_multicurrency_revaluation: use active company instead of user company --- .../report/unrealized_currency_gain_loss.xml | 5 +++-- .../tests/test_account_account.py | 2 +- .../tests/test_currency_revaluation.py | 1 + .../wizard/wizard_currency_revaluation.py | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/account_multicurrency_revaluation/report/unrealized_currency_gain_loss.xml b/account_multicurrency_revaluation/report/unrealized_currency_gain_loss.xml index 01e95c48033..8cac18636e0 100644 --- a/account_multicurrency_revaluation/report/unrealized_currency_gain_loss.xml +++ b/account_multicurrency_revaluation/report/unrealized_currency_gain_loss.xml @@ -1,6 +1,7 @@