mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] procurement_auto_create_group: test setup
Do not override rule1 during setup, renamed the 2 rules.
This commit is contained in:
committed by
Sébastien Alix
parent
06473360a9
commit
91f8edf75c
@@ -27,7 +27,7 @@ class TestProcurementAutoCreateGroup(TransactionCase):
|
||||
|
||||
# Create rules and routes:
|
||||
pull_push_route_auto = cls.route_obj.create({"name": "Auto Create Group"})
|
||||
cls.rule_1 = cls.rule_obj.create(
|
||||
cls.pull_push_rule_auto = cls.rule_obj.create(
|
||||
{
|
||||
"name": "rule with autocreate",
|
||||
"route_id": pull_push_route_auto.id,
|
||||
@@ -56,7 +56,7 @@ class TestProcurementAutoCreateGroup(TransactionCase):
|
||||
}
|
||||
)
|
||||
push_route_auto = cls.route_obj.create({"name": "Auto Create Group"})
|
||||
cls.rule_1 = cls.rule_obj.create(
|
||||
cls.push_rule_auto = cls.rule_obj.create(
|
||||
{
|
||||
"name": "route_auto",
|
||||
"location_src_id": cls.location.id,
|
||||
@@ -194,7 +194,7 @@ class TestProcurementAutoCreateGroup(TransactionCase):
|
||||
|
||||
def test_03_onchange_method(self):
|
||||
"""Test onchange method for stock rule."""
|
||||
proc_rule = self.rule_1
|
||||
proc_rule = self.push_rule_auto
|
||||
self.assertTrue(proc_rule.auto_create_group)
|
||||
proc_rule.write({"group_propagation_option": "none"})
|
||||
proc_rule._onchange_group_propagation_option()
|
||||
|
||||
Reference in New Issue
Block a user