Browse Source

[FIX] fix case where register company number are not used

pull/1/head
houssine 7 years ago
parent
commit
e455c54b1d
  1. 2
      easy_my_coop/models/coop.py

2
easy_my_coop/models/coop.py

@ -296,7 +296,7 @@ class subscription_request(models.Model):
else: else:
if self.already_cooperator: if self.already_cooperator:
raise UserError(_('The checkbox already cooperator is checked please select a cooperator.')) raise UserError(_('The checkbox already cooperator is checked please select a cooperator.'))
elif self.is_company:
elif self.is_company and self.company_register_number:
partner = partner_obj.search([('company_register_number','=',self.company_register_number)]) partner = partner_obj.search([('company_register_number','=',self.company_register_number)])
elif self.no_registre: elif self.no_registre:
partner = partner_obj.search([('national_register_number','=',self.no_registre)]) partner = partner_obj.search([('national_register_number','=',self.no_registre)])

Loading…
Cancel
Save