Assign fails for consumable products on certain conditions
The production assign step fails when one of its inputs is a consumable product that is not on stock and the move's from_location is of type view. Due to the missing quantities, to_pick() in stock/move.py selects the move's from_location.
Error message: The value of the field "From Location" on "Stock Move" is not valid according to its domain.
The assign step fails and none of the inputs are assigned. In order to resolve this, a user needs to check each input individually and manually assign the from_location for consumable products that are not on stock to any location of type 'storage'.
Preconditions:
* The storage setting on warehouse is a location of type 'view' or a user
changes the from_location to any location of type 'view'.
* The production input is a consumable product.
* The consumable product is not on stock.
Trytond: 4.2