[FIX] account: fix payment method lines order

Currently, the payment method lines are only ordered
base on their sequences. This could lead an issue if
the sequences are all the same, where they would be
returned in a random order.

Add a second ordering on the id to avoid such random
issues.

closes odoo/odoo#73984

X-original-commit: ac700908a80f67e5fd15fa242cc111d57abd4aa9
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
This commit is contained in:
Nicolas (vin)
2021-07-19 15:17:33 +00:00
parent 9e432ed243
commit eada83dc83
@@ -81,7 +81,7 @@ class AccountPaymentMethod(models.Model):
class AccountPaymentMethodLine(models.Model):
_name = "account.payment.method.line"
_description = "Payment Methods"
_order = 'sequence'
_order = 'sequence, id'
# == Business fields ==
name = fields.Char(compute='_compute_name', readonly=False, store=True)