Odoo allows programmers to display badges with numeric values next to menu items:
To use this functionality, you need to configure your model. Odoo provides an ir.needaction_mixin for you to inherit from:
Then you need to define a method called _needaction_domain_get. It should return a domain selecting those objects that should be counted towards the number on the badge.
Complete example
More control
Instead of defining _needaction_domain_get method you could alternatively define a _needaction_count method and return a number of your choice directly:
Another example, making use of the domain argument:
Comments
© Ludwik Trammer, 2014 — built with Jekyll using Lagom theme