From d095dde0cbcf1d2e355f161aad87401d30203034 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Wed, 21 Oct 2020 11:44:14 +0200 Subject: [PATCH] [13.0][FIX] account_financial_report: Correct all uses of self.env.user.company_id. Also move company_id to the wizard abstract model. --- account_financial_report/README.rst | 2 ++ account_financial_report/readme/CONTRIBUTORS.rst | 2 ++ account_financial_report/report/general_ledger.py | 2 +- .../static/description/index.html | 3 ++- account_financial_report/wizard/abstract_wizard.py | 9 ++++++++- .../wizard/aged_partner_balance_wizard.py | 6 ------ .../wizard/general_ledger_wizard.py | 11 +++-------- .../wizard/journal_ledger_wizard.py | 2 +- account_financial_report/wizard/open_items_wizard.py | 6 ------ .../wizard/trial_balance_wizard.py | 6 ------ account_financial_report/wizard/vat_report_wizard.py | 2 +- 11 files changed, 20 insertions(+), 31 deletions(-) diff --git a/account_financial_report/README.rst b/account_financial_report/README.rst index 1dc56d7f..b76b83e6 100644 --- a/account_financial_report/README.rst +++ b/account_financial_report/README.rst @@ -136,6 +136,8 @@ Contributors * Harald Panten * Valentin Vinagre +* Lois Rilo + Much of the work in this module was done at a sprint in Sorrento, Italy in April 2016. diff --git a/account_financial_report/readme/CONTRIBUTORS.rst b/account_financial_report/readme/CONTRIBUTORS.rst index 7d3a130a..b460bc03 100644 --- a/account_financial_report/readme/CONTRIBUTORS.rst +++ b/account_financial_report/readme/CONTRIBUTORS.rst @@ -29,5 +29,7 @@ * Harald Panten * Valentin Vinagre +* Lois Rilo + Much of the work in this module was done at a sprint in Sorrento, Italy in April 2016. diff --git a/account_financial_report/report/general_ledger.py b/account_financial_report/report/general_ledger.py index a410a244..ba2e2053 100644 --- a/account_financial_report/report/general_ledger.py +++ b/account_financial_report/report/general_ledger.py @@ -628,7 +628,7 @@ class GeneralLedgerReport(models.AbstractModel): hide_account_at_0, ): general_ledger = [] - rounding = self.env.user.company_id.currency_id.rounding + rounding = self.env.company.currency_id.rounding for acc_id in gen_led_data.keys(): account = {} account.update( diff --git a/account_financial_report/static/description/index.html b/account_financial_report/static/description/index.html index 1b3ca142..cbc074dd 100644 --- a/account_financial_report/static/description/index.html +++ b/account_financial_report/static/description/index.html @@ -3,7 +3,7 @@ - + Account Financial Reports