[FIX] mrp: MO planned when all WO are planned
This pr fixes a bug where a validation error occurs in the timesheet wizard. Indeed, when the user enter manually a start or end date in a workorder, the whole MO becomes "plan". The problem here was that if the user opens the wizard of another workorder (on the same MO) that has no start/ end date set, and then if he saves (no matter if he changed something), it will trigger a validation error because the start and end date of the workorder is required in that view if the MO is planned. closes odoo/odoo#120386 X-original-commit: c9728858aa46e6cb1a3d39cbc8da8e175007e456 Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
This commit is contained in:
@@ -159,9 +159,9 @@
|
||||
<label for="date_start" string="Start Date" attrs="{'invisible': [('state', 'not in', ['progress', 'done', 'cancel'])]}"/>
|
||||
<div class="oe_inline">
|
||||
<field name="is_planned" invisible="1"/>
|
||||
<field name="date_start" class="mr8 oe_inline" attrs="{'required': [('is_planned', '=', True)]}"/>
|
||||
<field name="date_start" class="mr8 oe_inline"/>
|
||||
<strong class="mr8 oe_inline">to</strong>
|
||||
<field name="date_finished" class="oe_inline" attrs="{'required': [('is_planned', '=', True)]}"/>
|
||||
<field name="date_finished" class="oe_inline"/>
|
||||
<field name="show_json_popover" invisible="1"/>
|
||||
<field name="json_popover" widget="mrp_workorder_popover" class="oe_inline mx-2" attrs="{'invisible': [('show_json_popover', '=', False)]}"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user