Browse Source

[REFACT]

pull/1/head
houssine 7 years ago
parent
commit
caed295c89
  1. 4
      easy_my_coop/models/coop.py

4
easy_my_coop/models/coop.py

@ -269,6 +269,8 @@ class subscription_request(models.Model):
if not partner:
partner = self.create_coop_partner()
else:
partner = partner[0]
if self.is_company:
contact = partner_obj.search([('national_register_number','=',self.no_registre)])
@ -286,8 +288,6 @@ class subscription_request(models.Model):
raise UserError(_('This contact person is already defined for another company. Please select another contact'))
else:
contact.parent_id = partner.id
else:
partner = partner[0]
invoice = self.create_invoice(partner)
self.write({'partner_id':partner.id, 'state':'done'})

Loading…
Cancel
Save