Add configurable support
Following the example of the bundle product, empty methods are created in order to be inherited. That way the "flat" default system stays the same and the additional module will allow to import the configurable products in the Odoo format
-
[x] import product attribute
-
[x] import product attributes values
-
[x] import product attribute lines
-
[x] change product template
-
[x] remove useless product templates
-
[x] import product attribute prices
-
[x] find a way to hide the principal product.product (linked to the magento configurable product) without removing the magento.product.product associated example on the first line :

-
[x] unit tests
Hey @PierrickBrun, thank you for your Pull Request.
It looks like some users haven't signed our Contributor License Agreement, yet. You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/website.cla Here is a list of the users:
- @PierrickBrun (login unknown in OCA database)
Appreciation of efforts, OCA CLAbot
Hi @gurneyalex Pierrick is a new talentuous kid on the akretion block (but completely new in odoo) . Could you add it in the akretion team/cla ? Thanks.
@guewen A said Pierrick'll contribute on Magento for configurable products. He have to learn a lot here but he dive in your code for its first job in Odoo. It seems he like it We now have needs to decide what is the way to deal with configurable products.
Our plan is (please fix us):
- import configurable as simple product : almost DONE
- convert this simple product to a full set of product variants (with attributes)
- inactive useless variant
The main question here is: step 2 and 3 should be synchro or deferred with a new job ?
cc @sebastienbeau
The main question here is: step 2 and 3 should be synchro or deferred with a new job ?
As step 1 alone doesn't make sense without 2 and 3, it seems to me that it can be synchronous.
Will start testing tomorrow, I think the functional perimeter is OK.
@guewen Do you have an idea how to hide the product.product without attributes ? (screenshot in the first post). If i disable it, the connector will stop updating the template.
Also, what is your opinion on the problem in product attribute prices ? In magento, products created before a change in attribute prices don't change their price. In odoo they do -> can result in prices mismatch Is an option to (de)activate it necessary or do we rely on sale order to handle this possible mismatch ?
@guewen Do you have an idea how to hide the product.product without attributes ? (screenshot in the first post). If i disable it, the connector will stop updating the template.
What is needed to update on the template? I'm really far to have the whole context, so I can be totally wrong, but I see these options:
- use another 'active' field on the binding which overrides the template's one
- consider even the inactive templates on the code that "update the template" (but I don't what you speak about)
Also, what is your opinion on the problem in product attribute prices ? In magento, products created before a change in attribute prices don't change their price. In odoo they do -> can result in prices mismatch Is an option to (de)activate it necessary or do we rely on sale order to handle this possible mismatch ?
I don't know what this problem is... In any way there must be a check in the sale order (it exists I think).
Yes @PierrickBrun planned to do some tests
Thanks for the feedback, yes there will be tests
Hi @guewen, I think everything is OK now, can you confirm ?