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
[FIX] account: journal dashboard graph wrong value #29936
[FIX] account: journal dashboard graph wrong value #29936
Conversation
I don't quite get the use case you want to cover. I think you need to order by name, date instead |
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.
needs some explanation
As @Olivier-LAURENT said in the OPW, here is what happened with the code before this commit and here is what happens after It could give this kind of result When actually from the data it should have bee strictly growing. This happens because if the data is fetched in the wrong order from the database, some values override the already computed values here https://github.com/odoo/odoo/blob/ede086b2e1417432dc372e3bbb38fdf4772ff071/addons/account/models/account_journal_dashboard.py#L68-L75 |
@robodoo r+ |
@william-andre got it, thx for the detailed explanation... The only regret I have is that it won't solve the following use case: encoding 2 statements for the same date, but in the wrong order. The join on max(id) will take the last encoded statements whereas you'd probably want to take the max(name). That's the use case I initially thought you wanted to fix. Anyway, as this is quite an edge case (I'm not even sure someone will ever face it) and given that a join on names seems more fuzzy, I've accepted the PR. Thanks! |
Staging failed: ci/runbot on e99fc0dea52d87b5ee0a3ef239853dda1e4b9919 (view more at http://runbot.odoo.com/runbot/build/429599) |
@william-andre needs a rebase? |
OPW 1918926 Current behavior: The sql query groups by date,id in a intermediary table instead of the result. This allows to get data in the wrong order if the statements were not produced sequentially. The fill values are computed in the wrong order and may override correct values. Desired behavior: There is no override of the values correctly computed.
ede086b
to
e75b6fd
Compare
@qdp-odoo done |
@robodoo retry |
OPW 1918926 Current behavior: The sql query groups by date,id in a intermediary table instead of the result. This allows to get data in the wrong order if the statements were not produced sequentially. The fill values are computed in the wrong order and may override correct values. Desired behavior: There is no override of the values correctly computed. closes #29936
Staging failed: ci/runbot (view more at http://runbot.odoo.com/runbot/build/429794) |
@robodoo retry again |
Merged, thanks! |
again and again and again |
OPW 1918926
Current behavior:
The sql query groups by date,id in a intermediary table instead of the result. This allows to get data in the wrong order if the statements were not produced sequentially. The fill values are computed in the wrong order and may override correct values.
Desired behavior:
There is no override of the values correctly computed.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr