Skip to content

Commit

Permalink
[IMP] Use chunked() to process pos lines in batches.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivantodorovich committed Jun 3, 2020
1 parent 4d52e19 commit 4e09097
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/point_of_sale/migrations/12.0.1.0.1/post-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ def fill_pos_order_line_prices(env):
" for all pos.order.line, because pos_pricelist was installed")
return

env["pos.order.line"].search([])._onchange_amount_line_all()
for lines in openupgrade.chunked(
env["pos.order.line"].search([]),
single=False
):
lines._onchange_amount_line_all()


def fill_pos_order_amounts(env):
Expand Down

0 comments on commit 4e09097

Please sign in to comment.