Skip to content
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] website_sale_product_minimal_price #857

Merged

Conversation

sbiosca-s73
Copy link

Migration module website_sale_product_minimal_price to v16.0

sergio-teruel and others added 30 commits October 16, 2023 11:10
* [11.0][NEW] website_sale_product_minimal_price: New module

* [11.0][IMP] website_sale_product_minimal_price: Order by minimal variant price (from pricelists or extra variant price)

[UPD] Update website_sale_product_minimal_price.pot

Update translation files

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

Translation: e-commerce-11.0/e-commerce-11.0-website_sale_product_minimal_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-11-0/e-commerce-11-0-website_sale_product_minimal_price/

[UPD] README.rst
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: e-commerce-13.0/e-commerce-13.0-website_sale_product_minimal_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-13-0/e-commerce-13-0-website_sale_product_minimal_price/
Currently translated at 100.0% (2 of 2 strings)

Translation: e-commerce-13.0/e-commerce-13.0-website_sale_product_minimal_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-13-0/e-commerce-13-0-website_sale_product_minimal_price/nl/
Currently translated at 100.0% (2 of 2 strings)

Translation: e-commerce-13.0/e-commerce-13.0-website_sale_product_minimal_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-13-0/e-commerce-13-0-website_sale_product_minimal_price/es/
Currently translated at 100.0% (2 of 2 strings)

Translation: e-commerce-13.0/e-commerce-13.0-website_sale_product_minimal_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-13-0/e-commerce-13-0-website_sale_product_minimal_price/ca/
Ensure we use a consistant currency

TT28906
…s of 12.0

Forward port adapting the minimal price computing to the new way added on version 13.0.

With the changes added the price takes care on the website selected pricelist and it's added the grid of price scale for each product.variant.

TT24175
…list item

When the product has a sales price = 0, his variants has no extra price and a pricelist depends on other pricelists to compute the prices, the algorithm takes a random variant.

Doing this changes we take care all pricelists that depends on the main to compute the prices asociated to the product.

This changes are forward ported and addapted to 13.0 version from this commit OCA@fe99a35#diff-d3f954ac4904966e21fd42f7b88212a43b229ad5c025afc848408a4127215ebe
Currently translated at 100.0% (6 of 6 strings)

Translation: e-commerce-14.0/e-commerce-14.0-website_sale_product_minimal_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-14-0/e-commerce-14-0-website_sale_product_minimal_price/pt/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: e-commerce-15.0/e-commerce-15.0-website_sale_product_minimal_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_product_minimal_price/
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Tests seems to be failing

@sbiosca-s73 sbiosca-s73 force-pushed the 16.0-mig_website_sale_product_minimal_price branch from 30b0aa6 to ff8ead2 Compare October 17, 2023 13:21
@sbiosca-s73
Copy link
Author

@chienandalu ping

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Thanks! @sbiosca-s73

please review @stefan-tecnativa

Copy link
Member

Choose a reason for hiding this comment

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

nitpick: Add yourself to the contributors list

@stefan-tecnativa
Copy link

Tested on runbot, I will explain my test and the results I obtained.
I selected the "Conference Chair" product, which has an attribute "Legs" with two values: steel and aluminium. I've assigned an price_extra to the steel value of two dollars. Then i went to the shop and I correctly saw under the chairs icon the "From 35$" text, which is the correct calculation of the minimum price as the chais is 33$.
Then i went back and I changed the steel price_extra to 8$. When i go back to the shop the text is again correctly displayed but when I open the product the information is not correct. The price "label" is not correctly updated, but the final price calculation is correct.
imagen

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 18, 2024
@sbiosca-s73
Copy link
Author

@chienandalu please apply the "no stale" label. I'm going to review the comment of @stefan-tecnativa.

Thanks!

@sbiosca-s73 sbiosca-s73 changed the title 16.0 mig website_sale_product_minimal_price [16.0] [MIG] website_sale_product_minimal_price Feb 20, 2024
@sbiosca-s73
Copy link
Author

@chienandalu @stefan-tecnativa I have conducted different tests to verify what Stefan mentioned. What he says is correct, but this is unrelated to the module being migrated in this PR.

Regarding the issue he mentioned, I have found a solution. Every time the price_extra of a value is changed, the website_sale module should be updated to reflect the changes on the website; otherwise, we encounter the issue Stefan mentioned.

However, as mentioned before, I don't see the module website_sale_product_minimal_price affecting the situation at any point.

Thanks!

@pedrobaeza pedrobaeza removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 22, 2024
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Thanks @sbiosca-s73 👍

@pilarvargas-tecnativa can you review it as well?

@@ -0,0 +1,2 @@
#. Go to *Website > Configuration > Settings > Pricing > Pricelist* and active the option *Multiple
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#. Go to *Website > Configuration > Settings > Pricing > Pricelist* and active the option *Multiple
#. Go to *Website > Configuration > Settings > Shop - Products* and active the option *Multiple

@pilarvargas-tecnativa
Copy link
Contributor

LGTM, please make this minor modification to the USAGE.rst file.

@sbiosca-s73 sbiosca-s73 force-pushed the 16.0-mig_website_sale_product_minimal_price branch from ff8ead2 to 49b83ca Compare March 4, 2024 13:01
@sbiosca-s73
Copy link
Author

@pilarvargas-tecnativa changes done

Copy link
Contributor

@pilarvargas-tecnativa pilarvargas-tecnativa left a comment

Choose a reason for hiding this comment

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

👍 thanks!

@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). 🤖

@pedrobaeza
Copy link
Member

/ocabot migration website_sale_product_minimal_price
/ocabot merge nobump

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Mar 4, 2024
@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-857-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot mentioned this pull request Mar 4, 2024
33 tasks
@OCA-git-bot OCA-git-bot merged commit f132e54 into OCA:16.0 Mar 4, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at a5c5ab0. Thanks a lot for contributing to OCA. ❤️

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.