Skip to content

Commit

Permalink
[IMP] internal_stock_quant_package: Don't call unpack if not necessary
Browse files Browse the repository at this point in the history
As Odoo unpack() is calling the _merge_quants() function which can be bulky,
don't call it if not necessary
  • Loading branch information
rousseldenis committed May 19, 2023
1 parent 238152b commit 46777fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal_stock_quant_package/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def _empty_transferred_internal_packages(self):
)
packages = pickings.mapped("move_line_ids.package_id")
internal_packages = packages.filtered("is_internal")
internal_packages.unpack()
if internal_packages:
internal_packages.unpack()

def _move_lines_clear_internal_result_packages(self):
"""
Expand Down

0 comments on commit 46777fb

Please sign in to comment.