openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #00294
lp:~openerp-community/openobject-client-web/stefan-therp_lp748238-6.0 into lp:openobject-client-web/6.0
Stefan Rijnhart (Therp) has proposed merging lp:~openerp-community/openobject-client-web/stefan-therp_lp748238-6.0 into lp:openobject-client-web/6.0.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #748238 in OpenERP Web Client: "search view - criteria are m2o fields instead of substring search"
https://bugs.launchpad.net/openobject-client-web/+bug/748238
For more details, see:
https://code.launchpad.net/~openerp-community/openobject-client-web/stefan-therp_lp748238-6.0/+merge/57517
Hi,
As I think this branch is propose worthy, I thought I would give you the opportunity to tell me that it actually counts as an improvement so it does not qualify to merge with 6.0 :-P
I would have created a branch against trunk, but I understand that the web client for 6.1 is going to be a completely different beast. Hope it is going to let me search my many2ones by substring!
Thank you for your time and keep up the good work,
Stefan.
--
https://code.launchpad.net/~openerp-community/openobject-client-web/stefan-therp_lp748238-6.0/+merge/57517
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-client-web/stefan-therp_lp748238-6.0.
=== 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-04-13 15:31:02 +0000
@@ -111,8 +111,8 @@
// clicked outside the box, with some text entered
// do as if tabbed out
this.lastKey = null;
+ this.get_matched();
this.clearResults();
- this.get_matched();
}
};
@@ -370,6 +370,13 @@
};
ManyToOne.prototype.get_matched = function() {
+ if (jQuery(this.field).hasClass('m2o_search') &&
+ this.delayedRequest == null &&
+ this.numResultRows == 0) {
+ // Allow substring search (press ESC at the combobox)
+ return;
+ }
+
if(openobject.http.AJAX_COUNT > 0) {
callLater(0, jQuery.proxy(this, 'get_matched'));
return;
Follow ups