From efafe5855d46f0cc19e738ef4c4b27a3aff9001c Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 7 Dec 2016 17:17:42 +0100 Subject: [PATCH] Remove method _get_partner_policies (not needed with new API) --- account_partner_required/models/account.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/account_partner_required/models/account.py b/account_partner_required/models/account.py index 2a6bfd22..a2eb5849 100644 --- a/account_partner_required/models/account.py +++ b/account_partner_required/models/account.py @@ -13,15 +13,11 @@ from odoo.exceptions import ValidationError class AccountAccountType(models.Model): _inherit = "account.account.type" - @api.model - def _get_partner_policies(self): - """This is the method to be inherited for adding policies""" - return [('optional', _('Optional')), - ('always', _('Always')), - ('never', _('Never'))] - - partner_policy = fields.Selection( - _get_partner_policies, string='Policy for Partner Field', + partner_policy = fields.Selection([ + ('optional', 'Optional'), + ('always', 'Always'), + ('never', 'Never'), + ], string='Policy for Partner Field', required=True, default='optional', help="Set the policy for the partner field : if you select " "'Optional', the accountant is free to put a partner "