Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I am trying to inherit rule in sale order and change the domain, but nothing is happening, even though I am getting no error messages.
<record id="sale.sale_order_see_all" model="ir.rule">
<field name="name">All Orders</field>
<field ref="model_sale_order" name="model_id"/>
<field name="groups" eval="[(4, ref('base.group_sale_salesman_all_leads'))]"/>
Delete with xml record like:
<delete model="ir.rule" id="sale.sale_order_see_all"/>
You can put new rule definition after this one in same xml...
In groups field you copied eval value: [4,... from original xml file, this works only the firs time you add record...
in order to modify, the groups to apply you should use folowing synthax:
<field name="groups" eval="[(6, 0, [ref('base.group_sale_salesman_all_leads'), ref('optional_other_group_id')])]"/>
(replace the values in m2m relation with new ones in order to apply new rules)
Hope it helps :)
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 7/1/15, 4:47 PM|
|Seen: 1255 times|
|Last updated: 7/2/15, 6:07 AM|