diff --git a/issue12315.diff b/issue12315.diff new file mode 100644 index 0000000..a7044f3 --- /dev/null +++ b/issue12315.diff @@ -0,0 +1,15 @@ +diff --git a/tryton/modules/stock_product_location/location.py b/tryton/modules/stock_product_location/location.py +index 42b0e68470..5a82d5d6cc 100644 +--- a/tryton/modules/stock_product_location/location.py ++++ b/tryton/modules/stock_product_location/location.py +@@ -70,6 +70,13 @@ class Move(metaclass=PoolMeta): + setattr(self, field, product_location.location) + break + ++ def pick_product(self, quantities): ++ if self.product.consumable and self.warehouse: ++ self.set_product_location(field='from_location', ++ warehouse=self.warehouse.id) ++ to_pick = super().pick_product(quantities) ++ return to_pick ++ diff --git a/series b/series index 167ec8c..13d0549 100644 --- a/series +++ b/series @@ -81,3 +81,5 @@ tools-email.diff # [trytond] tools email issue12398.diff # [account_dunning] Missing searc_rec_name in model 'account.dunning.level' issue12414.diff # [stock_lot_sled] Check expiration lot in case Shelf Life Time State is not "none" + +issue12315.diff # [stock_product_location] Make production entry move from_location configurable