Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] connector_importer: migrate to v16 #106

Merged
merged 36 commits into from
Sep 6, 2023

Conversation

simahawk
Copy link
Contributor

@simahawk simahawk commented Mar 2, 2023

Ported as not installable here #105 to ease review.

Depends on:

Most of the changes can be ported as is to v15. FWD ported all improvements from 14 and 15.

@simahawk
Copy link
Contributor Author

simahawk commented Mar 2, 2023

/ocabot migration connector_importer

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Mar 2, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request Mar 2, 2023
3 tasks
@simahawk simahawk force-pushed the 16-connector_importer branch 2 times, most recently from fbce234 to f06be94 Compare March 7, 2023 17:30
@github-actions
Copy link

github-actions bot commented Jul 9, 2023

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 9, 2023
@gurneyalex gurneyalex added no stale Use this label to prevent the automated stale action from closing this PR/Issue. and removed stale PR/Issue without recent activity, it'll be soon closed automatically. labels Aug 25, 2023
@simahawk simahawk force-pushed the 16-connector_importer branch 4 times, most recently from a4fc5f6 to be74511 Compare September 6, 2023 14:58
You can now configure a custom domain on record_handler options.

Eg:

options:
  record_handler:
    match_domain: "[('name', =, values['name'])]"

When defined, it will take precedence over the unique key if any.
Before this change if you did not override 'odoo_find' itself
your custom odoo_find_domain would be bypassed
if you had an empty unique_key.

This was a clear issue when you specified only
'options.record_handler.match_domain'.
Values where not properly converted for x2m fields.
You can now use ref and env to compute your domain.
Keys having both prefix and a transformer like 'xid::' were discarded.
A key like 'xid::foo.parent_id' would simply be ignored.
You can now pass options for specific fields converter via conf.
If for instance, the model you are importing has a relation `partner_id`
you can state that missing records must be created automatically.

Eg::

- model: product.product
  options:
    importer:
      odoo_unique_key: barcode
    mapper:
      name: product.product.mapper
      converter:
        categ_id:
          create_missing: True

All the keys inside converted/field will be propagated to the
`backend_to_rel` converter.
To ease retrieval of import session reports.
You can now pass any context key to the importer (propagated to the record handler)

by using 'ctx' key in the 'importer' options.
Was broken because available_importers requires an import type which is not available before editing.
It was also impossible to set the backend directly.
connector_importer: fix test_recordset.test_docs_html

Without components registered this is broken
however it is already tested in test_recordset_importer
@simahawk
Copy link
Contributor Author

simahawk commented Sep 6, 2023

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-106-by-simahawk-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 581d880 into OCA:16.0 Sep 6, 2023
5 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 3566ce1. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged 🎉 no stale Use this label to prevent the automated stale action from closing this PR/Issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants