-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
[16.0][FIX]account_invoice_report_grouped_by_picking: do not show negative values with partially invoiced services #303
Conversation
0559ba4
to
ab05195
Compare
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.
Functional review. LGTM
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.
Seems logic, can you add a test?
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.
Sorry for stopping this, but I see that your change impacts both lines with product, consumable or service, so this may alter some of the previous behaviors. Should you limit it to services?
Also I would like to have a test exercising the specific problem for avoiding future regressions.
ab05195
to
b7382e6
Compare
account_invoice_report_grouped_by_picking/models/account_move.py
Outdated
Show resolved
Hide resolved
Hi @pedrobaeza Any news about this? The error is in several versions, and it should be fixed. |
@carlosdauden can you confirm that you see the change correct? |
account_invoice_report_grouped_by_picking/models/account_move.py
Outdated
Show resolved
Hide resolved
b7382e6
to
23d8a9b
Compare
account_invoice_report_grouped_by_picking/models/account_move.py
Outdated
Show resolved
Hide resolved
…values with partially invoiced services
23d8a9b
to
326607d
Compare
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.
OK, let's go with this with the current consensus, and let's see if any problem is detected:
/ocabot merge patch
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at c42ecab. Thanks a lot for contributing to OCA. ❤️ |
With this fix, partially invoiced services that come from sale order lines do not show negative values in invoices PDFs grouped by pickings.
Consider the following sale order:
and the following invoice, in which the amount of the invoiced service quantity is less than the quantity ordered:
Before this fix, there were two lines for the service product: in one of them, quantity is 5, which is the amount in the sale order; in the other one, quantity is -3, which is the amount that needs to be substracted from the other line in order to obtain the amount present in the invoice:
With the fix, there is only one line in the PDF that contains the amount that is actually invoiced.