|
|
@ -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'}) |
|
|
|