Skip to content
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


closes #31917

Signed-off-by: Nicolas Martinelli (nim) <>
  • Loading branch information...
nim-odoo committed May 18, 2018
1 parent 7e33b54 commit 84df9948ed07310e9343876935c0050c996b73bd
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/mrp/models/
@@ -240,7 +240,7 @@ def _onchange_qty_producing(self):

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 84df994

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