Odoo Help


OpenERP ir.rule records in security.xml [Closed]

on 4/26/13, 8:36 AM 3,177 views

The Question has been closed

on 04/30/2013 10:26:21
    <record model="ir.rule" id="stock_inventory_comp_rule">
        <field name="name">Inventory multi-company</field>
        <field name="model_id" ref="model_stock_inventory" />
        <field name="global" eval="True" />
        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]

I'm confused with above code fragment in security.xml files which is mean by below tags.?

id="stock_inventory_comp_rule" means of this line and where its tag with.or is it only for save & keep for identify records by id purpose.?

<field name="name">Inventory multi-company</field> mean by this line.is this only use for display purpose.?

<field name="model_id" ref="model_stock_inventory" /> which one is mean by model_stock_inventory and what is the usage of this .?

<field name="global" eval="True" /> why this one set global True.?if we set it as False then what will the expected result.?

<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] here shows like domain filter in fields.? is this criteria set to above mentioned model class.?what is the usage of this fragment.?

Dharmesh Rathod
On 4/26/13, 9:23 AM


This domain show records where there is no value in company_id or display records for user's company and also child companies.

Email : info@acespritech.com
Skype : acespritech
Blog : acespritechblog.wordpress.com

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 4/26/13, 8:36 AM
Seen: 3177 times
Last updated: 3/16/15, 8:10 AM