{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/8765","labels_url":"https://api.github.com/repos/odoo/odoo/issues/8765/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/8765/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/8765/events","html_url":"https://github.com/odoo/odoo/issues/8765","id":108828245,"number":8765,"title":"get_needaction_data should pass action's context to _needaction_count","user":{"login":"JonathanStein","id":1430972,"avatar_url":"https://avatars.githubusercontent.com/u/1430972?v=3","gravatar_id":"","url":"https://api.github.com/users/JonathanStein","html_url":"https://github.com/JonathanStein","followers_url":"https://api.github.com/users/JonathanStein/followers","following_url":"https://api.github.com/users/JonathanStein/following{/other_user}","gists_url":"https://api.github.com/users/JonathanStein/gists{/gist_id}","starred_url":"https://api.github.com/users/JonathanStein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonathanStein/subscriptions","organizations_url":"https://api.github.com/users/JonathanStein/orgs","repos_url":"https://api.github.com/users/JonathanStein/repos","events_url":"https://api.github.com/users/JonathanStein/events{/privacy}","received_events_url":"https://api.github.com/users/JonathanStein/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/odoo/odoo/labels/confirmed","name":"confirmed","color":"DF013A"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-29T09:12:54Z","updated_at":"2015-10-05T08:40:00Z","closed_at":null,"body":"The needaction count may depend on the menu action's context, but it's not passed to the counting function.\r\n\r\nIn ir_ui_menu.py, the current context is passed, but I think it should be merged with the actions context before calling _needaction_count\r\nhttps://github.com/odoo/odoo/blob/a9e3d74713b6882c64617345696ad326d75a4745/openerp/addons/base/ir/ir_ui_menu.py#L345\r\n\r\nBefore trying to patch this, I would like to hear if there is a reason for not doing this?"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/145464001","html_url":"https://github.com/odoo/odoo/issues/8765#issuecomment-145464001","issue_url":"https://api.github.com/repos/odoo/odoo/issues/8765","id":145464001,"user":{"login":"rco-odoo","id":7578141,"avatar_url":"https://avatars.githubusercontent.com/u/7578141?v=3","gravatar_id":"","url":"https://api.github.com/users/rco-odoo","html_url":"https://github.com/rco-odoo","followers_url":"https://api.github.com/users/rco-odoo/followers","following_url":"https://api.github.com/users/rco-odoo/following{/other_user}","gists_url":"https://api.github.com/users/rco-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/rco-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rco-odoo/subscriptions","organizations_url":"https://api.github.com/users/rco-odoo/orgs","repos_url":"https://api.github.com/users/rco-odoo/repos","events_url":"https://api.github.com/users/rco-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/rco-odoo/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T08:40:00Z","updated_at":"2015-10-05T08:40:00Z","body":"@JonathanStein my pull request above is not the right fix.\r\n\r\nOne should fix the search view instead: when the user clicks on the needaction counter, the menu action is executed with `'search_default_message_unread': true` added in its context. This is effective only if the search view defines such a filter and its domain corresponds to the \"needaction\" domain.\r\n\r\nCould you spot the menu items that are problematic?\r\n"}}