mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] procurement_auto_create_group: pull flow
When the pull flow is coming from an SO, a procurement group is already preset. When the option to auto create a procurement group, replace that procurement group by a new one.
This commit is contained in:
@@ -114,8 +114,12 @@ class TestProcurementAutoCreateGroup(TransactionCase):
|
||||
}
|
||||
)
|
||||
|
||||
self.group = self.group_obj.create({"name": "SO0001"})
|
||||
|
||||
def _procure(self, product):
|
||||
values = {}
|
||||
values = {
|
||||
"group_id": self.group,
|
||||
}
|
||||
self.group_obj.run(
|
||||
[
|
||||
self.env["procurement.group"].Procurement(
|
||||
@@ -170,8 +174,10 @@ class TestProcurementAutoCreateGroup(TransactionCase):
|
||||
[("product_id", "=", self.prod_no_auto_pull_push.id)]
|
||||
)
|
||||
self.assertTrue(move)
|
||||
self.assertFalse(
|
||||
move.group_id, "Procurement Group should not have been assigned."
|
||||
self.assertEqual(
|
||||
move.group_id,
|
||||
self.group,
|
||||
"Procurement Group should not have been assigned.",
|
||||
)
|
||||
|
||||
def test_02_pull_push_auto_create_group(self):
|
||||
|
||||
Reference in New Issue
Block a user