-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[IMP] pricelist_refactor: support discounts and formula in pricelists for subscription and rental products #646
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
Draft
vrgo-odoo
wants to merge
7
commits into
odoo:18.0
Choose a base branch
from
odoo-dev:18.0-imp-pricelist-refactor-vrgo
base: 18.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.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…scription In this commit Introduced discount and formula-based pricelist rules for subscription products. 1.Adding a subscription price rule opens a new form view, requiring a recurring plan. 2.Adding a rental price rule opens a new form view, requiring recurrence. 3.Sale order line price calculation updated to follow the new subscription rules. 4.Product template page updated for both sale products and subscription products
In this commit 1.pricelist calulation for rental product is added. 2.new page pricing is added in product page.
In this commit 1.Implemented logic to update rental prices based on the renting period and applicable price list. 2.Added discount-related computations to ensure correct price adjustments. 3.Applied code formatting improvements.
…ducts In this commit 1.Test cases are added to ensure correct price computation based on subscription plans and pricelists. 2.Test cases are added to verify price calculation across different rental durations and pricelists.
In this commit 1.the minimum quantity for the rental pricelist is now determined based on the minimum quantity of the same pricelist recurrence unit. 2.The rental pricelist calculation logic has been updated.
In this commit 1.If no pricelist item is found for a specific product, fallback to finding a pricelist item based on the product category. 2.logic improvement for calculations.
kpt-odoo
suggested changes
Apr 2, 2025
kpt-odoo
left a comment
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.
Hello, I have added my review.
- I noticed a lot of repeated code, which is not a good practice. It should be optimized to avoid duplication.
- Each module should have its own bridge instead of being tightly connected.
For example, if only the subscription module is installed, shouldn't we still allow adding discounts and formulas in the price list, even without rental? - The eCommerce module seems to be broken. As i am unable to add a product to the cart. Can you check this issue?
- you seem to override whole method (code) instead it can be simply done if you need to add something in parent methods code check if they really necessary.
d3296e6 to
b152b10
Compare
…tion This commit introduces structural improvements by splitting the unified logic into dedicated modules: 1. Separated rental and subscription logic into modules. 2. Introduced pricelist_refactor_rental_website and pricelist_refactor_subscription_website for website-specific behavior. 3. Ensured clean separation of concerns between base logic, rental, subscription and their respective website components.
b152b10 to
196ecf2
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Description of the feature this PR addresses:
Current behavior before PR:
Subscription and rental products did not support discount and formula-based pricing in pricelists.
Desired behavior after PR
Discount and formula is added for subscription and rental products in pricelists.