|
@ -10,7 +10,7 @@ from odoo.tools.translate import _ |
|
|
_TECHNICAL = ["view_from", "view_callback"] |
|
|
_TECHNICAL = ["view_from", "view_callback"] |
|
|
|
|
|
|
|
|
# transient fields used to compute the address field |
|
|
# transient fields used to compute the address field |
|
|
_EXTRA_FIELDS = ["street_name", "house_number"] |
|
|
|
|
|
|
|
|
_EXTRA_FIELDS = [] |
|
|
|
|
|
|
|
|
# Allow in description |
|
|
# Allow in description |
|
|
_BLACKLIST = [ |
|
|
_BLACKLIST = [ |
|
@ -31,8 +31,7 @@ _COOP_FORM_FIELD = [ |
|
|
"birthdate", |
|
|
"birthdate", |
|
|
"iban", |
|
|
"iban", |
|
|
"share_product_id", |
|
|
"share_product_id", |
|
|
"street_name", |
|
|
|
|
|
"house_number", |
|
|
|
|
|
|
|
|
"address", |
|
|
"city", |
|
|
"city", |
|
|
"zip_code", |
|
|
"zip_code", |
|
|
"country_id", |
|
|
"country_id", |
|
@ -55,8 +54,7 @@ _COMPANY_FORM_FIELD = [ |
|
|
"birthdate", |
|
|
"birthdate", |
|
|
"iban", |
|
|
"iban", |
|
|
"share_product_id", |
|
|
"share_product_id", |
|
|
"street_name", |
|
|
|
|
|
"house_number", |
|
|
|
|
|
|
|
|
"address", |
|
|
"city", |
|
|
"city", |
|
|
"zip_code", |
|
|
"zip_code", |
|
|
"country_id", |
|
|
"country_id", |
|
@ -301,7 +299,8 @@ class WebsiteSubscription(http.Controller): |
|
|
if error: |
|
|
if error: |
|
|
values = self.fill_values(values, is_company, logged) |
|
|
values = self.fill_values(values, is_company, logged) |
|
|
values["error_msg"] = _( |
|
|
values["error_msg"] = _( |
|
|
"Some mandatory fields have not " "been filled" |
|
|
|
|
|
|
|
|
"Some mandatory fields have not " |
|
|
|
|
|
"been filled (%s)" % error |
|
|
) |
|
|
) |
|
|
values = dict(values, error=error, kwargs=kwargs.items()) |
|
|
values = dict(values, error=error, kwargs=kwargs.items()) |
|
|
return request.render(redirect, values) |
|
|
return request.render(redirect, values) |
|
@ -344,7 +343,8 @@ class WebsiteSubscription(http.Controller): |
|
|
return request.render(redirect, values) |
|
|
return request.render(redirect, values) |
|
|
|
|
|
|
|
|
iban = kwargs.get("iban") |
|
|
iban = kwargs.get("iban") |
|
|
if iban.strip(): |
|
|
|
|
|
|
|
|
if iban: |
|
|
|
|
|
iban.strip() |
|
|
valid = sub_req_obj.check_iban(iban) |
|
|
valid = sub_req_obj.check_iban(iban) |
|
|
|
|
|
|
|
|
if not valid: |
|
|
if not valid: |
|
@ -469,13 +469,6 @@ class WebsiteSubscription(http.Controller): |
|
|
|
|
|
|
|
|
values["share_product_id"] = self.get_selected_share(kwargs).id |
|
|
values["share_product_id"] = self.get_selected_share(kwargs).id |
|
|
|
|
|
|
|
|
values["address"] = "{street}, {number}".format( |
|
|
|
|
|
street=kwargs.get("street_name", ""), |
|
|
|
|
|
number=kwargs.get("house_number", ""), |
|
|
|
|
|
) |
|
|
|
|
|
del values["street_name"] |
|
|
|
|
|
del values["house_number"] |
|
|
|
|
|
|
|
|
|
|
|
if is_company: |
|
|
if is_company: |
|
|
if kwargs.get("company_register_number", is_company): |
|
|
if kwargs.get("company_register_number", is_company): |
|
|
values["company_register_number"] = re.sub( |
|
|
values["company_register_number"] = re.sub( |
|
|