odoo/odoo#194759
Created by fw-bot
Merged
at 5b2733d01caf3abf69c7400c731eec37b59a57c5
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:master-17.0-opw-4164056-stop_importing_when_everything_has_been_imported-sile-wgDi-fw
- head
- 84fd6f04e029f36f3ee9d90ff46366ab6dd17e59
- merged
- 9 months ago by Bugfix, Levi Siuzdak
odoo/odoo | |
---|---|
17.0 | #188092 |
saas-17.2 | #193768 |
saas-17.4 | #193817 |
18.0 | #193992 |
saas-18.1 | #194047 |
saas-18.2 | |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #194759 |
[FW][FIX] base_import: stop importing when everything has been imported
Versions
- 17.0+
Steps
- Create a pricelist with 200 price rules;
- export pricelist to xlsx;
- delete original pricelist;
- import pricelist, setting batch size to 100.
Test files ready for import:
- 200_products.xlsx
- 200_pricelist_rules.xlsx
Issue
Pricelist is imported with 400 price rules.
Cause
The back-end signals there's nothing left to import by having nextrow
be falsy1. The front-end ignores this, and continues looping until it's taken as many steps as it initially planned.
The upfront totalSteps
calculation is too high when an imported record has a number of nested relational records that's larger than the batch size.
Solution
If the ORM returns a falsy nextrow
value, call stopImport
.
Forward-Port-Of: #194047
Forward-Port-Of: #188092
-
see note on f58368210c9c ↩