Skip to content

[19.0][MIG] sale_variant_configurator: Migration to 19.0#443

Open
Andrii9090-tecnativa wants to merge 35 commits into
OCA:19.0from
Tecnativa:19.0-mig-sale_variant_configurator
Open

[19.0][MIG] sale_variant_configurator: Migration to 19.0#443
Andrii9090-tecnativa wants to merge 35 commits into
OCA:19.0from
Tecnativa:19.0-mig-sale_variant_configurator

Conversation

@Andrii9090-tecnativa

@Andrii9090-tecnativa Andrii9090-tecnativa commented May 12, 2026

Copy link
Copy Markdown

Changes:

  • _action_confirm -> action_confirm: this is needed to avoid the UserError on sale.order
  • Disabled the required attribute for product_id, product_uom_id, and product_template_id in sale.view_order_form.
image

@pedrobaeza ping
@Tecnativa
TT61966

@OCA-git-bot OCA-git-bot added series:19.0 mod:sale_variant_configurator Module sale_variant_configurator labels May 12, 2026
@Andrii9090-tecnativa Andrii9090-tecnativa marked this pull request as draft May 12, 2026 13:05
@Andrii9090-tecnativa Andrii9090-tecnativa marked this pull request as ready for review May 12, 2026 13:08
@Andrii9090-tecnativa Andrii9090-tecnativa force-pushed the 19.0-mig-sale_variant_configurator branch from 5c2689e to e8531c3 Compare May 12, 2026 13:39
@Andrii9090-tecnativa Andrii9090-tecnativa marked this pull request as draft May 13, 2026 07:14
@Andrii9090-tecnativa Andrii9090-tecnativa force-pushed the 19.0-mig-sale_variant_configurator branch from e8531c3 to e40fcc3 Compare May 13, 2026 08:47
@Andrii9090-tecnativa Andrii9090-tecnativa marked this pull request as ready for review May 13, 2026 09:32
@Andrii9090-tecnativa Andrii9090-tecnativa force-pushed the 19.0-mig-sale_variant_configurator branch from e40fcc3 to 4f70e6a Compare May 13, 2026 12:28
@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot migration sale_variant_configurator

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone May 14, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request May 14, 2026
8 tasks

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Apart from the comments inline, we should keep only one column for showing "Product"/"Product template", and more as modifications are handled in the popup.

More problems detected:

  • A variant without attributes have been created on sales confirmation:
Image
  • The text with the attribute values have been lost (probably because the final selected variant was the empty one):
Image

Comment thread sale_variant_configurator/readme/CONTRIBUTORS.md Outdated
Comment thread sale_variant_configurator/views/sale_view.xml
Comment thread sale_variant_configurator/views/sale_view.xml Outdated
@Andrii9090-tecnativa Andrii9090-tecnativa force-pushed the 19.0-mig-sale_variant_configurator branch from 4f70e6a to 473c6c6 Compare May 15, 2026 07:46
@victoralmau

Copy link
Copy Markdown
Member

Please, cherry-pick #449 to commit history before migration commit

@Andrii9090-tecnativa Andrii9090-tecnativa force-pushed the 19.0-mig-sale_variant_configurator branch from 473c6c6 to c6ca146 Compare June 8, 2026 07:19
@victoralmau

Copy link
Copy Markdown
Member

Please, cherry-pick #448 to commit history before migration commit.

@Andrii9090-tecnativa Andrii9090-tecnativa force-pushed the 19.0-mig-sale_variant_configurator branch from c6ca146 to 631b5a4 Compare June 8, 2026 12:28
@victoralmau

Copy link
Copy Markdown
Member

Please, cherry-pick #450 to commit history before migration commit and remove unnecessary changes in the migration commit (related to #443 (comment))

pedrobaeza and others added 23 commits June 12, 2026 12:33
* Use generic method for creating the variant if needed
* Create the variant when the sales is already confirmed
for some reason, after the creation of the product, the sale.order.line
was emptied (e.g. product_tmpl_id was False) -> the onchange would do nothing.

I split the test in two, and in the second test, I create the product before
creating the sale order line.
…omer language

As the model `sale.order.line` doesn't have `partner_id` field, the
description is not populated in the customer language, as the automatism
put in product_configurator makes use of this trick.

For not adding such field that can conflict with other parts, let's
overwrite the methods that populate the description and pass upstream
the customer language in the context.

TT33029
Currently translated at 100.0% (8 of 8 strings)

Translation: product-variant-16.0/product-variant-16.0-sale_variant_configurator
Translate-URL: https://translation.odoo-community.org/projects/product-variant-16-0/product-variant-16-0-sale_variant_configurator/pt_BR/
Currently translated at 100.0% (8 of 8 strings)

Translation: product-variant-18.0/product-variant-18.0-sale_variant_configurator
Translate-URL: https://translation.odoo-community.org/projects/product-variant-18-0/product-variant-18-0-sale_variant_configurator/sl/
@Andrii9090-tecnativa Andrii9090-tecnativa force-pushed the 19.0-mig-sale_variant_configurator branch from 631b5a4 to 5aafba4 Compare June 12, 2026 10:47
Comment thread sale_variant_configurator/models/sale_order.py Outdated
Comment thread sale_variant_configurator/models/sale_order.py Outdated
Comment thread sale_variant_configurator/models/sale_order.py Outdated
Comment thread sale_variant_configurator/views/sale_view.xml Outdated
@Andrii9090-tecnativa Andrii9090-tecnativa force-pushed the 19.0-mig-sale_variant_configurator branch from 5aafba4 to 50fd972 Compare June 12, 2026 15:04
@Andrii9090-tecnativa

Copy link
Copy Markdown
Author

@victoralmau you are right. I changed the code, tested it, and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:sale_variant_configurator Module sale_variant_configurator series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.