0

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.

  • That's something you will need to create, or find someone to help you build the feature. Send me an email with more details of what you need if you are interested in getting this done by me – aekis.dev Jul 17 '23 at 21:21
  • Can't you just use the list view of invoices and group by your new field? Why to overengineer this little requirement by pushing it to the dashboard? – CZoellner Jul 18 '23 at 12:29
  • @CZoellner, The idea is to display how many invoices are in each stage, on the screen, without using the group by option provided by Odoo. That is the requirement that I'm facing. – Boris Veselov Jul 18 '23 at 15:54
  • Okay. May you do well! :-) – CZoellner Jul 18 '23 at 16:00
  • Just try to follow the working example you mention on the Purchase module and you should be good – aekis.dev Jul 18 '23 at 23:49
  • @aekis.dev I'm going to try. It's just there so many parts of it and it's all inner connected, it's confusing to pin point which parts are the ones I need. – Boris Veselov Jul 19 '23 at 17:05
  • If you wanna me to build this for you just let me know and send me the details – aekis.dev Jul 19 '23 at 18:34
  • @BorisVeselov The main part is the [retrieve_dashboard](https://github.com/odoo/odoo/blob/15.0/addons/purchase/models/purchase.py#L638) function – Kenly Jul 23 '23 at 11:01
  • Thank you for your help. I figured out and went with creating a field that shows the information I needed, thank you! – Boris Veselov Jul 31 '23 at 13:18

0 Answers0