From 6662b04e6ae007efe66f44a19d50d47a50c360fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Wed, 29 Oct 2014 15:39:04 +0100 Subject: [PATCH] [FIX] account_partner_required: make policies translatable --- account_partner_required/account.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/account_partner_required/account.py b/account_partner_required/account.py index d7f7aadb..92af74fa 100644 --- a/account_partner_required/account.py +++ b/account_partner_required/account.py @@ -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 "