-
-
Notifications
You must be signed in to change notification settings - Fork 344
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_commission: print partial and document total in report #572
[15.0][IMP] sale_commission: print partial and document total in report #572
Conversation
Hi @pedrobaeza, |
1397de2
to
e199c3b
Compare
f9d052e
to
888a8b4
Compare
Hi @aleuffre, while FW you feature to adapt it to v15.0 I needed to change the position of the Do you have any suggestion that could make it more similar to you implementation? |
I took heavy inspiration from a similar section in the Sales Order report. As you can see, what I did was put the total outside the So yes, I would try to put the total in a div, outside the |
888a8b4
to
41fa94e
Compare
<t t-if="show_doc_total"> | ||
<div class="text-right"> | ||
<strong>Global commission amount:</strong> | ||
<span | ||
t-esc="sum(docs.mapped('total'))" | ||
t-options="{'widget': 'monetary', 'display_currency': docs[0].currency_id}" | ||
/> | ||
</div> | ||
</t> |
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.
issue: Since this is the total for all pages being printed, I don't think it should be printed inside the foreach
(line 95), as you only want this printed once, not once for every commission.
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.
Thank you for your observation. While it's true that the total is printed inside the for each loop, it actually maintains the same behavior as in the 14.0.
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.
Code 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.
LGTM
@pedrobaeza merge?
This PR has the |
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.
/ocabot merge minor
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 2ef3624. Thanks a lot for contributing to OCA. ❤️ |
FWP of #570 the implementation is a little bit different due to other modules dependance on the position of certain elements in the report.