İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
10400 Görünümler


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...



Avatar
Vazgeç
En İyi Yanıt

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
Avatar
Vazgeç
En İyi Yanıt

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 


Avatar
Vazgeç
Üretici En İyi Yanıt

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.

Avatar
Vazgeç

Hi, can you please give me the code ?

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Mar 25
6093
1
Kas 22
17968
0
Ağu 18
2866
0
May 18
3120
1
May 20
3744