[FIX] maintenance: scheduled maintenance request

When we set a period for preventive maintenance on an equipment which
has no maintenance team set, the cron cannot create the maintenance
requests.

To fix this issue, the maintenance team is now required when a period is
set on an equipment.
This commit is contained in:
Pierre Masereel
2017-04-10 14:54:53 +02:00
parent 0b7b5650f1
commit 57baccb14a
@@ -293,7 +293,7 @@
<field name="owner_user_id" string="Owner"/>
</group>
<group>
<field name="maintenance_team_id"/>
<field name="maintenance_team_id" attrs="{'required': [('period', '!=', 0)]}"/>
<field name="technician_user_id"/>
<field name="assign_date" groups="base.group_no_one"/>
<field name="scrap_date" groups="base.group_no_one"/>