From c9d50a44f4827f75db738d3d7531b79b993f93a4 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 63c23766..3580fc7d 100644 --- a/account_financial_report/README.rst +++ b/account_financial_report/README.rst @@ -129,6 +129,8 @@ Contributors * Sergio Teruel * Ernesto Tejeda +* 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 484bb7fb..9522dd39 100644 --- a/account_financial_report/readme/CONTRIBUTORS.rst +++ b/account_financial_report/readme/CONTRIBUTORS.rst @@ -22,5 +22,7 @@ * Sergio Teruel * Ernesto Tejeda +* 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 e8951ae7..5324d6ca 100644 --- a/account_financial_report/report/general_ledger.py +++ b/account_financial_report/report/general_ledger.py @@ -615,7 +615,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 40a656f0..8612cb24 100644 --- a/account_financial_report/static/description/index.html +++ b/account_financial_report/static/description/index.html @@ -3,7 +3,7 @@ - + Account Financial Reports