Remove usage of warehouse field

26b2c5a94b90 replaced the field by a property.
This commit is contained in:
Cédric Krier
2026-06-18 10:38:26 +02:00
parent 16a5a90aff
commit bb88737b22
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -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)),
})
@@ -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')