record_rules.xml 2.99 KB
Newer Older
santi's avatar
santi committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
   <record model="ir.rule" id="partner_createuid_rule">
        <field name="name">Partner modify only created by user and own</field>
        <field name="model_id" ref="model_res_partner"/>
        <field name="global" eval="False"/>
        <field name="domain_force">['|','|',('id','=',user.partner_id.id),('create_uid','=',False),('create_uid','=',user.id)]</field>
        <field name="groups" eval="[(4,[ref('account.group_account_invoice')])]"/>            
        <field name="perm_read" eval="True"/>
        <field name="perm_write" eval="True"/>
        <field name="perm_unlink" eval="True"/>
        <field name="perm_create" eval="True"/>
  </record>
   <record model="ir.rule" id="partner_write_accountant">
        <field name="name">Partner write all accountants</field>
        <field name="model_id" ref="model_res_partner"/>
        <field name="global" eval="False"/>
        <field name="domain_force">[(1,'=',1)]</field>
        <field name="groups" eval="[(4,[ref('account.group_account_user')])]"/>            
        <field name="perm_read" eval="True"/>
        <field name="perm_write" eval="True"/>
        <field name="perm_unlink" eval="True"/>
        <field name="perm_create" eval="True"/>
  </record>
   <record model="ir.rule" id="user_write_accountant">
        <field name="name">User write all accountants</field>
        <field name="model_id" ref="base.model_res_users"/>
        <field name="global" eval="False"/>
        <field name="domain_force">[(1,'=',1)]</field>
        <field name="groups" eval="[(4,[ref('account.group_account_user')])]"/>            
        <field name="perm_read" eval="True"/>
        <field name="perm_write" eval="True"/>
        <field name="perm_unlink" eval="True"/>
        <field name="perm_create" eval="True"/>
  </record>
santi's avatar
santi committed
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
  <record model="ir.rule" id="invoice_only_read_own">
      <field name="name">Invoices only read own</field>
      <field name="model_id" ref="account.model_account_invoice"/>
        <field name="global" eval="False"/>
        <field name="domain_force">['|',('user_id','=',user.id),('user_id','=',False)]</field>
        <field name="groups" eval="[(4,[ref('account.group_account_invoice')])]"/>            
        <field name="perm_read" eval="True"/>
        <field name="perm_write" eval="True"/>
        <field name="perm_unlink" eval="True"/>
        <field name="perm_create" eval="True"/>
  </record>
  <record model="ir.rule" id="invoice_read_all_accountant">
      <field name="name">Invoices read all accountant</field>
      <field name="model_id" ref="account.model_account_invoice"/>
        <field name="global" eval="False"/>
        <field name="domain_force">[(1,'=',1)]</field>
        <field name="groups" eval="[(4,[ref('account.group_account_user')])]"/>
        <field name="perm_read" eval="True"/>
        <field name="perm_write" eval="True"/>
        <field name="perm_unlink" eval="True"/>
        <field name="perm_create" eval="True"/>
  </record>
santi's avatar
santi committed
59
60
</data>
</openerp>