Harry (OpenERP) has proposed merging lp:~openerp-dev/openerp-web/trunk-first-10clicks-accounting-tta into lp:openerp-web.
Requested reviews: OpenERP R&D Web Team (openerp-dev-web) For more details, see: https://code.launchpad.net/~openerp-dev/openerp-web/trunk-first-10clicks-accounting-tta/+merge/135060 -- https://code.launchpad.net/~openerp-dev/openerp-web/trunk-first-10clicks-accounting-tta/+merge/135060 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openerp-web/trunk-first-10clicks-accounting-tta.
=== modified file 'addons/web/static/src/js/view_form.js' --- addons/web/static/src/js/view_form.js 2012-11-19 14:37:19 +0000 +++ addons/web/static/src/js/view_form.js 2012-11-20 06:26:02 +0000 @@ -2247,7 +2247,9 @@ 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); }, @@ -4034,6 +4036,8 @@ return this.get("value"); }, render_value: function() { + if (this.get("effective_readonly")) + return; var self = this; var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.build_context()); var values = self.get("value"); === modified file 'addons/web/static/src/xml/base.xml' --- addons/web/static/src/xml/base.xml 2012-11-16 10:08:40 +0000 +++ addons/web/static/src/xml/base.xml 2012-11-20 06:26:02 +0000 @@ -673,13 +673,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"> @@ -1018,6 +1020,7 @@ <span class="oe_form_field oe_datepicker_root oe_form_field_datetime" t-att-style="widget.node.attrs.style"/> </t> <t t-name="FieldSelection"> + <t t-set="placeholder" t-value="! widget.get('effective_readonly') ? widget.node.attrs.placeholder : ''"/> <span class="oe_form_field oe_form_field_selection" t-att-style="widget.node.attrs.style"> <select t-if="!widget.get('effective_readonly')" t-att-name="widget.name" @@ -1025,7 +1028,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="placeholder" t-if="option[0] == false"/><t t-esc="option[1]" t-if="option[0] != false"/></option> </t> </select> </span>
_______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : openerp-dev-gtk@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp