Skip to content

Commit

Permalink
Merge pull request #2 from druidoo-dev/12.0-imp-perf-pos
Browse files Browse the repository at this point in the history
[IMP] Use chunked() to process pos lines in batches.
  • Loading branch information
legalsylvain authored Jun 3, 2020
2 parents 4d52e19 + 4e09097 commit e2f4b75
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 e2f4b75

Please sign in to comment.