Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
10383 Widoki


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



Awatar
Odrzuć
Najlepsza odpowiedź

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
Awatar
Odrzuć
Najlepsza odpowiedź

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 


Awatar
Odrzuć
Autor Najlepsza odpowiedź

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.

Awatar
Odrzuć

Hi, can you please give me the code ?

Powiązane posty Odpowiedzi Widoki Czynność
2
mar 25
6086
1
lis 22
17958
0
sie 18
2862
0
maj 18
3117
1
maj 20
3742