2013-05-13 79 views
1

我正在嘗試自定義用戶主頁,但目前爲止沒有成功。OpenERP主頁操作和菜單操作

我在「Home Action」和「Menu Action」字段中嘗試了一些值,但我總是在啓動時獲得消息傳遞。

我該如何定製這個?

在此先感謝

回答

0

主頁操作和菜單操作功能不適用於Web客戶端。你可以看到爲什麼here。 但是,您可以更改菜單項中的序列號。最小的序列號先打電話。

0
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); 
         } 
        } 
       });