Hello, I added shop_id in res.users , account.invoice, account.move and account.move.lines also, I add a parent field in sale.shop, I want to filter compay id and Shop ID using the below codes it works in Journal Items and Journal Entry but when I try to create an Invoice and Validate it restriction Warning pop-up and it says (Document type: Account Entry, Operation: read). Can anyone help me Please? Please Anyone?
<record id="account.account_move_comp_rule" model="ir.rule">
<field name="name">Account Entrysss</field>
<field name="model_id" ref="model_account_move"/>
<field name="global" eval="True"/>
<field name="domain_force">['&','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),'|',('shop_id','child_of',[user.shop_id.id]),('shop_id','=',[user.shop_id.id])]</field>
</record>
<record id="account.account_move_line_comp_rule" model="ir.rule">
<field name="name">Entry linesss</field>
<field name="model_id" ref="model_account_move_line"/>
<field name="global" eval="True"/>
<field name="domain_force">['&','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),'|',('shop_id','child_of',[user.shop_id.id]),('shop_id','=',[user.shop_id.id])]</field>
</record>
Anyone? Please