OCA / account-reconcile

Odoo account reconciliation modules (statements, data completion...)
https://odoo-community.org/psc-teams/banking-10
GNU Affero General Public License v3.0
127 stars 369 forks source link

[14.0][IMP] account_reconciliation_widget: date_maturity and id sorted in DESC order, amount move to second ORDER BY #655

Closed kaynnan closed 2 months ago

kaynnan commented 2 months ago

cc @marcelsavegnago @douglascstd @WesleyOliveira98 @Matthwhy

In Odoo version 12, the account.reconciliation.widget sorted the date_maturity in DESC order along with the id. However, in version 14, this behavior was changed to sort the date maturity in ASC order.

This change was implemented to improve the user's visibility into how their transactions are presented. Sorting the date maturity and id in DESC order provides users with a clearer view of their transaction history, enhancing the overall user experience.

Before:

image

After:

image

pedrobaeza commented 2 months ago

Can you please point to the v12 code where this happens? Check also the CI.

kaynnan commented 2 months ago

@pedrobaeza It happens in this section, we can see that at the time there was no other group by for {amount}, but the others were DESC get_move_lines_for_bank_statement_line V12

pedrobaeza commented 2 months ago

@kaynnan sorry, but I don't see this as an improvement, as you are putting in the first lines the newest lines, and the idea is to put in the first places the pending things that are most possible to be the matchings.

If you receive a payment, what is the most probable case? To pay the newest invoice? Or to pay the oldest one? I say the second, and that's why it's put as DESC.

kaynnan commented 2 months ago

@pedrobaeza I understand, in that case I will close the PR, thanks for the reviews