From efaaa4b547f9c0730e56f8122b4a190523cb2eeb Mon Sep 17 00:00:00 2001 From: houssine Date: Fri, 2 Feb 2018 15:59:54 +0100 Subject: [PATCH] [IMP] if the cooperator candidate is connected we tie the related partner to the cooperator subscription. --- easy_my_coop/controllers/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/easy_my_coop/controllers/main.py b/easy_my_coop/controllers/main.py index 9cf7c32..04d5b97 100644 --- a/easy_my_coop/controllers/main.py +++ b/easy_my_coop/controllers/main.py @@ -169,7 +169,11 @@ class WebsiteSubscription(http.Controller): post_description.append("%s: %s" % (field_name, field_value)) logged = kwargs.get("logged")=='on' - + if logged: + partner = request.env.user.partner_id + values['partner_id'] = partner.id + values['already_cooperator'] = partner.member + is_company = False if kwargs.get("is_company") == 'on': is_company = True