Job field is visible and required if companyname field is True

This commit is contained in:
michel 2017-11-03 11:30:30 +01:00
parent c64f00579e
commit 3b8c7031f1

View File

@ -12,11 +12,8 @@
<field name="name"/>
<field name="firstname"/>
<field name="coworkertype"/>
<field name="companyname" attrs="{'required': [('job', '=', True)]}" />
<field name="job" attrs="{'required': [('companyname', '=', True)]}"/>
<field name="companyname"/>
<field name="job" attrs="{'invisible': [('companyname', '=', False)], 'required': [('companyname', '!=', True)]}" />
</group>
<group name="group_right">
<field name="street"/>