2
0

[FIX] account_partner_required: make policies translatable

This commit is contained in:
Stéphane Bidoul 2014-10-29 15:39:04 +01:00 committed by Alexis de Lattre
parent aaa149cabf
commit 6662b04e6a

View File

@ -29,17 +29,13 @@ class account_account_type(orm.Model):
def _get_policies(self, cr, uid, context=None):
"""This is the method to be inherited for adding policies"""
return [('optional', 'Optional'),
('always', 'Always'),
('never', 'Never')]
def __get_policies(self, cr, uid, context=None):
""" Call method which can be inherited """
return self._get_policies(cr, uid, context=context)
return [('optional', _('Optional')),
('always', _('Always')),
('never', _('Never'))]
_columns = {
'partner_policy': fields.selection(
__get_policies,
lambda self, *args, **kwargs: self._get_policies(*args, **kwargs),
'Policy for partner field',
required=True,
help="Set the policy for the partner field : if you select "