You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.1 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. # -*- coding: utf-8 -*-
  2. from openerp import fields, models
  3. class subscription_request(models.Model):
  4. _inherit = 'subscription.request'
  5. company_type = fields.Selection(selection_add=[
  6. ('ei', 'Individual company'),
  7. ('snc', 'Partnership'),
  8. ('sa', 'Limited company (SA)'),
  9. ('sarl', 'Limited liability company (Ltd)'),
  10. ('sc', 'Cooperative'),
  11. ('asso', 'Association'),
  12. ('fond', 'Foundation'),
  13. ('edp', 'Company under public law')
  14. ])
  15. def get_required_field(self):
  16. req_fields = super(subscription_request, self).get_required_field()
  17. if 'iban' in req_fields:
  18. req_fields.remove('iban')
  19. return req_fields
  20. def check_iban(self, iban):
  21. if iban:
  22. return super(subscription_request, self).check_iban(iban)
  23. return True