Skip to content

Commit

Permalink
[FIX] account: fix access rights error when opening tax report
Browse files Browse the repository at this point in the history
- 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#53168

Signed-off-by: Nicolas Martinelli (nim) <[email protected]>
  • Loading branch information
kitan191 committed Jun 17, 2020
1 parent 9af6a87 commit 517a13b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/account/models/company.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ def get_fiscal_country(self):
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

0 comments on commit 517a13b

Please sign in to comment.