[IMP] web_widget_one2many_product_picker: Enlarge the 'Add 1' button

pull/1858/head
Alexandre D. Díaz 2021-03-08 18:35:15 +01:00
parent da2a6cb041
commit 6b3066285c
7 changed files with 29 additions and 33 deletions

View File

@ -4,7 +4,7 @@
{
'name': 'Web Widget One2Many Product Picker',
'summary': 'Widget to select products on one2many fields',
'version': '12.0.2.1.0',
'version': '12.0.2.2.0',
'category': 'Website',
'author': "Tecnativa, "
"Odoo Community Association (OCA)",

View File

@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_one2many_product_picker
# * web_widget_one2many_product_picker
#
msgid ""
msgstr ""
@ -23,13 +23,6 @@ msgstr ""
msgid "Add"
msgstr "Afegir"
#. module: web_widget_one2many_product_picker
#. openerp-web
#: code:addons/web_widget_one2many_product_picker/static/src/xml/one2many_product_picker.xml:84
#, python-format
msgid "Add 1"
msgstr "Afegir 1"
#. module: web_widget_one2many_product_picker
#. openerp-web
#: code:addons/web_widget_one2many_product_picker/static/src/js/widgets/field_one2many_product_picker.js:192
@ -93,14 +86,18 @@ msgstr "Subtotal:"
#. module: web_widget_one2many_product_picker
#: model:ir.model.fields,help:web_widget_one2many_product_picker.field_product_product__image_variant_medium
msgid "This field holds the image used as image for the product variantor product image medium, limited to 512x512px."
msgid ""
"This field holds the image used as image for the product variantor product "
"image medium, limited to 512x512px."
msgstr ""
"Aquest camp conté la imatge que s'utilitza com a imatge per al mitjà "
"d'imatge del producte que varia el producte, limitada a 512x512px."
#. module: web_widget_one2many_product_picker
#: model:ir.model.fields,help:web_widget_one2many_product_picker.field_product_product__image_variant_big
msgid "This field holds the image used as image for the product variantor product image, limited to 1024x1024px."
msgid ""
"This field holds the image used as image for the product variantor product "
"image, limited to 1024x1024px."
msgstr ""
"Aquest camp conté la imatge que s'utilitza com a imatge per al mitjà "
"d'imatge del producte que varia el producte, limitada a 1024x1024px."
@ -121,3 +118,6 @@ msgstr "Imatge variant mitjana ( calculada)"
#, python-format
msgid "[No widget %s]"
msgstr "[Sense widget %s]"
#~ msgid "Add 1"
#~ msgstr "Afegir 1"

View File

@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_one2many_product_picker
# * web_widget_one2many_product_picker
#
msgid ""
msgstr ""
@ -23,13 +23,6 @@ msgstr ""
msgid "Add"
msgstr "Añadir"
#. module: web_widget_one2many_product_picker
#. openerp-web
#: code:addons/web_widget_one2many_product_picker/static/src/xml/one2many_product_picker.xml:84
#, python-format
msgid "Add 1"
msgstr "Añadir 1"
#. module: web_widget_one2many_product_picker
#. openerp-web
#: code:addons/web_widget_one2many_product_picker/static/src/js/widgets/field_one2many_product_picker.js:192
@ -93,14 +86,18 @@ msgstr "Subtotal:"
#. module: web_widget_one2many_product_picker
#: model:ir.model.fields,help:web_widget_one2many_product_picker.field_product_product__image_variant_medium
msgid "This field holds the image used as image for the product variantor product image medium, limited to 512x512px."
msgid ""
"This field holds the image used as image for the product variantor product "
"image medium, limited to 512x512px."
msgstr ""
"Aquest camp conté la imatge que s'utilitza com a imatge per al mitjà "
"d'imatge del producte que varia el producte, limitada a 512x512px."
#. module: web_widget_one2many_product_picker
#: model:ir.model.fields,help:web_widget_one2many_product_picker.field_product_product__image_variant_big
msgid "This field holds the image used as image for the product variantor product image, limited to 1024x1024px."
msgid ""
"This field holds the image used as image for the product variantor product "
"image, limited to 1024x1024px."
msgstr ""
"Aquest camp conté la imatge que s'utilitza com a imatge per al mitjà "
"d'imatge del producte que varia el producte, limitada a 1024x1024px."
@ -121,3 +118,6 @@ msgstr "Imagen variante media (calculada)"
#, python-format
msgid "[No widget %s]"
msgstr "[Sin widget %s]"
#~ msgid "Add 1"
#~ msgstr "Añadir 1"

View File

@ -20,13 +20,6 @@ msgstr ""
msgid "Add"
msgstr ""
#. module: web_widget_one2many_product_picker
#. openerp-web
#: code:addons/web_widget_one2many_product_picker/static/src/xml/one2many_product_picker.xml:84
#, python-format
msgid "Add 1"
msgstr ""
#. module: web_widget_one2many_product_picker
#. openerp-web
#: code:addons/web_widget_one2many_product_picker/static/src/js/widgets/field_one2many_product_picker.js:192

View File

@ -649,6 +649,9 @@ odoo.define("web_widget_one2many_product_picker.One2ManyProductPickerRecord", fu
this._incProductQty(1);
this._doInteractAnim(evt.target, evt.currentTarget);
return;
} else if ($target.hasClass('safezone')) {
// Do nothing on safe zones
return;
}
}
if (!this._clickFlipCardDelayed) {

View File

@ -255,4 +255,4 @@
100% {
transform: scale(1.0);
}
}
}

View File

@ -75,13 +75,13 @@
<div t-attf-class="oe_flip_card_front p-0 {{(modified &amp;&amp; 'border-warning') || (state &amp;&amp; !is_virtual &amp;&amp; 'border-success') || ''}}">
<t t-if="state">
<t t-if="!is_virtual">
<div class="position-absolute m-0 text-left">
<span t-att-data-field="field_map.product_uom_qty" t-attf-data-esc="str({{field_map.product_uom_qty}}) + ' x ' + {{field_map.product_uom}}.data.display_name" t-attf-class="badge {{modified &amp;&amp; 'badge-warning' || 'badge-success'}} font-weight-bold rounded-0 mt-1 p-2 product_qty" />
<div class="safezone position-absolute m-0 pb-2 pr-2 text-left">
<span t-att-data-field="field_map.product_uom_qty" t-attf-data-esc="str({{field_map.product_uom_qty}}) + ' x ' + {{field_map.product_uom}}.data.display_name" t-attf-class="badge {{modified &amp;&amp; 'badge-warning' || 'badge-success'}} font-weight-bold rounded-0 mt-0 px-2 py-3 product_qty" />
</div>
</t>
<t t-else="">
<div class="position-absolute m-0 text-left">
<span class="badge badge-primary font-weight-bold rounded-0 mt-1 p-2 add_product"><i class="fa fa-plus"></i> Add 1 <t t-esc="state.data[field_map.product_uom].data.display_name"/></span>
<div class="safezone position-absolute m-0 pb-2 pr-2 text-left">
<span class="badge badge-primary font-weight-bold rounded-0 mt-0 px-2 py-3 add_product"><i class="fa fa-plus"></i> 1 <t t-esc="state.data[field_map.product_uom].data.display_name"/></span>
</div>
</t>
<div class="position-absolute m-0 text-left badge_price">