I am using Odoo 10e. I want to integrate a jquery plugin into my module.
I want to integrate the jQuery plugin jquery-resizable-columns. It simple helps user to resize columns of table on the fly and I want to apply this on a specific model's list view
Which method should I extend in order to add the plugin?
In .js file you have to first extend particular list view's js. After that give your custom model name in that .js file and run that.
I think you should extend (maybe include) some widget in the web module. If you go to the file
/addons/web/static/src/js/view_list.js
, you can see the widget that renders the table:As you can see there is an event declared as
sort_by_column
, so you would have to add the plugin you want in a similar way.And if you have any doubts inheriting and modifying widgets you can go to the Odoo Documentation
And if you are using the version 10 you can check how it is built here
/addons/web/static/src/js/views/list_view.js
In your case, You need.
Created a new module or modify already custom module
Create file.js and file.xml.
In the file xml you must write this
And after you needing extent the list_view.js of Odoo to integrate your plugin.