[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
This commit is contained in:
Christophe Matthieu 2012-11-28 09:33:49 +01:00
commit b41ee4833e
2 changed files with 8 additions and 4 deletions

View File

@ -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);
},

View File

@ -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>