Adding default filter on tree view - OpenErp Custom module

后端 未结 2 450
梦谈多话
梦谈多话 2021-02-06 20:05

I need to add a default filter, for the tree view of my module.

I saw some code example in openerp, like this one:



        
2条回答
  •  心在旅途
    2021-02-06 20:32

    You need a search view, and a context entry in act_window:

    
        module.class.select
        module.class
        
            
                
                
                
                
                
                    
                    
                    
                
            
        
    
    
    
        xxx
        module.class
        form
        {"search_default_type_date":1}
        
    
    

    I left the group entries in so you could see what they look like, but you'll need to either remove them or adjust them so they match your data. Also, the words module and class should be replaced with your data.

提交回复
热议问题