Allow creating draft move between warehouses

issue10526
review338481002
This commit is contained in:
Cédric Krier committed 2021-07-22 19:09:12 +02:00
1 parent e9e3cca977
commit 737a459d23
2 files changed
+7 -2

No files matched your search

+2
View File
@@ -51,6 +51,8 @@ class Move(metaclass=PoolMeta):
config = Configuration(1)
transit_locations = {}
for move in moves:
if move.state in {'staging', 'draft'}:
continue
company = move.company
if company not in transit_locations:
transit_location = config.get_multivalue(
+5 -2
View File
@@ -139,10 +139,13 @@ Forbid direct move between warehouses::
>>> move.quantity = 1
>>> move.from_location = warehouse1.storage_location
>>> move.to_location = warehouse2.storage_location
>>> move.save() # doctest: +IGNORE_EXCEPTION_DETAIL
>>> move.save()
>>> move.click('do') # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
MoveValidationError: ...
>>> move.to_location = transit
>>> move.save()
>>> move.click('do')
>>> move.state
'done'