OCA/product-variant

[13.0] product_variant_configurator issue with website_sale when computing url

Closed this issue · 8 comments

[13.0] Odoo community Ubuntu 18.04
Steps to reproduce on runbot, install sales website purchase inventory ecomerce, when you try to use this configurator this trceback is shown:

image

Image from runbot, fully reproducible.
B/R

@sergioeix What I see is an error on website_sale when computing url.

@pedrobaeza An advice on this ?

Can't say right now without more investigation. Let's see if migrator @HviorForgeFlow or reviewers of the PR @ThomasBinsfeld and @Laurent-Corron can say anything.

The way that website_sale computes the website_url for product is colliding with the feature that product configurator is adding.
You can see the compute here: https://github.com/odoo/odoo/blob/393b7ad7b7dff1cbf830374c76ef0a681a71be6a/addons/website_sale/models/product.py#L411-L418

It seems that website_sale requires a glue module that change the way computes are generated

So @sergioeix , Maybe overwriting the compute method to return False if record type is NewId, plus adding the website_url computation when saving the product variant creation could be the first steps for the new module.

Hi @HviorForgeFlow ty for the suggestion but i think i dont have skills to get your point and find a solution by myself its out of my capacities. I am just reporting this issue, I think this module adds a great feature to odoo normal flow.

Then this issue can be closed adding in the README of the module that is not compatible with website_sale and that a glue module is needed.

Hi @pedrobaeza I think that website_sale its being used very often by users, but if you consider that this should be the way its fine you are the boss :)

Well, I'm not any boss here, hehe. I'm just someone that is involved in OCA. I'm proposing the way to document the problem, as it seems you are not going to be able to fix it, and an opened issue has less visibility than something in the README IMO.

#219 is my attempt to solve this.