-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
[8.0] skip invoice lines with value 0 #24
Conversation
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.
👍
LGTM
Code review and test.
@cubells I changed the check on 'price_unit' with value into price_subtotal. By doing so we also cover the case of invoice lines with 100% discount. Let me know if it's ok so that we can merge (and forward port to v10)
@cubells |
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.
If you remove white spaces all is ok for me.
@@ -501,6 +501,9 @@ def _gather_invoices(self): | |||
total_inv_weight = 0.0 | |||
for inv_line in invoice.invoice_line: | |||
|
|||
if not inv_line.price_subtotal: | |||
continue | |||
|
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.
Remove all the white spaces of this line to avoid lint errors.
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.
A better expression is:
for inv_line in invoice.invoice_line.filtered('price_subtotal'):
...
Travis is red |
No description provided.