[FIX] account: tax report lines: use new syntax env.company instead of env.user.company_id to get the default country of a tax report line

closes odoo/odoo#39471

X-original-commit: d62d4e198368a14dff50fd16f391f18c9ceec422
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
This commit is contained in:
oco-odoo
2019-10-28 17:21:26 +00:00
committed by fw-bot
parent 46a897dead
commit 54d846ab1c
+1 -1
View File
@@ -67,7 +67,7 @@ class AccountTaxReportLine(models.Model):
name = fields.Char(string="Name", required=True, help="Complete name for this report line, to be used in report.")
tag_ids = fields.Many2many(string="Tags", comodel_name='account.account.tag', relation='account_tax_report_line_tags_rel', help="Tax tags populating this line")
country_id = fields.Many2one(string="Country", comodel_name='res.country', required=True, default=lambda x: x.env.user.company_id.country_id.id, help="Country for which this line is available.")
country_id = fields.Many2one(string="Country", comodel_name='res.country', required=True, default=lambda x: x.env.company.country_id.id, help="Country for which this line is available.")
report_action_id = fields.Many2one(string="Report Action", comodel_name='ir.actions.act_window', help="The optional action to call when clicking on this line in accounting reports.")
children_line_ids = fields.One2many(string="Children Lines", comodel_name='account.tax.report.line', inverse_name='parent_id', help="Lines that should be rendered as children of this one")
parent_id = fields.Many2one(string="Parent Line", comodel_name='account.tax.report.line')