From fae65a36e7c93bad72dcc9c1b64bc4f46d3fcfec Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Fri, 29 Jan 2016 15:44:27 +0100 Subject: [FIX] web: css for address format based on country In 9.0's 05adb7f the `
` 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 `
` 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 --- .../static/src/less/enterprise_compatibility.less | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'addons/web/static/src/less') 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%; + } + } } } -- cgit v1.2.3