mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] account_partner_required: make policies translatable
This commit is contained in:
committed by
Luis Rodriguez
parent
ebfb42729a
commit
f34c652d2f
@@ -29,17 +29,13 @@ class account_account_type(orm.Model):
|
|||||||
|
|
||||||
def _get_policies(self, cr, uid, context=None):
|
def _get_policies(self, cr, uid, context=None):
|
||||||
"""This is the method to be inherited for adding policies"""
|
"""This is the method to be inherited for adding policies"""
|
||||||
return [('optional', 'Optional'),
|
return [('optional', _('Optional')),
|
||||||
('always', 'Always'),
|
('always', _('Always')),
|
||||||
('never', 'Never')]
|
('never', _('Never'))]
|
||||||
|
|
||||||
def __get_policies(self, cr, uid, context=None):
|
|
||||||
""" Call method which can be inherited """
|
|
||||||
return self._get_policies(cr, uid, context=context)
|
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'partner_policy': fields.selection(
|
'partner_policy': fields.selection(
|
||||||
__get_policies,
|
lambda self, *args, **kwargs: self._get_policies(*args, **kwargs),
|
||||||
'Policy for partner field',
|
'Policy for partner field',
|
||||||
required=True,
|
required=True,
|
||||||
help="Set the policy for the partner field : if you select "
|
help="Set the policy for the partner field : if you select "
|
||||||
|
|||||||
Reference in New Issue
Block a user