Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
9550 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer

te amo

Gerelateerde posts Antwoorden Weergaven Activiteit
1
nov. 24
1059
0
aug. 21
2006
1
jun. 19
3906
2
nov. 24
810
0
feb. 24
1499