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