issue12315.diff # [stock_product_location] Make production entry move from_location configurable (#16)

Task #159715
This commit is contained in:
Juanjo Garcia Pagan 2023-07-25 13:33:23 +02:00 committed by GitHub
parent 2833f73fdd
commit fbba57a353
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

15
issue12315.diff Normal file
View File

@ -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
+

2
series
View File

@ -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