Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
10368 Zobrazení


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
Zrušit
Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit

Hi, can you please give me the code ?

Related Posts Odpovědi Zobrazení Aktivita
2
bře 25
6073
1
lis 22
17951
0
srp 18
2859
0
kvě 18
3115
1
kvě 20
3734