[IMP] payment: token order

Sort the payment tokens by descending id, so that the default token
selected for a partner is the last one.

opw-705441
This commit is contained in:
Nicolas Martinelli
2017-01-23 13:12:40 +01:00
parent 896f5c0886
commit f96bbfd956
+1 -1
View File
@@ -630,7 +630,7 @@ class PaymentTransaction(models.Model):
class PaymentToken(models.Model):
_name = 'payment.token'
_order = 'partner_id'
_order = 'partner_id, id desc'
name = fields.Char('Name', help='Name of the payment token')
short_name = fields.Char('Short name', compute='_compute_short_name')