mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[FIX] mrp_operations_time_control: Fix bug when the function "_write_end_date_operation_line" does not arrive any OP.
This commit is contained in:
@@ -19,7 +19,8 @@ class MrpProductionWorkcenterLine(models.Model):
|
||||
'user': self.env.uid})
|
||||
|
||||
def _write_end_date_operation_line(self):
|
||||
if not self.operation_time_lines[-1].end_date:
|
||||
if (self.operation_time_lines and not
|
||||
self.operation_time_lines[-1].end_date):
|
||||
self.operation_time_lines[-1].end_date = fields.Datetime.now()
|
||||
|
||||
@api.multi
|
||||
|
||||
Reference in New Issue
Block a user