|
|
@ -175,14 +175,16 @@ class WebsiteSubscription(http.Controller): |
|
|
|
values['partner_id'] = partner.id |
|
|
|
values['already_cooperator'] = partner.member |
|
|
|
|
|
|
|
is_company = False |
|
|
|
if kwargs.get("is_company") == 'on': |
|
|
|
is_company = True |
|
|
|
values["is_company"] = is_company |
|
|
|
|
|
|
|
redirect = "easy_my_coop.becomecooperator" |
|
|
|
email = kwargs.get('email') |
|
|
|
|
|
|
|
is_company = kwargs.get("is_company") == 'on' |
|
|
|
if is_company: |
|
|
|
redirect = "easy_my_coop.becomecompanycooperator" |
|
|
|
is_company = True |
|
|
|
redirect = "easy_my_coop.becomecompanycooperator" |
|
|
|
email = kwargs.get('company_email') |
|
|
|
|
|
|
|
values["is_company"] = is_company |
|
|
|
|
|
|
|
if not kwargs.has_key('g-recaptcha-response') or not request.website.is_captcha_valid(kwargs['g-recaptcha-response']): |
|
|
|
values = self.fill_values(values,is_company) |
|
|
@ -190,8 +192,8 @@ class WebsiteSubscription(http.Controller): |
|
|
|
|
|
|
|
return request.website.render(kwargs.get("view_from", redirect), values) |
|
|
|
|
|
|
|
if not logged and kwargs.has_key('email'): |
|
|
|
user = user_obj.sudo().search([('login','=',kwargs.get("email"))]) |
|
|
|
if not logged and email: |
|
|
|
user = user_obj.sudo().search([('login','=',email)]) |
|
|
|
if user: |
|
|
|
values = self.fill_values(values,is_company) |
|
|
|
values.update(kwargs) |
|
|
|