mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
Fix test incompatibility with stock_reserve_rule
The rules created in demo data of stock_reserve_rule make the tests of stock_vertical_lift (and possibly other modules) fail because the transfers can't be made available. Deactivate the rule in stock_reserve_rule and activate it only in its tests. Users can still activate the rule manually to test.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<field name="sequence">1</field>
|
||||
<field name="location_id" ref="stock.stock_location_stock" />
|
||||
<field name="company_id" ref="base.main_company" />
|
||||
<field name="active" eval="False" />
|
||||
</record>
|
||||
<record id="stock_reserve_rule_removal_1_demo" model="stock.reserve.rule.removal">
|
||||
<field name="rule_id" ref="stock_reserve_rule_1_demo" />
|
||||
|
||||
@@ -25,8 +25,8 @@ A product: Funky Socks
|
||||
Scenario:
|
||||
|
||||
* Activate Storage Locations and Multi-Warehouses
|
||||
* You can open Inventory > Configuration > Stock Reservation Rules to see the
|
||||
rules
|
||||
* You can open Inventory > Configuration > Stock Reservation Rules to activate
|
||||
and see the rules (by default in demo, the rules are created inactive)
|
||||
* Open Transfer: Outgoing shipment (reservation rules demo 1)
|
||||
* Check availability: it has 150 units, as it will not empty Zone A, it will not
|
||||
take products there, it should take 100 in B and 50 in C (following the rules
|
||||
|
||||
@@ -17,6 +17,8 @@ class TestReserveRule(common.SavepointCase):
|
||||
"code": "WHTEST",
|
||||
}
|
||||
)
|
||||
cls.rule = cls.env.ref("stock_reserve_rule.stock_reserve_rule_1_demo")
|
||||
cls.rule.active = True
|
||||
|
||||
cls.customer_loc = cls.env.ref("stock.stock_location_customers")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user