[IMP] account: added default order by invoice_date

This commit aims to improve the order of draft bills / invoices. Currently when importing multiple vendor bills they aren't ordered logically since they're still draft bills. Adding a fallback order by invoice_date until they're posted will help the user find the bill he's looking for more easily. It also allows to preserve the order of the imported bills in case of validation in batches.

Task ID: 3383575

closes odoo/odoo#126691

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
This commit is contained in:
SaddemAmine
2023-07-13 14:47:27 +02:00
parent 5438599af9
commit 35ea7f5979
+1 -1
View File
@@ -64,7 +64,7 @@ class AccountMove(models.Model):
_name = "account.move"
_inherit = ['portal.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin', 'sequence.mixin']
_description = "Journal Entry"
_order = 'date desc, name desc, id desc'
_order = 'date desc, name desc, invoice_date desc, id desc'
_mail_post_access = 'read'
_check_company_auto = True
_sequence_index = "journal_id"