Mohammed Shekha(Open ERP) has proposed merging 
lp:~openerp-dev/openerp-web/6.1-opw-573377-msh into lp:openerp-web/6.1.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-573377-msh/+merge/100734

Hello,

Fixed the issue of size attrs which was not working with char field, if size of 
the char field is 64 and some enters 65 character still it allow us to enter 65 
character and allow to save.

Hence prevent to enter more character than size.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-573377-msh/+merge/100734
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/6.1-opw-573377-msh.
=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js	2012-03-05 19:58:00 +0000
+++ addons/web/static/src/js/view_form.js	2012-04-04 06:37:21 +0000
@@ -1451,6 +1451,7 @@
     template: 'FieldChar',
     init: function (view, node) {
         this._super(view, node);
+        this.size = view.fields_view.fields[node.attrs.name].size;
         this.password = this.node.attrs.password === 'True' || this.node.attrs.password === '1';
     },
     start: function() {

=== modified file 'addons/web/static/src/xml/base.xml'
--- addons/web/static/src/xml/base.xml	2012-03-20 10:56:01 +0000
+++ addons/web/static/src/xml/base.xml	2012-04-04 06:37:21 +0000
@@ -995,6 +995,7 @@
     <input t-att-type="widget.password ? 'password' : 'text'" size="1"
         t-att-name="widget.name"
         t-att-id="widget.element_id"
+        t-att-maxlength="widget.size ? widget.size : ''"
         t-attf-class="field_#{widget.type} #{_(['integer', 'float', 'float_time']).contains(widget.type) ? 'oe-number' : ''}"
         style="width: 100%"
     /><img class="oe_field_translate oe_input_icon" t-if="widget.field.translate" t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to