Table of Contents

<record id="base.view_rule_form" model="ir.rule">
  <field name = "name"> Rule_name </field> 
  <field ref = "module.model for this rule" name = "model_id" /> 
     <field name="domain_force">here add your new domain</field>
     <field name = "groups" eval = " [(4, ref ('group of this rule'))] "/> 
 </record>

Explanation:

Record Rules / <ir.rules>

1- definitions:

2- There are two types of Record Rule:

Global rules and group rules - (rules restricted to specific groups VERSUS groups applying to all users)

3- A record rule has:

<field name = "name"> Rule_name </field>
<field ref = "module.model for this rule" name = "model_id" />
<field name = "groups" eval = " [(4, ref ('group of this rule'))] "/>
<field name="domain_force">here add your new domain</field>

Domain examples:

Group : Sales / User: Own Documents Only

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

This mean: - user can access just to his own orders / quotations . - orders with no specific user .

Group : Sales / User: All Documents

[(1,'=',1)] This will grant access to ALL Sales Orders / Quotations.