← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-client-web/6.0-opw-5860-sma into lp:openobject-client-web/6.0

 

Sananaz (Open ERP) has proposed merging lp:~openerp-dev/openobject-client-web/6.0-opw-5860-sma into lp:openobject-client-web/6.0.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-5860-sma/+merge/62077

Hello,

- Go to Accounting > Bank and Cash > Bank Statements (Create new statement)
- At Statement lines partner(m2o field) have onchange it calls twice.

Problem is onchange call first from the hidden field and another from the `_text` field so no need to call `_text` field onchange for many2one.

Thanks.



-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-5860-sma/+merge/62077
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-client-web/6.0-opw-5860-sma.
=== modified file 'addons/openerp/static/javascript/m2o.js'
--- addons/openerp/static/javascript/m2o.js	2011-03-11 12:21:00 +0000
+++ addons/openerp/static/javascript/m2o.js	2011-05-24 05:34:24 +0000
@@ -65,6 +65,10 @@
     jQuery(this.text).attr('autocomplete', 'OFF');
 
     if(this.editable) {
+
+        if (jQuery(this.text).attr('callback')) {
+            jQuery(this.text).removeAttr('callback');
+        }
         jQuery(this.field).change(jQuery.proxy(this, 'on_change'));
         jQuery(this.text).bind({
             keydown: jQuery.proxy(this, 'on_keydown'),


Follow ups