Skip to content

Commit

Permalink
[FIX] Install rules inactivated to avoid conflict with travel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Joao Alfredo Gama Batista committed Dec 31, 2014
1 parent 97d2fbf commit 1599ff3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions travel_hr/__openerp__.py
Expand Up @@ -35,6 +35,11 @@
Adds HR department to passenger view
Attention: This module install rules to filter travels by department
but the rules are not active by default to not conflict with the tests
in the travel module. The user should activate then in Settings -> Technical
-> Security -> Record Rules
Contributors
------------
* Sandy Carter (sandy.carter@savoirfairelinux.com)
Expand Down
3 changes: 2 additions & 1 deletion travel_hr/security/travel_hr_security.xml
Expand Up @@ -7,7 +7,6 @@
<field name="name">Department Filter</field>
<field name="category_id" ref="travel.module_category_travel" />
<field name="comment">Full view for travels linked to all departments</field>
<field name="users" eval="[(4, ref('base.user_root'))]" />
</record>
</data>

Expand All @@ -21,6 +20,7 @@
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('travel.group_basic_travel_user'))]"/>
<field name="domain_force">[('department_rule', '=', user.id)]</field>
<field name="active" eval="False" />
</record>
<record id="travel_all_departments_rule" model="ir.rule">
<field name="name">Travel department all</field>
Expand All @@ -31,6 +31,7 @@
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('group_travel_all_departments'))]"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="active" eval="False" />
</record>
</data>
</openerp>

0 comments on commit 1599ff3

Please sign in to comment.