odoo搜索视图默认是隐藏高级搜索菜单栏,虽然可以打开记住状态,但换台电脑或浏览器默认又是关闭,这就需要改变其缺省机制,源码如下:
1 2 3 4 5 6 7 8 |
var SearchView = require('web.SearchView'); SearchView.include({ init: function () { var self = this; self._super.apply(self, arguments); self.visible_filters = (localStorage.visible_search_menu !== 'false'); } }); |
var local_storage = require(‘web.local_storage’);