-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
[REF] x_product_pack: pricing refactor #173
Open
bruno-zanotti
wants to merge
6
commits into
OCA:17.0
Choose a base branch
from
adhoc-dev:17.0-t-33685-bz
base: 17.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Commits on Oct 8, 2024
-
[REF] product_pack: Price computation refactor
This commit improves the way the price of the packs is computed to ensure it aligns with the behavior of normal products in Odoo. Key improvements include: 1. 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 2. '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. 3. 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.
Configuration menu - View commit details
-
Copy full SHA for 04229c6 - Browse repository at this point
Copy the full SHA 04229c6View commit details -
[REF] product_pack: exception packs totalized and non-detailed
Packs totalized and non-detailed ignores the product pack list price when computing the price. This commit is a hack to keep the behavior of the modules before this refactor. More information in the issue OCA#169.
Configuration menu - View commit details
-
Copy full SHA for 084670c - Browse repository at this point
Copy the full SHA 084670cView commit details -
[REF] sale_product_pack: Price computation refactor
Adapt the module sale_product_pack to the price refactor
Configuration menu - View commit details
-
Copy full SHA for d799cf1 - Browse repository at this point
Copy the full SHA d799cf1View commit details -
[FIX] sale_product_pack: Update Price Action
Resolves an issue in the "Update Prices" action for packs. When update the pricelist, ignore all the "cero" lines, this is the components of packs "Detailed: Totalized in main product" or "Detailed - Ignored". We only want to update component lines if the parent pack is "Detailed - Detailed per component". Also keep in the so line the component discount settled in the parent pack settings. Steps to replicate the bug: 1. In a Sale Order add a product "Detailed - Detailed per component" 2. Save to see all the pack components 3. Change the pricelist to one with discount 4. Call the button action "Update Prices". Before this commit The price of the parent product gets updated, but the component prices remain unchanged. Even if the same product is added again (while retaining the first instance), the component prices show discrepancies. Now, when a pricelist with discounts is applied, all line items in the Sale Order including both parent and component products are updated accordingly.
Configuration menu - View commit details
-
Copy full SHA for cd6fb65 - Browse repository at this point
Copy the full SHA cd6fb65View commit details -
Configuration menu - View commit details
-
Copy full SHA for a8c2bab - Browse repository at this point
Copy the full SHA a8c2babView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3636017 - Browse repository at this point
Copy the full SHA 3636017View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.