From d5c237b141cb378b76428be819cef4e632668ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Alix?= Date: Fri, 30 Jul 2021 15:30:24 +0200 Subject: [PATCH] [FIX] s_o_manual_procurement: handle NewId (test) --- .../tests/test_stock_orderpoint_manual_procurement.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stock_orderpoint_manual_procurement/tests/test_stock_orderpoint_manual_procurement.py b/stock_orderpoint_manual_procurement/tests/test_stock_orderpoint_manual_procurement.py index 2d500d5db..5dc0a2768 100644 --- a/stock_orderpoint_manual_procurement/tests/test_stock_orderpoint_manual_procurement.py +++ b/stock_orderpoint_manual_procurement/tests/test_stock_orderpoint_manual_procurement.py @@ -170,3 +170,11 @@ class TestStockWarehouseOrderpoint(common.TransactionCase): self.assertEquals(len(purchase_line), 1) pol_date = fields.Date.from_string(purchase_line.date_planned) self.assertEquals(pol_date, manual_date) + + def test_compute_procure_recommended_with_newid(self): + """'_compute_procure_recommended' method uses '_quantity_in_progress' + standard method which could trigger an issue in 'purchase_stock' when + dealing with NewID IDs. + """ + self.create_orderpoint_procurement() + self.reorder.new(origin=self.reorder)._compute_procure_recommended()