Skip to content
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

[FIX] sale_advance_payment field amount_residual #3041

Open
wants to merge 2 commits into
base: 14.0
Choose a base branch
from

Conversation

sistecem
Copy link

There is an error in the current version, when canceling a paid Invoice , It still sums up in the invoice_paid_amount , resulting in wrong amount_residual in sale order

There is an error in the current version, when canceling a paid Invoice , It still sums up in the invoice_paid_amount , resulting in wrong amount_residual in sale order
Copy link
Sponsor Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review.

@@ -86,7 +86,8 @@ def _compute_advance_payment(self):
for inv in order.invoice_ids.filtered(
lambda x: x.move_type == "out_invoice"
):
invoice_paid_amount += inv.amount_total - inv.amount_residual
if inv.state == "posted":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we just add this condition in filtered instead of using both filtered and if?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants