[FIX] base: correct spanish address format

Commit 8889a896f introduced the state in the address format for spain
between parentheses, however if the state is unset this leads to weird
values like
```
Isabella López Navarro
()
Spain
```
which is bad.

This commit instead formats spanish addresses by adding the state below
the Zip+City line and above the Country, as suggested here:
https://en.wikipedia.org/wiki/Address#Spain

This avoids empty parentheses.

Task-3679058

closes odoo/odoo#149012

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
This commit is contained in:
Damien Bouvy
2024-01-11 15:16:24 +00:00
parent e660cd94a8
commit 128032a8b1
+1 -1
View File
@@ -440,7 +440,7 @@
<record id="es" model="res.country">
<field name="name">Spain</field>
<field name="code">es</field>
<field eval="'%(street)s\n%(street2)s\n%(zip)s %(city)s (%(state_name)s)\n%(country_name)s'" name="address_format"/>
<field eval="'%(street)s\n%(street2)s\n%(zip)s %(city)s\n%(state_name)s\n%(country_name)s'" name="address_format"/>
<field name="currency_id" ref="EUR" />
<field eval="34" name="phone_code" />
<field name="vat_label">VAT</field>