Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Error on Search for Odoo v11 Community #111

Open
agcopley opened this issue Aug 8, 2019 · 3 comments
Open

Error on Search for Odoo v11 Community #111

agcopley opened this issue Aug 8, 2019 · 3 comments
Assignees
Labels

Comments

@agcopley
Copy link

agcopley commented Aug 8, 2019

Hi there,

Before anything, many thanks for the great work! I bought one of your paid modules to help out.
I am getting an error on entering text in the search bar on the documents page..Hope you can help

Andrew

Error:
Uncaught TypeError: Cannot read property 'odoo_id' of undefined

http://157.230.169.143:8069/muk_dms/static/src/js/views/documents/dms_documents_base_model.js:298
Rastreo de error:
TypeError: Cannot read property 'odoo_id' of undefined
at Class._searchNodes (http://157.230.169.143:8069/muk_dms/static/src/js/views/documents/dms_documents_base_model.js:298:85)
at Class.search (http://157.230.169.143:8069/muk_dms/static/src/js/views/documents/dms_documents_base_model.js:80:18)
at Class._searchData (http://157.230.169.143:8069/muk_dms/static/src/js/views/documents/dms_documents_base_controller.js:256:18)
at $.jstree.plugins.contextmenu.search (http://157.230.169.143:8069/muk_web_utils/static/lib/jsTree/jstree.js:7531:15)
at Class.search (http://157.230.169.143:8069/muk_dms/static/src/js/views/documents/dms_documents_base_controller.js:118:39)
at Class. (http://157.230.169.143:8069/muk_dms/static/src/js/views/documents/dms_documents_base_view.js:114:22)
at later (http://157.230.169.143:8069/web/static/lib/underscore/underscore.js:821:25)

@agcopley
Copy link
Author

Ok, nothing happening here. Anyone else come across a solution for this?

@keshrath
Copy link
Member

@Kerrim- Have you been able to reproduce this error?

@jaa-odoo
Copy link

jaa-odoo commented Oct 7, 2019

Hello I am getting this same error in odoo 11 community version that issues is fixed in odoo 12
https://github.com/muk-it/muk_dms/blob/11.0/muk_dms/static/src/js/views/documents/dms_documents_base_controller.js#L253-L266
Please change this method like below

  _searchData: function(val, callback) {
    	var node = this.getSelectedDirectory();
    	if(node) {
	    	this.model.search(val, node, {
	    		search: {
	    			operator: this.searchTester.test(val) ? "=ilike" : "ilike",
	    		}
	    	}).then(function(data) {
				callback.call(this, data);
			});
    	} else {
    		callback.call(this, []);
    	}
    },

and it will woks
Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants