From 3d9abe633282c7eb47b46da0faeab64f98319b38 Mon Sep 17 00:00:00 2001 From: wan Date: Thu, 8 Aug 2019 09:35:48 +0000 Subject: [PATCH] [FIX] account: remove env.company_id in wizard_tax_adjustments The field company_id is not on environment since https://github.com/odoo/odoo/commit/a5b6f31cf28e5381e1c85f66730bcdb55998e643 We should use company instead closes odoo/odoo#35554 Signed-off-by: Laurent Smet --- addons/account/wizard/wizard_tax_adjustments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/wizard/wizard_tax_adjustments.py b/addons/account/wizard/wizard_tax_adjustments.py index f2caa043ba8..90016b6d533 100644 --- a/addons/account/wizard/wizard_tax_adjustments.py +++ b/addons/account/wizard/wizard_tax_adjustments.py @@ -19,8 +19,8 @@ class TaxAdjustments(models.TransientModel): amount = fields.Monetary(currency_field='company_currency_id', required=True) adjustment_type = fields.Selection([('debit', 'Applied on debit journal item'), ('credit', 'Applied on credit journal item')], string="Adjustment Type", required=True) tax_report_line_id = fields.Many2one(string="Report Line", comodel_name='account.tax.report.line', required=True, help="The report line to make an adjustment for.") - company_currency_id = fields.Many2one('res.currency', readonly=True, default=lambda x: x.env.company_id.currency_id) - country_id = fields.Many2one(string="Country", comodel_name='res.country', readonly=True, default=lambda x: x.env.company_id.country_id) + company_currency_id = fields.Many2one('res.currency', readonly=True, default=lambda x: x.env.company.currency_id) + country_id = fields.Many2one(string="Country", comodel_name='res.country', readonly=True, default=lambda x: x.env.company.country_id) def create_move(self): move_line_vals = []