Skip to content

Commit

Permalink
[FIX] account_partner_required: make policies translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Oct 29, 2014
1 parent 4b3fcfb commit 0ec9322
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions account_partner_required/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit 0ec9322

Please sign in to comment.