Do not assign consumable on view location

It is not allowed to assign remaining consumable on the current location if
this location is a view because the domain on location field of move does not
allow it.

issue6372
review33981002
This commit is contained in:
Cédric Krier
2017-03-23 22:45:29 +01:00
parent 021811541f
commit e4cb95cf02
+1 -1
View File
@@ -761,7 +761,7 @@ class Move(Workflow, ModelSQL, ModelView):
to_pick.append((location, available_qty))
needed_qty -= available_qty
# Force assignation for consumables:
if self.product.consumable:
if self.product.consumable and self.from_location.type != 'view':
to_pick.append((self.from_location, needed_qty))
return to_pick
return to_pick