Browse Source

[IMP] use selection_add attribute instead of overriding the whole list

pull/11/head
houssine 5 years ago
parent
commit
2938e23a8a
  1. 10
      easy_my_coop_be/models/coop.py
  2. 18
      easy_my_coop_ch/models/coop.py
  3. 5
      easy_my_coop_fr/models/coop.py

10
easy_my_coop_be/models/coop.py

@ -5,7 +5,9 @@ from openerp import fields, models
class subscription_request(models.Model):
_inherit = 'subscription.request'
company_type = fields.Selection([('scrl', 'SCRL'),
('asbl', 'ASBL'),
('sprl', 'SPRL'),
('sa', 'SA')])
company_type = fields.Selection(selection_add=[
('scrl', 'SCRL'),
('asbl', 'ASBL'),
('sprl', 'SPRL'),
('sa', 'SA')
])

18
easy_my_coop_ch/models/coop.py

@ -5,14 +5,16 @@ from openerp import fields, models
class subscription_request(models.Model):
_inherit = 'subscription.request'
company_type = fields.Selection([('ei', 'Individual company'),
('snc', 'Partnership'),
('sa', 'Limited company (SA)'),
('sarl', 'Limited liability company (Ltd)'), #noqa
('sc', 'Cooperative'),
('asso', 'Association'),
('fond', 'Foundation'),
('edp', 'Company under public law')])
company_type = fields.Selection(selection_add=[
('ei', 'Individual company'),
('snc', 'Partnership'),
('sa', 'Limited company (SA)'),
('sarl', 'Limited liability company (Ltd)'),
('sc', 'Cooperative'),
('asso', 'Association'),
('fond', 'Foundation'),
('edp', 'Company under public law')
])
def get_required_field(self):
req_fields = super(subscription_request, self).get_required_field()

5
easy_my_coop_fr/models/coop.py

@ -5,11 +5,12 @@ from openerp import fields, models
class SubscriptionRequest(models.Model):
_inherit = 'subscription.request'
company_type = fields.Selection([
company_type = fields.Selection(selection_add=[
('asso', 'Association'),
('eurl', 'EURL / Entreprise individuelle'),
('sarl', 'SARL'),
('sa', 'SA / SAS')])
('sa', 'SA / SAS')
])
def get_required_field(self):
req_fields = super(SubscriptionRequest, self).get_required_field()

Loading…
Cancel
Save