mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[UPD] Change the definition of state field
This commit is contained in:
@@ -50,11 +50,12 @@ class mandate(orm.Model):
|
||||
}
|
||||
|
||||
def _get_states(self, cr, uid, context=None):
|
||||
return (
|
||||
('draft', 'Draft'),
|
||||
('valid', 'Valid'),
|
||||
('expired', 'Expired'),
|
||||
('cancel', 'Cancelled'),)
|
||||
return [
|
||||
('draft', _('Draft')),
|
||||
('valid', _('Valid')),
|
||||
('expired', _('Expired')),
|
||||
('cancel', _('Cancelled')),
|
||||
]
|
||||
|
||||
_columns = {
|
||||
'partner_bank_id': fields.many2one(
|
||||
@@ -72,7 +73,8 @@ class mandate(orm.Model):
|
||||
'last_debit_date': fields.date(
|
||||
'Date of the Last Debit', readonly=True),
|
||||
'state': fields.selection(
|
||||
_get_states, 'Status',
|
||||
lambda self, *a, **kw: self._get_states(*a, **kw),
|
||||
string='Status',
|
||||
help="Only valid mandates can be used in a payment line. A "
|
||||
"cancelled mandate is a mandate that has been cancelled by "
|
||||
"the customer."),
|
||||
|
||||
Reference in New Issue
Block a user