Skip to content

Conversation

@vrgo-odoo
Copy link

@vrgo-odoo vrgo-odoo commented Mar 19, 2025

Description of the feature this PR addresses:

  • Enhances pricelist handling by introducing discount and formula support for subscription and rental products.

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.

…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.
@robodoo
Copy link

robodoo commented Mar 19, 2025

Pull request status dashboard

@vrgo-odoo vrgo-odoo changed the title [IMP] pricelist_refactor: Support discounts and formulas in pricelists for subscription and rental products [IMP] pricelist_refactor: support discounts and formulas in pricelists for subscription and rental products Mar 19, 2025
@vrgo-odoo vrgo-odoo changed the title [IMP] pricelist_refactor: support discounts and formulas in pricelists for subscription and rental products [IMP] pricelist_refactor: support discounts and formula in pricelists for subscription and rental products Mar 19, 2025
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.
Copy link

@kpt-odoo kpt-odoo left a 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.

@vrgo-odoo vrgo-odoo force-pushed the 18.0-imp-pricelist-refactor-vrgo branch 3 times, most recently from d3296e6 to b152b10 Compare April 18, 2025 05:07
…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.
@vrgo-odoo vrgo-odoo force-pushed the 18.0-imp-pricelist-refactor-vrgo branch from b152b10 to 196ecf2 Compare April 18, 2025 05:18
@vrgo-odoo vrgo-odoo requested a review from kpt-odoo April 21, 2025 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants