Browse Source

[IMP] if the partner tied to the connected user is a company the request

is forwarded to the company subscription form
pull/1/head
houssine 7 years ago
parent
commit
c849e01280
  1. 5
      easy_my_coop/controllers/main.py

5
easy_my_coop/controllers/main.py

@ -18,7 +18,10 @@ class WebsiteSubscription(http.Controller):
@http.route(['/page/become_cooperator','/become_cooperator'], type='http', auth="public", website=True)
def display_become_cooperator_page(self, **kwargs):
values = {}
if request.env.user.login != 'public':
partner = request.env.user.partner_id
if partner.is_company:
return request.website.render("easy_my_coop.becomecompanycooperator", values)
values = self.fill_values(values,False,True)
for field in ['email','firstname','lastname','birthdate','iban','share_product_id','no_registre','address','city','zip_code','country_id','phone','lang','nb_parts','total_parts','error_msg']:

Loading…
Cancel
Save