Browse Source

[FIX] assign created partner to self if created

12.0-small-changes
houssine 5 years ago
committed by robin.keunen
parent
commit
228820b458
  1. 3
      easy_my_coop/models/coop.py

3
easy_my_coop/models/coop.py

@ -555,6 +555,7 @@ class SubscriptionRequest(models.Model):
if not partner:
partner = self.create_coop_partner()
self.partner_id = partner
else:
partner = partner[0]
@ -585,7 +586,7 @@ class SubscriptionRequest(models.Model):
'representative': True})
invoice = self.create_invoice(partner)
self.write({'partner_id': partner.id, 'state': 'done'})
self.write({'state': 'done'})
self.set_membership()
return invoice

Loading…
Cancel
Save