Browse Source

[FIX] easy_my_coop_website: country field mandatory, fix default id of 'Belgium' when not found

pull/105/head
Manuel Claeys Bouuaert 4 years ago
parent
commit
71a618a453
  1. 4
      easy_my_coop_website/controllers/main.py
  2. 2
      easy_my_coop_website/views/subscription_template.xml

4
easy_my_coop_website/controllers/main.py

@ -199,12 +199,12 @@ class WebsiteSubscription(http.Controller):
if company.default_country_id:
values["country_id"] = company.default_country_id.id
else:
values["country_id"] = "21"
values["country_id"] = "20"
if not values.get("activities_country_id"):
if company.default_country_id:
values["activities_country_id"] = company.default_country_id.id
else:
values["activities_country_id"] = "21"
values["activities_country_id"] = "20"
if not values.get("lang"):
if company.default_lang_id:
values["lang"] = company.default_lang_id.code

2
easy_my_coop_website/views/subscription_template.xml

@ -309,6 +309,7 @@
</label>
<select name="country_id"
class="col-md-7 col-sm-8 form-control "
required="True"
t-att-readonly="logged"
style="width:54%;margin-left:15px">
<option value="">Country...</option>
@ -720,6 +721,7 @@
</label>
<select name="country_id"
class="col-md-7 col-sm-8 form-control"
required="True"
t-att-readonly="logged"
style="width:54%;margin-left:15px">
<option value="">Country...</option>

Loading…
Cancel
Save