2
0

Remove method _get_partner_policies (not needed with new API)

This commit is contained in:
Alexis de Lattre 2016-12-07 17:17:42 +01:00
parent 8edfc72987
commit efafe5855d

View File

@ -13,15 +13,11 @@ from odoo.exceptions import ValidationError
class AccountAccountType(models.Model): class AccountAccountType(models.Model):
_inherit = "account.account.type" _inherit = "account.account.type"
@api.model partner_policy = fields.Selection([
def _get_partner_policies(self): ('optional', 'Optional'),
"""This is the method to be inherited for adding policies""" ('always', 'Always'),
return [('optional', _('Optional')), ('never', 'Never'),
('always', _('Always')), ], string='Policy for Partner Field',
('never', _('Never'))]
partner_policy = fields.Selection(
_get_partner_policies, string='Policy for Partner Field',
required=True, default='optional', required=True, default='optional',
help="Set the policy for the partner field : if you select " help="Set the policy for the partner field : if you select "
"'Optional', the accountant is free to put a partner " "'Optional', the accountant is free to put a partner "