Skip to content
Snippets Groups Projects
Commit 2c5fe07f authored by Ward Marissen's avatar Ward Marissen Committed by Jeremy Kersten
Browse files

[FIX] website_portal: Keep country changes

When a portal user changes his account details and presses the 'Save' button
when a mandatory field is not set, the selected country will be reset even when
the user did change the country in the form. This fix prevents this from
happening and leads to an improvement for the end user.

This commit closes #22439
parent 6bd3bae0
Branches
Tags
No related merge requests found
......@@ -113,7 +113,7 @@
<select name="country_id" class="form-control">
<option value="">Country...</option>
<t t-foreach="countries or []" t-as="country">
<option t-att-value="country.id" t-att-selected="country.id == partner.country_id.id">
<option t-att-value="country.id" t-att-selected="country.id == int(country_id) if country_id else country.id == partner.country_id.id">
<t t-esc="country.name" />
</option>
</t>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment