[UPD] Change the definition of state field

This commit is contained in:
EL HADJI DEM
2014-10-08 11:38:09 -04:00
parent 0a776bd4af
commit 61282ab0fe

View File

@@ -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."),