Remove issue9802 patch | #156791

This commit is contained in:
Jared Esparza 2023-02-21 14:48:22 +01:00
parent 3c36a42d8f
commit ac5dd58225
2 changed files with 0 additions and 37 deletions

View File

@ -1,35 +0,0 @@
--- a/tryton/modules/stock/move.py
+++ b/tryton/modules/stock/move.py
@@ -949,6 +949,8 @@
child_locations = {}
to_write = []
to_assign = []
+ to_copy = []
+ to_copy_values = {}
success = True
for move in moves:
if move.state != 'draft':
@@ -1012,13 +1014,21 @@
to_assign.append(move)
first = False
else:
- with Transaction().set_context(_stock_move_split=True):
- to_assign.extend(cls.copy([move], default=values))
+ to_copy.append(move)
+ to_copy_values[move.id] = values
qty_default_uom = Uom.compute_qty(move.uom, qty,
move.product.default_uom, round=False)
pbl[key] = pbl.get(key, 0.0) - qty_default_uom
+ if to_copy:
+ with Transaction().set_context(_stock_move_split=True):
+ to_assign.extend(cls.copy(to_copy, default={
+ 'from_location': lambda d: (
+ to_copy_values[d['id']]['from_location']),
+ 'quantity': lambda d: (
+ to_copy_values[d['id']]['quantity']),
+ }))
if to_write:
cls.write(*to_write)
if to_assign:

2
series
View File

@ -15,8 +15,6 @@ search_warehouse.diff # [stock] search function for warehouse
model.diff # [trytond] Allows dynamic fields in Model as required by the wizard in sale_pos_template_quantities
issue9802.diff # [stock] Improve performance when partially assigning moves
sao_colors.diff # [sao] Use the same colors as 5.4 version
sao_remove_email.diff # [sao] Removes the email button from the toolbar