Skip to content
Permalink
Browse files

[FIX] mrp: write on done WO

Do not allow to write on a done WO except for time log.

Partial backport of aafa049

opw-1946121
  • Loading branch information...
nim-odoo committed May 18, 2018
1 parent 1f008a4 commit 7b61c84a1c18f1168982f65620081138ad5be57a
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/mrp/models/mrp_workorder.py
@@ -240,7 +240,7 @@ def _onchange_qty_producing(self):

@api.multi
def write(self, values):
if ('date_planned_start' in values or 'date_planned_finished' in values) and any(workorder.state == 'done' for workorder in self):
if list(values.keys()) != ['time_ids'] and any(workorder.state == 'done' for workorder in self):
raise UserError(_('You can not change the finished work order.'))
return super(MrpWorkorder, self).write(values)

0 comments on commit 7b61c84

Please sign in to comment.
You can’t perform that action at this time.