From 971826eace8e369de11c190fa90848054fb89c40 Mon Sep 17 00:00:00 2001 From: houssine Date: Mon, 16 Jul 2018 17:51:35 +0200 Subject: [PATCH] [FIX] fix special case for is_company value --- easy_my_coop/controllers/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easy_my_coop/controllers/main.py b/easy_my_coop/controllers/main.py index 5fcb0b1..923597d 100644 --- a/easy_my_coop/controllers/main.py +++ b/easy_my_coop/controllers/main.py @@ -113,6 +113,8 @@ class WebsiteSubscription(http.Controller): values['company_types'] = fields_desc['company_type']['selection'] values['genders'] = fields_desc['gender']['selection'] values['company'] = company + if is_company: + values['is_company'] = 'on' if not values.get('share_product_id'): products = request.env['product.template'].sudo().get_web_share_products(is_company) @@ -190,7 +192,7 @@ class WebsiteSubscription(http.Controller): values = self.fill_values(values,is_company) values["error_msg"] = _("the captcha has not been validated, please fill in the captcha") - return request.website.render(kwargs.get("view_from", redirect), values) + return request.website.render(redirect, values) if not logged and email: user = user_obj.sudo().search([('login','=',email)])