diff --git a/mrp_operations_time_control/README.rst b/mrp_operations_time_control/README.rst index cbd251dfe..23971fa36 100644 --- a/mrp_operations_time_control/README.rst +++ b/mrp_operations_time_control/README.rst @@ -58,6 +58,7 @@ Contributors * Mikel Arregi * Oihane Crucelaegui +* Ainara Galdona * Pedro M. Baeza * Ana Juaristi diff --git a/mrp_operations_time_control/__openerp__.py b/mrp_operations_time_control/__openerp__.py index 68c2cf035..862b149f5 100644 --- a/mrp_operations_time_control/__openerp__.py +++ b/mrp_operations_time_control/__openerp__.py @@ -20,6 +20,7 @@ "contributors": [ "Mikel Arregi ", "Oihane Crucelaegui ", + "Ainara Galdona ", "Pedro M. Baeza ", "Ana Juaristi " ], @@ -28,6 +29,7 @@ "views/operation_time_view.xml", "views/mrp_production_view.xml", "security/ir.model.access.csv", + "data/mrp_production_workcenter_line_workflow.xml" ], "installable": True, } diff --git a/mrp_operations_time_control/data/mrp_production_workcenter_line_workflow.xml b/mrp_operations_time_control/data/mrp_production_workcenter_line_workflow.xml new file mode 100644 index 000000000..6ba5c20df --- /dev/null +++ b/mrp_operations_time_control/data/mrp_production_workcenter_line_workflow.xml @@ -0,0 +1,10 @@ + + + + + + + button_done + + + diff --git a/mrp_operations_time_control/models/operation_time.py b/mrp_operations_time_control/models/operation_time.py index 764ec541e..193b4813c 100644 --- a/mrp_operations_time_control/models/operation_time.py +++ b/mrp_operations_time_control/models/operation_time.py @@ -42,8 +42,9 @@ class MrpProductionWorkcenterLine(models.Model): @api.multi def action_done(self): + not_paused_records = self.filtered(lambda x: x.state != 'pause') result = super(MrpProductionWorkcenterLine, self).action_done() - self._write_end_date_operation_line() + not_paused_records._write_end_date_operation_line() return result diff --git a/mrp_operations_time_control/views/operation_time_view.xml b/mrp_operations_time_control/views/operation_time_view.xml index 9a6df5e2f..d6c0103b4 100644 --- a/mrp_operations_time_control/views/operation_time_view.xml +++ b/mrp_operations_time_control/views/operation_time_view.xml @@ -36,6 +36,9 @@ +