diff --git a/account_financial_report/wizard/aged_partner_balance_wizard.py b/account_financial_report/wizard/aged_partner_balance_wizard.py index fd33abdd..618ffc5f 100644 --- a/account_financial_report/wizard/aged_partner_balance_wizard.py +++ b/account_financial_report/wizard/aged_partner_balance_wizard.py @@ -15,7 +15,7 @@ class AgedPartnerBalanceWizard(models.TransientModel): company_id = fields.Many2one( comodel_name="res.company", - default=lambda self: self.env.user.company_id, + default=lambda self: self.env.company, required=False, string="Company", ) diff --git a/account_financial_report/wizard/general_ledger_wizard.py b/account_financial_report/wizard/general_ledger_wizard.py index 63a9263e..d6bb2044 100644 --- a/account_financial_report/wizard/general_ledger_wizard.py +++ b/account_financial_report/wizard/general_ledger_wizard.py @@ -24,7 +24,7 @@ class GeneralLedgerReportWizard(models.TransientModel): company_id = fields.Many2one( comodel_name="res.company", - default=lambda self: self.env.user.company_id, + default=lambda self: self.env.company, required=False, string="Company", ) diff --git a/account_financial_report/wizard/journal_ledger_wizard.py b/account_financial_report/wizard/journal_ledger_wizard.py index 8e077185..6e9e7f56 100644 --- a/account_financial_report/wizard/journal_ledger_wizard.py +++ b/account_financial_report/wizard/journal_ledger_wizard.py @@ -12,7 +12,7 @@ class JournalLedgerReportWizard(models.TransientModel): company_id = fields.Many2one( comodel_name="res.company", - default=lambda self: self.env.user.company_id, + default=lambda self: self.env.company, string="Company", required=False, ondelete="cascade", diff --git a/account_financial_report/wizard/open_items_wizard.py b/account_financial_report/wizard/open_items_wizard.py index 56f5f1d0..e381cb17 100644 --- a/account_financial_report/wizard/open_items_wizard.py +++ b/account_financial_report/wizard/open_items_wizard.py @@ -15,7 +15,7 @@ class OpenItemsReportWizard(models.TransientModel): company_id = fields.Many2one( comodel_name="res.company", - default=lambda self: self.env.user.company_id, + default=lambda self: self.env.company, required=False, string="Company", ) diff --git a/account_financial_report/wizard/trial_balance_wizard.py b/account_financial_report/wizard/trial_balance_wizard.py index 177531bc..a22b0495 100644 --- a/account_financial_report/wizard/trial_balance_wizard.py +++ b/account_financial_report/wizard/trial_balance_wizard.py @@ -18,7 +18,7 @@ class TrialBalanceReportWizard(models.TransientModel): company_id = fields.Many2one( comodel_name="res.company", - default=lambda self: self.env.user.company_id, + default=lambda self: self.env.company, required=False, string="Company", ) diff --git a/account_financial_report/wizard/vat_report_wizard.py b/account_financial_report/wizard/vat_report_wizard.py index eaa8f9fd..a4877317 100644 --- a/account_financial_report/wizard/vat_report_wizard.py +++ b/account_financial_report/wizard/vat_report_wizard.py @@ -11,7 +11,7 @@ class VATReportWizard(models.TransientModel): company_id = fields.Many2one( comodel_name="res.company", - default=lambda self: self.env.user.company_id, + default=lambda self: self.env.company, required=False, string="Company", )