[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.
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 | |
| ) |
336ec49 to
71b7f6a
Compare
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
|
/ocabot merge nobump |
|
This PR looks fantastic, let's merge it! |
|
I'm merging as it has enough approval, plus the module is separate thus shouldn't affect other module workflow. |
|
@yvaucher your merge command was aborted due to failed check(s), which you can inspect on this commit of 18.0-ocabot-merge-pr-1289-by-yvaucher-bump-nobump. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
|
Can you rebase? |
71b7f6a to
514a427
Compare
Done but the error doesn't seem to be fixed on base branch. |
|
The error seems indeed unrelated In tests module |
Yes, we can see it on other PR as well: #1392, #1390 for instance. |
Add an option to include the recurrences in the total of a Sale Order Line
514a427 to
648299e
Compare
|
Seems to be fixed @yvaucher |
|
/ocabot merge nobump Let's try again |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at c7e0905. Thanks a lot for contributing to OCA. ❤️ |
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).