Manage staging moves on shipment workflow
Staging moves are automatically assigned when purchased so we should remove them when packing a shipment as they are not part of the shipment. We also skip moves with zero quantity because they will always succeed. issue9448 review313951002
This commit is contained in:
1 parent
9e6e245f02
commit
ceefdeb72f
2 files changed
+10
-2
No files matched your search
@@ -474,10 +474,12 @@ class Move(Workflow, ModelSQL, ModelView):
|
||||
return ((from_type != 'storage' and to_type == 'storage')
|
||||
or (from_type == 'storage' and to_type != 'storage'))
|
||||
|
||||
@fields.depends('from_location')
|
||||
@fields.depends('from_location', 'quantity')
|
||||
def on_change_with_assignation_required(self, name=None):
|
||||
if self.from_location:
|
||||
return self.from_location.type in {'storage', 'view'}
|
||||
return (
|
||||
self.quantity
|
||||
and self.from_location.type in {'storage', 'view'})
|
||||
|
||||
@staticmethod
|
||||
def _get_shipment():
|
||||
|
||||
Reference in new issue
Block a user