Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty

In odoo 9, I have added a record rule on the model mrp.production as:

['|', ('user_id', '=', user.id), ('user_id', '=', False)]

This will show users only the MOs that belongs to them. Now when I am trying to confirm the sale order which will then create a MO for the lines in that sale order I am getting an access error as:

    The requested operation cannot be completed due to security restrictions. Please contact your system administrator.    (Document type: mrp.production, Operation: read) 

Diagnosing more I found that it is causing due to the missing_ids. Take a look at this.

https://github.com/odoo/odoo/blob/2d77941844b8eeb00514d401bad26704dce25a83/openerp/models.py#L3510

Before that I have used the same solution in openerp 7 and it is still working perfect without any access error while confirming SO.

Avatar
Hylkää
Tekijä Paras vastaus

Solved this issue. For answer

http://stackoverflow.com/a/36247290/3832653

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
elok. 21
3073
2
elok. 18
4556
1
jouluk. 22
6265
3
helmik. 25
2063
1
jouluk. 24
2155