summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2012-11-28 09:33:49 +0100
committerChristophe Matthieu <chm@openerp.com>2012-11-28 09:33:49 +0100
commitb41ee4833ef54d7d6b35fe879c0d5b426d342c2d (patch)
treedb93fdcd59f8eeff6d2c674120b3d4d0eac34c94 /addons/web/static
parent4c7229f2c396c542067163df7d5b127ced9e5f2c (diff)
parent81a2e23dd60800386708b9b4986f5ad2cf9d29af (diff)
[MERGE] from trunk-first-10clicks-accounting-tta; Selection Placeholder. No traceback py but a warning/constraint message for wrong value insert for float and int.
bzr revid: chm@openerp.com-20121128083349-qfnl5rbaprq7hlh6
Diffstat (limited to 'addons/web/static')
-rw-r--r--addons/web/static/src/js/view_form.js4
-rw-r--r--addons/web/static/src/xml/base.xml8
2 files changed, 8 insertions, 4 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index b0ad23d6854..5f4753b19ec 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -2246,7 +2246,9 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
var self = this;
var $input = this.$el.find('input');
$input.change(function() {
- self.internal_set_value(self.parse_value($input.val()));
+ if(self.is_syntax_valid()){
+ self.internal_set_value(self.parse_value($input.val()));
+ }
});
this.setupFocus($input);
},
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index b1bd959e4fb..2099800c2a6 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -681,13 +681,15 @@
</tr>
</tfoot>
</table>
-<div t-name="ListView.buttons" class="oe_list_buttons">
+<t t-name="ListView.buttons">
+ <div class="oe_list_buttons">
<t t-if="!widget.no_leaf and widget.options.action_buttons !== false and widget.options.addable and widget.is_action_enabled('create')">
<button type="button" class="oe_button oe_list_add oe_highlight">
<t t-esc="widget.options.addable"/>
</button>
</t>
-</div>
+ </div>
+</t>
<t t-name="ListView.pager">
<div class="oe_list_pager" t-att-colspan="widget.columns_count">
<t t-if="!widget.no_leaf and widget.options.pager !== false" t-call="ViewPager">
@@ -1033,7 +1035,7 @@
t-att-autofocus="widget.node.attrs.autofocus"
t-att-id="widget.id_for_label">
<t t-foreach="widget.values" t-as="option">
- <option><t t-esc="option[1]"/></option>
+ <option><t t-esc="widget.node.attrs.placeholder" t-if="option[0] == false and widget.node.attrs.placeholder"/><t t-esc="option[1]" t-if="option[0] != false"/></option>
</t>
</select>
</span>