[19.0][MIG] base_import_async: migration to 19.0#918
Open
YoussefEgla wants to merge 3 commits intoOCA:19.0from
Open
[19.0][MIG] base_import_async: migration to 19.0#918YoussefEgla wants to merge 3 commits intoOCA:19.0from
YoussefEgla wants to merge 3 commits intoOCA:19.0from
Conversation
1d0a8ac to
1cb6f6d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ports
base_import_asyncto 19.0.The
queuerepository already containsqueue_jobported on the 19.0 branch, whilebase_import_asyncwas still present as an unported placeholder withinstallable = False.This migration activates the addon and aligns its async import flow with current Odoo 19 import internals, while also bringing the addon layout and translations in line with the repository's current pre-commit and pylint expectations.
What changed
19.0.1.0.0.installable = True.execute_import()path to mirror Odoo 19 preprocessing before queueing:ensure_one()_parse_datetime_data()_handle_multi_mapping()_handle_fallback_values()load():tracking_disablename_create_enabled_fieldsimport_set_empty_fieldsimport_skip_recordsodoo.api.returnsusage, which is no longer available in Odoo 19.ir.attachmentlinked to thequeue.jobrecord viares_model/res_id, instead of relying on stored job kwargs.base_import.importoverride underwizards/to satisfy the repository's mandatory addon structure checks forTransientModelclasses.self.env._(...)with named placeholders so the addon complies with the current mandatory pylint translation rules.Test updates
The test module was rewritten to cover the migrated behavior more directly.
Added or updated coverage for:
The tests were also adapted to the Odoo 19 import wizard expectations by creating
base_import.importrecords with raw file bytes instead of base64-encoded content.Validation performed
pre-commitvalidation on the touched Python files:ruffruff-formatpylint_odooNotes for reviewers
base_import_async.queue_jobis already ported on 19.0 and is not modified here for migration purposes.