Skip to Content
Menu
This question has been flagged
3 Replies
8787 Views


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
Discard
Best Answer

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
Discard
Best Answer

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
Discard
Author Best Answer

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
Discard

Hi, can you please give me the code ?

Related Posts Replies Views Activity
1
Nov 22
16378
1
Mar 24
4917
0
Aug 18
1980
0
May 18
2318
1
May 20
2423