Mohammed Shekha(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-client-web/6.0-opw-381995-msh into 
lp:openobject-client-web.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #924196 in OpenERP Web Client: "attrs problem with readonly"
  https://bugs.launchpad.net/openobject-client-web/+bug/924196

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-381995-msh/+merge/91244

Hello,

Fixed the issue of form_onAttrChange which is not called when some clears the 
many2one field, when user clears many2one field at that time on_change is 
called but form_onAttrChange was not called so due to this attrs are not set 
back.

To reproduce it follow the 
https://bugs.launchpad.net/openobject-client-web/+bug/924196

Reason :- When one clears the m2o field at that time we will set value of text 
as well as field element to '', but when there is '' value at that time 
get_name will not be called and no ajax request sent, so ajaxstop will not be 
called due to which form_hookAttrChange and form_onAttrChange will not be 
called, hence due to this when user clears the many2one field attrs on field 
are not set back.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-381995-msh/+merge/91244
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-client-web/6.0-opw-381995-msh.
=== modified file 'addons/openerp/static/javascript/m2o.js'
--- addons/openerp/static/javascript/m2o.js	2011-08-04 14:07:40 +0000
+++ addons/openerp/static/javascript/m2o.js	2012-02-02 11:43:25 +0000
@@ -333,6 +333,7 @@
         this.text.value = '';
         this.field.value = '';
         this.on_change(evt);
+        form_hookAttrChange();
     }
 
     //Tab

_______________________________________________
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