-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
[15.0][IMP] sale_report_delivered_subtotal: Use price_reduce field when price_subtotal is zero #237
[15.0][IMP] sale_report_delivered_subtotal: Use price_reduce field when price_subtotal is zero #237
Conversation
Hi @sergio-teruel, |
|
ebb7b68
to
5d35be4
Compare
…ce_subtotal is zero
5d35be4
to
c7a4a22
Compare
Changes made to use price_reduce only when price cannot be calculated from price_subtotal. |
sum( | ||
CASE WHEN l.price_subtotal <> 0 | ||
THEN (l.price_subtotal / l.product_uom_qty) | ||
ELSE l.price_reduce |
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.
Why not doing here the operation of price_unit - discount for getting a price reduced without rounding?
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.
Because for these rare cases I prefer the result to be more compatible with other modules than more accurate.
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, good enough
/ocabot merge patch
@pedrobaeza The merge process could not start, because command
|
Please fw-port it to v16. |
/ocabot merge patch |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at b904ff0. Thanks a lot for contributing to OCA. ❤️ |
@Tecnativa
Ping @sergio-teruel @CarlosRoca13