-
-
Notifications
You must be signed in to change notification settings - Fork 572
[18.0] [ADD] product_contract_recurrence_in_price #1289
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
base: 18.0
Are you sure you want to change the base?
[18.0] [ADD] product_contract_recurrence_in_price #1289
Conversation
|
Hi @sbejaoui, |
b92e159 to
2384f96
Compare
2384f96 to
0710477
Compare
|
I have pushed a new version. |
|
But why do you need an extra multiplier and the quantity is not enough? |
Let's say you sell a subscription over 3 years, invoiced every quarter with a unit price of 100€. Prior to f50e15d, you would have:
Thus the subtotal of the line would be 1200€ ( After f50e15d, you would have:
Without this PR, the subtotal of the line would be 100€ (
And the subtotal of the line would be 1200€: 100 ( |
|
The original intention of the system is that you put on the |
0710477 to
511ea0e
Compare
The use case is the sale of subscriptions. I understand that this module can solve different use cases, therefore I have added this as a new option in a new module. |
511ea0e to
336ec49
Compare
| if rec.product_id.is_contract: | ||
| rec.include_recurrence_in_price = ( | ||
| rec.product_id.include_recurrence_in_price | ||
| ) |
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.
You aren't setting your field in every cases
| if rec.product_id.is_contract: | |
| rec.include_recurrence_in_price = ( | |
| rec.product_id.include_recurrence_in_price | |
| ) | |
| rec.include_recurrence_in_price = rec.product_id.is_contract and ( | |
| rec.product_id.include_recurrence_in_price | |
| ) |
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.
Done 👍
Add an option to include the recurrences in the total of a Sale Order Line
336ec49 to
71b7f6a
Compare
This module extends the functionality of
product_contractto add an option to computethe total amounts on "contract" Sale Order lines, including every invoicing planned.
For instance, a product worth 10€ invoiced every month for one year would have a total
of 120€ (unit_price * #invoices) instead of 10€ (unit_price * quantity).