[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
This commit is contained in:
committed by
Jeremy Kersten
parent
6bd3bae04e
commit
2c5fe07fc7
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user