-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
[16.0][MIG] product_variant_sale_price #281
[16.0][MIG] product_variant_sale_price #281
Conversation
f5b7af8
to
35b61ad
Compare
35b61ad
to
945e24d
Compare
0cb268f
to
e78431b
Compare
@Kev-Roche there is any issue with the pre-commit in v16.0? It works in my local |
@RabbitJon-S73 I m not the right person for this kind of question sorry ;) |
e78431b
to
33d2918
Compare
@sergio-teruel could you review? |
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.
Thanks for your work! Some changes to be done, since there are some changes to do in the migration which have not been applied. Check out the migration page Check https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0
On the other hand remember to squash the commits as indicted in https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests#mergesquash-the-commits-generated-by-bots-or-weblate
if self.env.context.get("uom"): | ||
context_uom = uom_model.browse(self.env.context.get("uom")) | ||
price = product.uom_id._compute_price(price, context_uom) |
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.
Why change? We should minimise the code changes in a migration and the code was proper?
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.
#280 I took this changes, I think is the correct behaviour
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.
Great! Thank you very much. Let me check.
By the way, tests are not passing. I will rereview when they pass.
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.
Hey, I solved the problem with the test. I also saw your review on #280 and I changed the .get
after being once checked
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.
Thx @RabbitJon-S73. I asked a question in #280 because I was a bit surprised about the change. Still not an answer, but the code looks good to me :)
89a8a53
to
a43bec5
Compare
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.
LGTM
This PR has the |
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.
Functional review OK
Oh, I didn't see this one because it's not linked in the migration issue #272 . I did also a migration myself in which I also included some view changes that I think make sense and help better use the functionality. However here there are some changes in the |
I went ahead and integrated your corrections into my PR (by cherry-picking and rebasing). |
LGTM! (code review) |
Apply some PEP8 cleanup Avoid redundant loop
[NEW][8.0] product_variant_sale_price: Improvements [NEW][8.0] product_variant_sale_price: Fix travis OCA Transbot updated translations from Transifex
…ate is created [product_variant_sale_price] Set minimun fix_price among variants to ensure consistency with the price shown in the shop OCA Transbot updated translations from Transifex
…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
[UPD] Update product_variant_sale_price.pot [UPD] README.rst Translated using Weblate (Dutch) 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/ Update translation files Updated by Update PO files to match POT (msgmerge) hook in Weblate. [UPD] README.rst
[UPD] Update product_variant_sale_price.pot Update translation files 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/ Update translation files 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/ Translated using Weblate (Portuguese) 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/
[UPD] Update product_variant_sale_price.pot [UPD] README.rst Translated using Weblate (Portuguese) 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/
[UPD] Update product_variant_sale_price.pot Translated using Weblate (French) 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/ Translated using Weblate (Catalan) 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/
a43bec5
to
bd500ad
Compare
@api.model | ||
def create(self, vals): | ||
product_tmpl = super().create(vals) | ||
product_tmpl._update_fix_price(vals) | ||
return product_tmpl |
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.
better as multi
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.
@hildickethan-S73 Done!
bd500ad
to
4e0a63c
Compare
@RabbitJon-S73 I thought you would close this one in favor of #290 |
Version of studio73 |
Standard migration to 16.0.
Added #280