mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[14.0][FIX] repair_stock_move: fix state in repair lines
This commit is contained in:
@@ -172,5 +172,6 @@ class RepairOrder(models.Model):
|
|||||||
if self.stock_move_ids:
|
if self.stock_move_ids:
|
||||||
# With this module this should always be the case, so this is
|
# With this module this should always be the case, so this is
|
||||||
# effectively overriding the method.
|
# effectively overriding the method.
|
||||||
|
self.operations.write({"state": "done"})
|
||||||
return {self.id: self.move_id.id}
|
return {self.id: self.move_id.id}
|
||||||
return super().action_repair_done()
|
return super().action_repair_done()
|
||||||
|
|||||||
@@ -118,6 +118,11 @@ class TestRepairStockMove(common.SavepointCase):
|
|||||||
"confirmed",
|
"confirmed",
|
||||||
"Generated stock move state should be confirmed",
|
"Generated stock move state should be confirmed",
|
||||||
)
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
operation.state,
|
||||||
|
"confirmed",
|
||||||
|
"Repair line state should be confirmed",
|
||||||
|
)
|
||||||
# Start Repair
|
# Start Repair
|
||||||
self.repair1.action_repair_start()
|
self.repair1.action_repair_start()
|
||||||
# End Repair
|
# End Repair
|
||||||
@@ -133,6 +138,11 @@ class TestRepairStockMove(common.SavepointCase):
|
|||||||
"done",
|
"done",
|
||||||
"Generated stock move state should be done",
|
"Generated stock move state should be done",
|
||||||
)
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
operation.state,
|
||||||
|
"done",
|
||||||
|
"Repair line state should be done",
|
||||||
|
)
|
||||||
|
|
||||||
def _create_simple_repair_order(self, invoice_method):
|
def _create_simple_repair_order(self, invoice_method):
|
||||||
product_to_repair = self.product_1
|
product_to_repair = self.product_1
|
||||||
|
|||||||
Reference in New Issue
Block a user