mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] stock_request_mrp: Add tests to check cancel stock request order if production is cancelled.
TT41827
This commit is contained in:
@@ -97,6 +97,14 @@ class TestStockRequestMrp(TestStockRequest):
|
|||||||
order.with_context(bypass_confirm_wizard=True).action_cancel()
|
order.with_context(bypass_confirm_wizard=True).action_cancel()
|
||||||
self.assertEqual(production.state, "cancel")
|
self.assertEqual(production.state, "cancel")
|
||||||
|
|
||||||
|
def test_stock_request_order_production_action_cancel(self):
|
||||||
|
order = self._create_stock_request(self.stock_request_user, [(self.product, 5)])
|
||||||
|
order.action_confirm()
|
||||||
|
production = fields.first(order.stock_request_ids.production_ids)
|
||||||
|
self.assertEqual(production.state, "confirmed")
|
||||||
|
production.action_cancel()
|
||||||
|
self.assertEqual(order.state, "cancel")
|
||||||
|
|
||||||
def test_view_actions(self):
|
def test_view_actions(self):
|
||||||
order = self._create_stock_request(self.stock_request_user, [(self.product, 5)])
|
order = self._create_stock_request(self.stock_request_user, [(self.product, 5)])
|
||||||
order.action_confirm()
|
order.action_confirm()
|
||||||
|
|||||||
Reference in New Issue
Block a user