8000 [18.0][MIG] product_variant_sale_price: Migration to 18.0 by NICO-SOLUTIONS · Pull Request #374 · OCA/product-variant · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[18.0][MIG] product_variant_sale_price: Migration to 18.0 #374

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

Open
wants to merge 44 commits into
base: 18.0
Choose a base branch
from

Conversation

NICO-SOLUTIONS
Copy link
Member

standard migration

@NICO-SOLUTIONS NICO-SOLUTIONS marked this pull request as ready for review November 20, 2024 10:33
@NICO-SOLUTIONS NICO-SOLUTIONS mentioned this pull request Nov 20, 2024
4 tasks
@ph-obs
Copy link
ph-obs commented Feb 7, 2025

Hi @NICO-SOLUTIONS. May I ask if you are still working on this, or if ther are any updates?

@NICO-SOLUTIONS
Copy link
Member Author

Hi @NICO-SOLUTIONS. May I ask if you are still working on this, or if ther are any updates?

Feel free to review...

@rousseldenis
Copy link

/ocabot migration product_variant_sale_price

@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 18.0-mig-product_variant_sale_price branch 2 times, most recently from 0ea92e0 to 14d1f7f Compare February 14, 2025 09:40
Copy link
@matteonext matteonext left a comment

Choose a reason for hiding this comment

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

functional ok

Copy link
@ecino ecino left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

sergio-teruel and others added 8 commits May 14, 2025 09:50
…ate is created

[product_variant_sale_price] Set minimun fix_price among variants to ensure consistency with the price shown in the shop
…ariants

Steps to reproduce:
- create more than one variant
- change fix_price of one variant

Current behavior:
- lst_price of all variants are changed

Expected behavior:
- lst_price of only selected variant is changed
oca-travis and others added 22 commits May 14, 2025 09:50
Currently translated at 100.0% (6 of 6 strings)

Translation: product-variant-14.0/product-variant-14.0-product_variant_sale_price
Translate-URL: https://translation.odoo-community.org/projects/product-variant-14-0/product-variant-14-0-product_variant_sale_price/pt/
Currently translated at 83.3% (5 of 6 strings)

Translation: product-variant-15.0/product-variant-15.0-product_variant_sale_price
Translate-URL: https://translation.odoo-community.org/projects/product-variant-15-0/product-variant-15-0-product_variant_sale_price/fr/
Currently translated at 100.0% (6 of 6 strings)

Translation: product-variant-15.0/product-variant-15.0-product_variant_sale_price
Translate-URL: https://translation.odoo-community.org/projects/product-variant-15-0/product-variant-15-0-product_variant_sale_price/ca/
Apply suggested changes from FrankC013
Currently translated at 100.0% (6 of 6 strings)

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

Translation: product-variant-16.0/product-variant-16.0-product_variant_sale_price
Translate-URL: https://translation.odoo-community.org/projects/product-variant-16-0/product-variant-16-0-product_variant_sale_price/it/
FIX

[UPD] Update product_variant_sale_price.pot

[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-variant-17.0/product-variant-17.0-product_variant_sale_price
Translate-URL: https://translation.odoo-community.org/projects/product-variant-17-0/product-variant-17-0-product_variant_sale_price/

Translated using Weblate (Italian)

Currently translated at 100.0% (7 of 7 strings)

Translation: product-variant-17.0/product-variant-17.0-product_variant_sale_price
Translate-URL: https://translation.odoo-community.org/projects/product-variant-17-0/product-variant-17-0-product_variant_sale_price/it/

Translated using Weblate (Spanish)

Currently translated at 100.0% (7 of 7 strings)

Translation: product-variant-17.0/product-variant-17.0-product_variant_sale_price
Translate-URL: https://translation.odoo-community.org/projects/product-variant-17-0/product-variant-17-0-product_variant_sale_price/es/
…tion

- _create_variant_ids(): Variants receive fix_price directly when created
- write(): Efficiently updates fix_price of variants when `list_price` is changed
- Removes unnecessary _update_fix_price() calls for better performance
In Odoo 18, the keyword argument pricelist was removed from the _get_combination_info method. This PR removes the parameter from the calls to avoid a TypeError
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 18.0-mig-product_variant_sale_price branch from 2a05e30 to a8f3e41 Compare May 14, 2025 07:51
- The singleton error in _create_variant_ids will be avoided by iterating over self
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 18.0-mig-product_variant_sale_price branch from fda6755 to 0110a88 Compare May 14, 2025 08:14
@jappi00
Copy link
jappi00 commented May 15, 2025

LGTM

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link
Member
@FrancoMaxime FrancoMaxime left a comment

Choose a reason for hiding this comment

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

Hi @NICO-SOLUTIONS, thanks for all your work. great Job

return res


class ProductProduct(models.Model):
Copy link
Member

Choose a reason for hiding this comment

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

@rousseldenis Hi Denis, i didn't found an answer in the contribution guide. But should the two classes be split into two files?

Copy link
Member Author

Choose a reason for hiding this comment

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

just let me know if you want to have this separated

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

Successfully merging this pull request may close these issues.

0