From 8d7fa459db2244b68006906cf2a0d9dd6a753d2b Mon Sep 17 00:00:00 2001 From: houssine Date: Tue, 20 Mar 2018 16:37:12 +0100 Subject: [PATCH] [IMP] add representative name the company subscription request --- easy_my_coop/wizard/create_subscription_from_partner.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easy_my_coop/wizard/create_subscription_from_partner.py b/easy_my_coop/wizard/create_subscription_from_partner.py index 72ae484..faf922d 100644 --- a/easy_my_coop/wizard/create_subscription_from_partner.py +++ b/easy_my_coop/wizard/create_subscription_from_partner.py @@ -177,7 +177,10 @@ class PartnerCreateSubscription(models.TransientModel): partner_bank.create({'partner_id':cooperator.id, 'acc_number':self.bank_account}) vals['iban'] = self.bank_account - + if self.is_company: + representative = self._get_representative() + vals['name'] = representative.name + if coop_vals: cooperator.write(coop_vals)