i find the source code of oe_stat button i couldnt figure out how menu item showing notification of you have 2 unread messages?
where can i configure in menu item?
You need to inherit 'ir.needaction_mixin' to your model
I took the example with Mail message model (https://github.com/odoo/odoo/blob/8.0/addons/mail/mail_message.py#L63)
_name = 'mail.message'
_description = 'Message'
_inherit = ['ir.needaction_mixin']
def _needaction_domain_get(self, cr, uid, context=None):
return [('to_read', '=', True)]
So, the same can be applied to your model and set the condition using DOMAIN
About This Community
|Asked: 1/8/15, 4:51 AM|
|Seen: 992 times|
|Last updated: 3/16/15, 8:10 AM|