[FIX] account: fix access rights error when opening tax report
- Use an User with Accounting access rights, but without Admin access rights (e.g. Marc Demo) - Go to Accounting > Reporting > Tax Report An access rights error is triggered. opw-2275552 opw-2275115 closes odoo/odoo#53184 X-original-commit: 517a13b967a07fe1e71b9c5308d185c4e45f1a2d Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -574,7 +574,7 @@ class ResCompany(models.Model):
|
||||
self.ensure_one()
|
||||
|
||||
fiscal_country_key = 'account_fiscal_country_%s' % self.id
|
||||
forced_country_code = self.env['ir.config_parameter'].get_param(fiscal_country_key)
|
||||
forced_country_code = self.env['ir.config_parameter'].sudo().get_param(fiscal_country_key)
|
||||
forced_country = forced_country_code and self.env['res.country'].search([('code', 'ilike', forced_country_code)], limit=1)
|
||||
|
||||
return forced_country or self.country_id
|
||||
|
||||
Reference in New Issue
Block a user