I created a module in odoo community edition that works with invoices. Invoices have different stages of progress. I created a tab that shows these stages of invoices: draft, awaiting approval, done. How to create a field in list view that will display how many invoices are in each of the stage? So that it breaks it down to different stages and shows how many are in each stage.
Similar to how it's done in Purchase module. Here is a screenshot of what it looks like in Purchase module, where it says All RFQs, and in boxes it counts how many to send, how many are waiting and how many are late. screenshot of purchase module
I tried to work around it by researching different dashboard add-ons, pivot view, smart buttons. Those are not like the example from the screenshot. The purchase module source code for that field is called: js_class="purchase_dashboard_list", but I couldn't find out how to reproduce it.