odoo icon indicating copy to clipboard operation
odoo copied to clipboard

[FW][FIX] sale: do not take into account old invoices in sub renew

Open fw-bot opened this issue 3 years ago • 3 comments

To Reproduce

  • create a subscription
  • confirm it and create invoice for it then confirm it too
  • go back to the subscription and renew it
  • from Action generate a payment link
  • a validation error will be raised

Problem

we can't generate the payment link because the amount is 0, this value came from the fact that we subtract the sum of invoices amount linked to this subscription from the total amount.

Solution

The invoices from the old subscription are kept just as history in the new one, and must not be taken into account when computing the amount, so a condition was added to remove theses kind of invoices from computation of amount.

opw-3052816

Forward-Port-Of: odoo/odoo#105454

fw-bot avatar Nov 18 '22 11:11 fw-bot

Pull request status dashboard

robodoo avatar Nov 18 '22 11:11 robodoo

@abla001 cherrypicking of pull request odoo/odoo#105454 failed.

stderr:

12:53:48.878568 git.c:344               trace: built-in: git cherry-pick 5a62e7a0a57b7812e0afe0cf88d65e9a6aebb217
error: could not apply 5a62e7a0a57b... [FIX] sale: do not take into account old invoices in sub renew
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
----------
status:

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

fw-bot avatar Nov 18 '22 11:11 fw-bot

@robodoo r+

abla001 avatar Nov 18 '22 15:11 abla001