Hi,

Please can someone give me a hint why a record rule updates only after I switch 
the rule from global to not global and back again?

I try to separate partner addresses by user company. I would like to achieve 
e.g. that two out of three companies can see a partner address. Therefor I 
wrote a small module

from osv import fields,osv,orm
import ir

class res_partner_address(osv.osv):
    _name = "res.partner.address"
    _inherit = "res.partner.address"
    _columns = {
        
'ext_multi_company':fields.many2many('res.company','company_address_rel','address_id','company_id','Companies
 allowed'),
        }
res_partner_address()

, added the field name="ext_multi_company"  to a new partner_view.xml and added 
the record rule 
[('ext_multi_company','in','User/Company')] for res.partner.address.

Now if I add a company to a partner address I have to uncheck "global", save 
the record rule, check "global" and save the rule again before a user whose 
company I have added can see the partner address.

Why does this happen?

Thank you in advance




_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to