Closed bruno-zanotti closed 3 weeks ago
Hi @ernestotejeda, some modules you are maintaining are being modified, check this out!
WIP: This PR is based on https://github.com/OCA/product-pack/pull/174 so we need to merge it first
Hello @pedrobaeza @FrancoMaxime @augusto-weiss @rousseldenis @ernestotejeda
This PR is mainly a migration to v17 of https://github.com/OCA/product-pack/pull/149. In Adhoc, we are already using it in our v17 clientes and everything seems to work fine. It is ready for review, but not for merge since depends on the migration of website_sale_product_pack https://github.com/OCA/product-pack/pull/174 (I included in the firs commit so you can test it on runboat). It is an important fix / change so let's try to merge it ASAP, I tried to explain the change in the description and commits messages but if you have any doubt please let me know.
Thanks for the PR, Great work!
@FrancoMaxime thanks for the review, I already made the changes!
LGTM!! Waiting on this to migrate product pack to 18!! @bruno-zanotti
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). 🤖
/ocabot merge major
What a great day to merge this nice PR. Let's do it! Prepared branch 17.0-ocabot-merge-pr-173-by-pedrobaeza-bump-major, awaiting test results.
Congratulations, your PR was merged at a9782aa9563561c3eac719b917cad4957c60f14f. Thanks a lot for contributing to OCA. ❤️
Thanks for the PR, Great work!
@FrancoMaxime thanks for the review, I already made the changes!
With a little delay, thanks for the changes!
Pricing refactor
This PR aims to perform a thorough refactor of the product_pack, sale_product_pack and website_sale_product_pack modules. The primary goal is to enhance the pricing logic for product packs, ensuring consistency and improved functionality.
Key improvements / fixes:
Refactor Pack Price Computation: Removed the inheritance from price_compute in favor of a clearer and more comprehensible _get_product_price method within the Pricelist class
'get_price' -> '_get_pack_line_price': The get_price method on pack lines has been improved and renamed to _get_pack_line_price. It is now capable of returning the price of the pack line for a specified pricelist.
List Price Calculation: Enhanced the _compute_product_lst_price method to return the list price of a pack. It now leverages a new method analogous to price_compute, named _pack_line_price_compute, which can determine the prices of pack components, including nested packs.
Resolves an issue related to the action "Update Prices" on Sale Orders. Now when update the pricelist just take into account the components of packs "Detailed - Detailed per component" and ignore the rest. More info about how to replicate the bug in the commit message.
website Pack prices: show the correct price on the website.