-
-
Notifications
You must be signed in to change notification settings - Fork 624
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
[IMP] mis_builder: display blank cells instead of 0.0 when there is no data #169
Conversation
…h the debit and the credit are zero and balances among which debit and credit nullify
Hey @ThomasBinsfeld, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
👍 (code review and functional test) @ThomasBinsfeld can you please fill and send your individual CLA as explained here https://odoo-community.org/page/cla |
@jbeficent @alexis-via you may want to look into this one |
@sbidoul ICLA is signed and sent 📧 |
yes, better to put 0.0 instead of bank field for those kind of reports which are mainly financial 👍 |
@alexis-via I'm not sure about your last sentence. To be clear:
This is important because:
|
👍 (Functionnal test & Code review) |
@laetitia-gangloff good catch |
8.0 imp accounting none sbi
Hey @ThomasBinsfeld, Appreciation of efforts, |
[FIX] fix comparison rendering in presence of AccountingNone
@laetitia-gangloff it should be ok, now. |
@laetitia-gangloff p1 vs p3 is blank, that is normal because (-4960 - 0)/abs(0) does not make sense. p3 vs p1 is (0-(-4960))/abs(4960) = 100%. So that part is ok. For the second part, we can hide the +0 indeed. I'll look into it. |
mis_builder: render blank instead of +0 comparison columns
@laetitia-gangloff 0 comparisons now show blank too. |
👍 |
Ok, ready to merge. |
👍 Again ! Thanks ! |
What is the added value of using AccountingNone object instead of embedding the logic? I see that at the end, you have to add the clause |
@pedrobaeza because the logic would be complex and would need to be repeated in user-entered kpi expressions. The tests for AccountingNone are at the "boundaries" only (when rendering or returning the value to clients). |
OK then 👍 |
[IMP] mis_builder: display blank cells instead of 0.0 when there is no data
…lidate-ape [8.0] Port account move batch validate to 8.0
In KPI values computed on accounts where there are no moves during the period, show a blank instead of 0.0. This is nicer for the eye, and sometimes mandatory in some kind of reports.
This is implemented with an AccountingNone singleton which is a null value that "dissolves" in basic arithmetic operations with non-None values.