Test if coworker 1 or 2 is is_coworker for form and tree

This commit is contained in:
michel 2017-11-29 10:53:11 +01:00
parent 2a1e846304
commit 60d4824375

View File

@ -11,8 +11,8 @@
<sheet>
<group name="group_top">
<group name="group_left">
<field name="coworker1" domain="['&amp;', ('id', '!=', coworker2), ('is_coworker', '=', True)]" />
<field name="coworker2" domain="['&amp;', ('id', '!=', coworker1), ('is_coworker', '=', True)]" />
<field name="coworker1" domain="[('id', '!=', coworker2), ('is_coworker', '=', True)]" />
<field name="coworker2" domain="[('id', '!=', coworker1), ('is_coworker', '=', True)]" />
<field name="relation" />
</group>
</group>
@ -27,8 +27,8 @@
<field name="model">coworking.relation</field>
<field name="arch" type="xml">
<tree editable="True">
<field name="coworker1" domain="[('id', '!=', coworker2)]" />
<field name="coworker2" domain="[('id', '!=', coworker1)]" />
<field name="coworker1" domain="[('id', '!=', coworker2), ('is_coworker', '=', True)]" />
<field name="coworker2" domain="[('id', '!=', coworker1), ('is_coworker', '=', True)]" />
<field name="relation" />
</tree>
</field>