details: https://code.tryton.org/tryton/commit/5354afb349d8
branch: default
user: Cédric Krier <[email protected]>
date: Thu Jun 18 10:38:26 2026 +0200
description:
Remove usage of warehouse field
26b2c5a94b90 replaced the field by a property.
diffstat:
modules/product_cost_warehouse/stock.py | 3 +--
modules/stock_location_move/tests/scenario_stock_location_move.rst | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 4d12bf8e4666 -r 5354afb349d8 modules/product_cost_warehouse/stock.py
--- a/modules/product_cost_warehouse/stock.py Wed Jun 17 22:50:11 2026 +0200
+++ b/modules/product_cost_warehouse/stock.py Thu Jun 18 10:38:26 2026 +0200
@@ -7,7 +7,7 @@
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 @@
states={
'invisible': (
(Eval('type') != 'storage')
- | Bool(Eval('warehouse'))
| (Eval('id', -1) < 0)),
})
diff -r 4d12bf8e4666 -r 5354afb349d8
modules/stock_location_move/tests/scenario_stock_location_move.rst
--- a/modules/stock_location_move/tests/scenario_stock_location_move.rst
Wed Jun 17 22:50:11 2026 +0200
+++ b/modules/stock_location_move/tests/scenario_stock_location_move.rst
Thu Jun 18 10:38:26 2026 +0200
@@ -89,7 +89,7 @@
Add lead time between warehouses::
- >>> warehouse1 = storage_loc.warehouse
+ >>> warehouse1, = Location.find([('type', '=', 'warehouse')])
>>> warehouse2, = warehouse1.duplicate()
>>> LeadTime = Model.get('stock.location.lead_time')