This question has been flagged

Namaste, I have an intercompany scenario in my module(odoo v8).

I have added intercompany account field in account.account.

So, A user from X company has intercompany account of Y company.

Although, A user has only allowed X company.

So what happens is when I log in from A user I will get access right error in account.account model.

We cannot remove the record rule of res.company.

Please tell me how can I bypass the record rule for a specific model, if possible give me an example to do so.

Thanks.

Avatar
Discard
Best Answer

Hello Jon,

Try this module if it works for your requirement. You may required some downgrade if using in V8. https://apps.odoo.com/apps/modules/10.0/dynamic_bypass_record_rule/

Thanks.

Avatar
Discard
Best Answer

you can use sudo() to orm methods to bypass record rules .

Ex-

self.env['nameofmodel'].sudo().orm_method()

But using this will open access to all types of users.


Avatar
Discard

te amo