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.

27 lines
1.0 KiB

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