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

Add configurable support #264

Open
wants to merge 33 commits into
base: 10.0
Choose a base branch
from
Open

Conversation

PierrickBrun
Copy link

@PierrickBrun PierrickBrun commented Oct 10, 2017

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

  • import product attribute

  • import product attributes values

  • import product attribute lines

  • change product template

  • remove useless product templates

  • import product attribute prices

  • 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 : configurable product.product

  • unit tests

@oca-clabot
Copy link

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:

Appreciation of efforts,
OCA CLAbot

@bealdav
Copy link
Member

bealdav commented Oct 10, 2017

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.

@bealdav
Copy link
Member

bealdav commented Oct 10, 2017

@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

@PierrickBrun PierrickBrun force-pushed the 10-configurable branch 12 times, most recently from af9c42d to 37664ea Compare October 16, 2017 14:20
@PierrickBrun PierrickBrun force-pushed the 10-configurable branch 2 times, most recently from 704d2e1 to 8663e37 Compare October 19, 2017 14:12
- import product attribute OK

- import product attributes values OK

- import product attribute lines OK

- change product template OK

- remove useless product templates WIP

TODO :
- too many unlink product.template jobs
- find a way to hide the principal product.product (linked to the
magento configurable product) without removing the
magento.product.product associated
- unit tests
@guewen
Copy link
Member

guewen commented Oct 23, 2017

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.

Copy link
Member

@guewen guewen left a comment

Choose a reason for hiding this comment

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

A few details spotted on quick eyeballing

- switch to synchronous
- problem : in magento, products created before a change in attribute prices don't change their price. In odoo they do -> can result in prices mismatch
@PierrickBrun
Copy link
Author

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
Copy link
Member

guewen commented Nov 3, 2017

@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).

Copy link
Member

@guewen guewen left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@guewen guewen left a comment

Choose a reason for hiding this comment

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

Oops, I reviewed only the last commit. What's the status, still WIP?

Copy link
Member

@guewen guewen left a comment

Choose a reason for hiding this comment

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

Looks good overall. Do you plan to add tests?

@PierrickBrun
Copy link
Author

Hi @guewen, I think everything is OK now, can you confirm ?

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.

5 participants