From bb88737b22f736b433ba26284a664346d203aae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 18 Jun 2026 10:38:26 +0200 Subject: [PATCH] Remove usage of warehouse field 26b2c5a94b90 replaced the field by a property. --- modules/product_cost_warehouse/stock.py | 3 +-- .../stock_location_move/tests/scenario_stock_location_move.rst | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/product_cost_warehouse/stock.py b/modules/product_cost_warehouse/stock.py index d6d90a53f7..95a7e0d217 100644 --- a/modules/product_cost_warehouse/stock.py +++ b/modules/product_cost_warehouse/stock.py @@ -7,7 +7,7 @@ from trytond.model import fields from trytond.modules.product import round_price from trytond.modules.stock.exceptions import MoveValidationError from trytond.pool import Pool, PoolMeta -from trytond.pyson import Bool, Eval +from trytond.pyson import Eval from trytond.transaction import Transaction @@ -46,7 +46,6 @@ class Location(metaclass=PoolMeta): states={ 'invisible': ( (Eval('type') != 'storage') - | Bool(Eval('warehouse')) | (Eval('id', -1) < 0)), }) diff --git a/modules/stock_location_move/tests/scenario_stock_location_move.rst b/modules/stock_location_move/tests/scenario_stock_location_move.rst index 30a73e6769..c19bc69698 100644 --- a/modules/stock_location_move/tests/scenario_stock_location_move.rst +++ b/modules/stock_location_move/tests/scenario_stock_location_move.rst @@ -89,7 +89,7 @@ Concurrently move pallet:: Add lead time between warehouses:: - >>> warehouse1 = storage_loc.warehouse + >>> warehouse1, = Location.find([('type', '=', 'warehouse')]) >>> warehouse2, = warehouse1.duplicate() >>> LeadTime = Model.get('stock.location.lead_time')