You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In children company, as children company user (with max access rights) create new Customer
Result:
AccessError: The requested operation cannot be completed due to security restrictions. Please contact your system administrator. (Document type: res.users, Operation: read)
Expected:
Create and read new Customer.
The text was updated successfully, but these errors were encountered:
zbik2607
changed the title
Company dependent field - impossible use as related in multicompany environments
[8.0] Company dependent field - impossible use as related in multicompany environments
Nov 6, 2015
I hit the same kind of issue with code like this one: https://github.com/OCA/l10n-france/blob/8.0/l10n_fr_siret/company.py
A related store=True field that go from res.partner which doesn't have company_id field (therefore, no multi-company record rule), to res.company that has a record rule.
I seems that related field are computed with the rights of the user, where as they should be computed with sudo() rights to by-pass the record rules.
Thank you for your bug report and our apoligies that we haven't had the time to look at this bug report. We do our best to handle all of them, but we sometimes miss some.
At this point Odoo 8 is no longer supported as Odoo only supports three versions (9.0, 10.0, 11.0 at the moment).
If you can still reproduce this issue on Odoo 9, Odoo 10 or Odoo 11 we encourage you to create a new bug report.
Example to reproduction:
class res_partner(models.Model):
_inherit = 'res.partner'
foo = fields.Boolean(string='FOO', related='property_account_receivable.active')
or define:
foo = fields.Boolean(string='FOO', company_dependent=True, related='property_account_receivable.active')
Result:
AccessError: The requested operation cannot be completed due to security restrictions. Please contact your system administrator. (Document type: res.users, Operation: read)
Expected:
Create and read new Customer.
The text was updated successfully, but these errors were encountered: