Skip to content

[FIX][18.0] connector_importer_product: proposition of 'fixes' for additional flexibility#161

Closed
Ricardoalso wants to merge 48 commits intoOCA:18.0from
camptocamp:18_fixes_connector_importer_product
Closed

[FIX][18.0] connector_importer_product: proposition of 'fixes' for additional flexibility#161
Ricardoalso wants to merge 48 commits intoOCA:18.0from
camptocamp:18_fixes_connector_importer_product

Conversation

@Ricardoalso
Copy link
Contributor

@Ricardoalso Ricardoalso commented Jul 16, 2025

Based on connector_importer_product migration #155
and porting the following fix https://github.com/OCA/connector-interfaces/pull/141/commits to V18

mmequignon and others added 30 commits July 16, 2025 10:27
The mapper now uses the dynanic mapper to automatically
find and convert values from source to destination.

We can trash many direct mappings!

Additionally, the supplier is now imported automatically.
`prod.product_template_attribute_value_ids` must be set using _only_ valid values.
To find them, we must use `_without_no_variant_attribute()`
as Odoo does in relevant places.

`combination_indices` depends on `product_template_attribute_value_ids`,
hence if its value is wrong the index will be wrong
and you won't find the right variant.

Additionally, when using the product configurator,
since the combination is wrong
the product won't be purchase-able or sale-able w/ the configurator.
Make import type non demo only to provide a default setup.
Allows to import product and suppliers at the same time.
If xid is used as a unique identifier we must create a xid for the template too.
This way you can reference it w/ 'xid::product_tmpl_id'
@Ricardoalso Ricardoalso marked this pull request as draft July 16, 2025 08:35
@OCA-git-bot
Copy link
Contributor

Hi @simahawk,
some modules you are maintaining are being modified, check this out!

@Ricardoalso Ricardoalso marked this pull request as ready for review July 16, 2025 08:36
Copy link

@Camille0907 Camille0907 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ported commits LGTM

@simahawk
Copy link
Contributor

Can you please:

  1. move connector_importer commits to another PR (I'll fast track that)
  2. apply your commits before the migration
  3. finish the migration properly and drop pre-commit: run hook commit

I can help you if needed.

@simahawk
Copy link
Contributor

Shall we close the other PR?

@Ricardoalso
Copy link
Contributor Author

Ricardoalso commented Jul 18, 2025

Shall we close the other PR?

The migration PR #155 ? As this PR is not related to the migration, I would preferably let the one migrating the module open. Furthermore, as @vvrossem already did the work there and the PR is reviewed, can you take a look and eventually trigger a merge ? 🤔

@simahawk
Copy link
Contributor

then why opening another PR w/ the whole stuff? 🤔

@Ricardoalso
Copy link
Contributor Author

then why opening another PR w/ the whole stuff? 🤔

It was while waiting the other one getting merged. Once it is done I will rebase this one

@Ricardoalso Ricardoalso force-pushed the 18_fixes_connector_importer_product branch from 660d817 to 16d8fae Compare July 18, 2025 13:52
@Ricardoalso
Copy link
Contributor Author

Can you please:

  1. move connector_importer commits to another PR (I'll fast track that)
  2. apply your commits before the migration
  3. finish the migration properly and drop pre-commit: run hook commit

I can help you if needed.

I moved the commit related to connector_importer to #162

@Ricardoalso Ricardoalso changed the title [FIX][18.0] connector_importer and connector_importer_product: proposition of 'fixes' for additional flexibility [FIX][18.0] connector_importer_product: proposition of 'fixes' for additional flexibility Jul 21, 2025
@leemannd
Copy link
Contributor

@simahawk Could you have a look at it?

@simahawk
Copy link
Contributor

simahawk commented Aug 4, 2025

can you move commits related to migration to #155 so that we can close this one?

@simahawk
Copy link
Contributor

simahawk commented Aug 4, 2025

One more thing: note that I've just merged some fix/imp on v14. You might want to fwd port #153 😉

@Ricardoalso
Copy link
Contributor Author

fwd port to #153

@Ricardoalso Ricardoalso closed this Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants