summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvm-odoo <jvm@odoo.com>2020-03-20 10:02:28 +0000
committerjvm-odoo <jvm@odoo.com>2020-03-27 08:24:12 +0000
commit1bfd21b6dc39dade9b4cd9bbfa2881044aedb082 (patch)
tree0aa9f501f229508c87359911dc1e39953114c8ea
parentcc7d9a6032082fa32949c8cf0bdec2c1f7eb9b6f (diff)
[FIX] sale, sale_management: fix mobile quantity input in SO template
Issue - Install eCommerce with any theme - Website > Enable optional product - Create a SO with an optional product - Save > Customer Preview - Mobile view with inspector - Click on the shopping cart icon in the optional product line Quantity selector is not correctly displayed Cause First, the input width is 50%, which means very small on mobile and there are paddings on the input and the buttons Solution Remove the 50% width and paddings on mobile It allows to see 3 chars on very small mobile screen. OPW-2220893 closes odoo/odoo#48423 X-original-commit: 38e90e09239eb75bd25001c7870758b380159ad0 Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
-rw-r--r--addons/sale/static/src/scss/sale_portal.scss12
-rw-r--r--addons/sale_management/views/sale_portal_templates.xml6
2 files changed, 15 insertions, 3 deletions
diff --git a/addons/sale/static/src/scss/sale_portal.scss b/addons/sale/static/src/scss/sale_portal.scss
index 5bf4aefcb51..a9d57cff022 100644
--- a/addons/sale/static/src/scss/sale_portal.scss
+++ b/addons/sale/static/src/scss/sale_portal.scss
@@ -14,3 +14,15 @@
.sale_tbody .o_line_note {
word-break: break-all;
}
+
+.o_portal .sale_tbody .js_quantity_container {
+ width: 50%;
+
+ .js_quantity {
+ text-align: center;
+ }
+
+ @include media-breakpoint-down(sm) {
+ width: 100%;
+ }
+} \ No newline at end of file
diff --git a/addons/sale_management/views/sale_portal_templates.xml b/addons/sale_management/views/sale_portal_templates.xml
index d248f2d2c2d..b29f06c08f5 100644
--- a/addons/sale_management/views/sale_portal_templates.xml
+++ b/addons/sale_management/views/sale_portal_templates.xml
@@ -79,10 +79,10 @@
<xpath expr="//section[@id='details']//div[@id='quote_qty']" position="replace">
<t t-if="sale_order.state in ['draft', 'sent'] and line.sale_order_option_ids">
- <div class="input-group w-50 pull-right">
+ <div class="input-group js_quantity_container pull-right">
<div class="input-group-prepend d-print-none">
- <span class="input-group-text">
+ <span class="input-group-text d-none d-md-inline-block">
<a t-att-data-line-id="line.id" t-att-data-remove="True" href="#" class="js_update_line_json" aria-label="Remove one" title="Remove one">
<span class="fa fa-minus"/>
</a>
@@ -91,7 +91,7 @@
<!-- TODO add uom in this case too -->
<input type="text" class="js_quantity form-control" t-att-data-line-id="line.id" t-att-value="line.product_uom_qty"/>
<div class="input-group-append d-print-none">
- <span class="input-group-text">
+ <span class="input-group-text d-none d-md-inline-block">
<a t-att-data-line-id="line.id" href="#" class="js_update_line_json" aria-label="Add one" title="Add one">
<span class="fa fa-plus"/>
</a>