Browse Source

[FIX] add condition is_company when handling the company representative

pull/1/head
houssine 7 years ago
parent
commit
56289970f3
  1. 8
      easy_my_coop/wizard/create_subscription_from_partner.py

8
easy_my_coop/wizard/create_subscription_from_partner.py

@ -147,9 +147,11 @@ class PartnerCreateSubscription(models.TransientModel):
if self.check_belgian_ident_id(self.register_number): if self.check_belgian_ident_id(self.register_number):
coop_vals['national_register_number'] = self.register_number coop_vals['national_register_number'] = self.register_number
if not self._get_representative():
representative_number = self.representative_number
representative = partner_obj.search([('national_register_number','=',representative_number)])
if self.is_company and not self._get_representative():
representative = False
if self.representative_number:
representative_number = self.representative_number
representative = partner_obj.search([('national_register_number','=',representative_number)])
if representative: if representative:
if len(representative) > 1: if len(representative) > 1:

Loading…
Cancel
Save