콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
10564 화면


I want to filter the records of the model sale.order, by their state and display their count, like in the SS shown above. This should appear between the search-bar area and the tree view fields area! Any ideas are welcome...



아바타
취소
베스트 답변

Hi Kevin,

For this you would need to do Odoo web development.

You would need to add some buttons and on view load / records load, you need to load the numbers based on the state.

Sudhir Arya
Odoo ERP Functional & Technical Training, Support, Development, Customization, Migration, Implementation
ERP Harbor Consulting Services
Skype:sudhir@erpharbor.com
Website: http://www.erpharbor.com
아바타
취소
베스트 답변

it is more likely the dashboard view with tree view . you can see the sales dashboard in the sales module .

in the odoo ERP the Dashboard feature is not as good as other competes  , you can create sales like dashboard for  your custom module if you have technical knowledge

https://webkul.com/blog/creating-odoo-custom-dashboard/

you can refer the above link to create custom dashboard , but it need some technical skill to do  


or 


simply you can set a default group by with status field to get the counts of each states . but that is not a good solution 


or 

you need to customize the web cliend

in odoo 12 there has a web tour in some modules those are showing some beautiful views over the tree views

you can customize the views  with js 


아바타
취소
작성자 베스트 답변

I was able to accomplish that. The basic idea is to override the list view definition in the web module. Here is a snap from the code. 

           
   _render: function(){
        var self = this;
        var res = this._super.apply(this, arguments).then(function(){
        
        self._rpc({
            model: 'sale.order',
            method: 'count_state',
            args: [],
        })
        .then(function(result){
            var sale_dashboard = QWeb.render('sale.sale_dashboard', {values:result});
            self.$e    });
    
    return res;
    }
});

That is just a sample in the js file. For more details contact me.. Here is the SS of what I've done..



clicking on the division opens the corresponding records.

아바타
취소

Hi, can you please give me the code ?

관련 게시물 답글 화면 활동
2
3월 25
6253
1
11월 22
18189
0
8월 18
3019
0
5월 18
3264
1
5월 20
3889