diff --git a/web_pivot_computed_measure/__manifest__.py b/web_pivot_computed_measure/__manifest__.py index b347deb0c..c55cc3d00 100644 --- a/web_pivot_computed_measure/__manifest__.py +++ b/web_pivot_computed_measure/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Web Pivot Computed Measure", "category": "web", - "version": "13.0.1.0.0", + "version": "13.0.1.1.0", "author": "Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", "website": "https://github.com/OCA/web", diff --git a/web_pivot_computed_measure/static/src/js/pivot_controller.js b/web_pivot_computed_measure/static/src/js/pivot_controller.js index 4adcbe4f1..68c9df0b3 100644 --- a/web_pivot_computed_measure/static/src/js/pivot_controller.js +++ b/web_pivot_computed_measure/static/src/js/pivot_controller.js @@ -176,7 +176,8 @@ odoo.define("web_pivot_computed_measure.PivotController", function(require) { if ($(ev.target).val() === "custom") { this.$buttons_measures_ex .find("#container_computed_measure_operation_custom") - .removeClass("d-none"); + .removeClass("d-none") + .addClass("d-table-row"); } else { const format = $option.data("format"); if (format) { @@ -186,6 +187,7 @@ odoo.define("web_pivot_computed_measure.PivotController", function(require) { } this.$buttons_measures_ex .find("#container_computed_measure_operation_custom") + .removeClass("d-table-row") .addClass("d-none"); } }, diff --git a/web_pivot_computed_measure/static/src/scss/web_pivot_computed_measure.scss b/web_pivot_computed_measure/static/src/scss/web_pivot_computed_measure.scss new file mode 100644 index 000000000..514ef93df --- /dev/null +++ b/web_pivot_computed_measure/static/src/scss/web_pivot_computed_measure.scss @@ -0,0 +1,9 @@ +#add_computed_measure_wrapper { + padding: 0 20px; + min-width: 300px; + white-space: nowrap; + .d-table-cell { + vertical-align: middle; + padding: 3px 0; + } +} diff --git a/web_pivot_computed_measure/static/src/xml/web_pivot_computed_measure.xml b/web_pivot_computed_measure/static/src/xml/web_pivot_computed_measure.xml index 3d609509b..a00fff183 100644 --- a/web_pivot_computed_measure/static/src/xml/web_pivot_computed_measure.xml +++ b/web_pivot_computed_measure/static/src/xml/web_pivot_computed_measure.xml @@ -59,73 +59,98 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - - Measure 1 - + + + Measure 1 + + + + + + + + + + + + + + Measure 2 + + + + + + + + + + + + + + Operation + + + + + + + + - - - - - - - - - Measure 2 - - - - - - - - - - Operation - - - - - - Formula - - - - Name - - - - Format - - - - - - Add + + Formula + + + + + + + + Name + + + + + + + + Format + + + + + + + + + + Add + + diff --git a/web_pivot_computed_measure/view/assets.xml b/web_pivot_computed_measure/view/assets.xml index a198579b5..682bff45d 100644 --- a/web_pivot_computed_measure/view/assets.xml +++ b/web_pivot_computed_measure/view/assets.xml @@ -10,6 +10,10 @@ type="text/javascript" src="/web_pivot_computed_measure/static/src/js/pivot_controller.js" /> +