-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
[18.0][MIG] product_variant_sale_price: Migration to 18.0 #374
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] product_variant_sale_price: Migration to 18.0 #374
Conversation
…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
Currently translated at 100,0% (4 of 4 strings) Translation: product-variant-11.0/product-variant-11.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-11-0/product-variant-11-0-product_variant_sale_price/nl/
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: product-variant-12.0/product-variant-12.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-12-0/product-variant-12-0-product_variant_sale_price/
Currently translated at 100.0% (6 of 6 strings) Translation: product-variant-12.0/product-variant-12.0-product_variant_sale_price Translate-URL: https://translation.odoo-community.org/projects/product-variant-12-0/product-variant-12-0-product_variant_sale_price/pt/
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/
[BOT] post-merge updates
Hi @NICO-SOLUTIONS. May I ask if you are still working on this, or if ther are any updates? |
Feel free to review... |
/ocabot migration product_variant_sale_price |
records = super().create(vals) | ||
for i, product_tmpl in enumerate(records): | ||
single_vals = vals[i] if isinstance(vals, list) else vals | ||
product_tmpl._update_fix_price(single_vals) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, this should be improved.
Instead, I would have looked at _create_variant_ids()
and _prepare_variant_values()
in order to avoid too much writes as using variant create()
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rousseldenis please let me know, if the IMP-commit contains what you were thinking of
b426d0a
to
2c008bc
Compare
…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
0ea92e0
to
14d1f7f
Compare
standard migration