Replace (Field, Operator, Operand) by Domain in Rule

review599002
This commit is contained in:
Cédric Krier committed 2012-12-27 22:05:45 +01:00
1 parent d92bb37534
commit 4b794d1f16
1 file changed
+1 -3
+1 -3
View File
@@ -234,9 +234,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="global_p" eval="True"/>
</record>
<record model="ir.rule" id="rule_production">
<field name="field" search="[('name', '=', 'company'), ('model.model', '=', 'production')]"/>
<field name="operator">=</field>
<field name="operand">User/Current Company</field>
<field name="domain">[('company', '=', user.company.id if user.company else None)]</field>
<field name="rule_group" ref="rule_group_production"/>
</record>