From 232b43206859f89d0b925c6e21b35e398c3a8a57 Mon Sep 17 00:00:00 2001 From: houssine Date: Mon, 18 Dec 2017 15:55:16 +0100 Subject: [PATCH] [FIX] set the res partner name in company_name when partner is a company --- easy_my_coop/wizard/create_subscription_from_partner.py | 3 ++- 1 file changed, 2 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 7111dcb..0d19f70 100644 --- a/easy_my_coop/wizard/create_subscription_from_partner.py +++ b/easy_my_coop/wizard/create_subscription_from_partner.py @@ -76,16 +76,17 @@ class PartnerCreateSubscription(models.TransientModel): sub_req = self.env['subscription.request'] cooperator = self.cooperator vals = {'partner_id': cooperator.id, - 'name': cooperator.name, 'share_product_id':self.share_product.id, 'ordered_parts':self.share_qty, 'user_id':self.env.uid, 'source':'crm'} if self.is_company: + vals['company_name'] = self.cooperator.name vals['company_register_number'] = self.register_number vals['is_company'] = True else: + vals['name'] = self.cooperator.name vals['no_registre'] = self.register_number if not self._get_register_number():