1
我正在尝试自定义用户主页,但目前为止没有成功。OpenERP主页操作和菜单操作
我在“Home Action”和“Menu Action”字段中尝试了一些值,但我总是在启动时获得消息传递。
我该如何定制这个?
在此先感谢
我正在尝试自定义用户主页,但目前为止没有成功。OpenERP主页操作和菜单操作
我在“Home Action”和“Menu Action”字段中尝试了一些值,但我总是在启动时获得消息传递。
我该如何定制这个?
在此先感谢
主页操作和菜单操作功能不适用于Web客户端。你可以看到为什么here。 但是,您可以更改菜单项中的序列号。最小的序列号先打电话。
Please check this answer > https://launchpadlibrarian.net/155202728/patch.txt
For OpenERP 7.0
I have edited my chrome.js file as show below and this patch works
Added the Following code
//patch in function show_application
self.user_action_id = false ;
instance.web.blockUI();
var func = new instance.web.Model("res.users").get_func("read");
var home_action = func(self.session.uid, ['action_id']).then(function(result)
{
action_id = result['action_id']
if (action_id)
{
self.user_action_id = action_id[0]
instance.web.unblockUI()
self.bind_hashchange();
}
else{
instance.web.unblockUI()
self.bind_hashchange();
}
})
// end of patch
****then replace contents in****
self.menu.has_been_loaded.done(function()
{
var first_menu_id = self.menu.$el.find("a:first").data("menu");
if(first_menu_id) {
self.menu.menu_click(first_menu_id);
}
});
**with below code.**
self.menu.has_been_loaded.done(function()
{
if (self.user_action_id){
self.action_manager.do_action(self.user_action_id, {'clear_breadcrumbs': true})
}
else{
var first_menu_id = self.menu.$el.find("a:first").data("menu");
if(first_menu_id) {
self.menu.menu_click(first_menu_id);
}
}
});