summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2016-01-29 15:44:27 +0100
committerNicolas Lempereur <nle@odoo.com>2016-03-21 14:38:16 +0100
commitfae65a36e7c93bad72dcc9c1b64bc4f46d3fcfec (patch)
treec9308b9eca29802c713e31152e46d474b6da70e0 /addons/web/static
parent8e1c74766610a8551f07e7d237807ed8433782d0 (diff)
[FIX] web: css for address format based on country
In 9.0's 05adb7f the `<div class="address_format"/>` wrapping an address city, state_id and zip fields was removed. There is a hack on fields_view_get which transform this block depending on the company country, so without the block the feature isn't enabled. This commit adds a class on the new block `<div class="address_format"/>` used to wrap the whole address which will change the sizing of the city, state_id and zip fields as it was before version 9. To fully follow what was done previously, the zip is aldo moved before the city if the address format needs it. Thus we now have as before the three format as follows: [default format] city state zip [format .o_city_state (brazil)] city state zip [format .o_zip_city (belgium, netherlands, ...)] zip city state Another change is brought by this commit, before most element attributes from city, state_id and zip fields were lost whilst doing the hack, now they are all kept. closes #10692 opw-666567
Diffstat (limited to 'addons/web/static')
-rw-r--r--addons/web/static/src/less/enterprise_compatibility.less43
1 files changed, 43 insertions, 0 deletions
diff --git a/addons/web/static/src/less/enterprise_compatibility.less b/addons/web/static/src/less/enterprise_compatibility.less
index 7dc4238f684..74b5e99abf1 100644
--- a/addons/web/static/src/less/enterprise_compatibility.less
+++ b/addons/web/static/src/less/enterprise_compatibility.less
@@ -326,6 +326,27 @@ div.o_checkbox {
> .o_address_zip {
margin-right: 0;
}
+ &.o_zip_city {
+ > .o_address_zip {
+ margin-right: 2%;
+ }
+ > .o_address_city {
+ margin-right: 0;
+ }
+ > .o_address_state {
+ clear: left;
+ margin-right: 0;
+ }
+ }
+ &.o_city_state {
+ > .o_address_state {
+ margin-right: 0;
+ }
+ > .o_address_zip {
+ clear: left;
+ margin-right: 0;
+ }
+ }
}
&.oe_form_editable .o_address_format {
> .o_address_city {
@@ -337,6 +358,28 @@ div.o_checkbox {
> .o_address_zip {
width: 25%;
}
+ &.o_zip_city {
+ > .o_address_zip {
+ width: 38%;
+ }
+ > .o_address_city {
+ width: 60%;
+ }
+ > .o_address_state {
+ width: 100%;
+ }
+ }
+ &.o_city_state {
+ > .o_address_city {
+ width: 50%;
+ }
+ > .o_address_state {
+ width: 48%;
+ }
+ > .o_address_zip {
+ width: 100%;
+ }
+ }
}
}