[ADD] Patches Core stock picking return wizard

This commit is contained in:
Jorge Enrique Gómez Gómez 2023-04-25 19:07:27 -05:00
parent 80cd2d4054
commit f668d58771
3 changed files with 16 additions and 0 deletions

View File

@ -41,6 +41,7 @@ pt_core ()
#git apply $OPTIONS $SRC/patches/20230206_ir-attachment_allow-portal-users-attachment-access.patch #git apply $OPTIONS $SRC/patches/20230206_ir-attachment_allow-portal-users-attachment-access.patch
# Reverted in https://github.com/odoo/odoo/commit/8d1d62a8c0746abb30f97290304b761f74111a89: # Reverted in https://github.com/odoo/odoo/commit/8d1d62a8c0746abb30f97290304b761f74111a89:
#git apply $OPTIONS $SRC/patches/20220204_mail_re-enables-buttons-in-notifications.patch #git apply $OPTIONS $SRC/patches/20220204_mail_re-enables-buttons-in-notifications.patch
git apply $OPTIONS $SRC/patches/20230425_stock_picking-type-from-return.patch
popd popd
} }

View File

@ -0,0 +1,14 @@
diff --git a/addons/stock/wizard/stock_picking_return.py b/addons/stock/wizard/stock_picking_return.py
index 9049254a..c2338e7b 100644
--- a/addons/stock/wizard/stock_picking_return.py
+++ b/addons/stock/wizard/stock_picking_return.py
@@ -117,6 +117,8 @@ class ReturnPicking(models.TransientModel):
# create new picking for returned products
picking_type_id = self.picking_id.picking_type_id.return_picking_type_id.id or self.picking_id.picking_type_id.id
+ if self.env.context.get('return_picking_type_id'):
+ picking_type_id = self.env.context.get('return_picking_type_id')
new_picking = self.picking_id.copy({
'move_lines': [],
'picking_type_id': picking_type_id,

View File

@ -3,3 +3,4 @@ account_accountant
mail_enterprise mail_enterprise
web_mobile web_mobile
hr_avancys_backup hr_avancys_backup
hr_avancys_new