{"action":"created","issue":{"url":"https://api.github.com/repos/Dolibarr/dolibarr/issues/4368","labels_url":"https://api.github.com/repos/Dolibarr/dolibarr/issues/4368/labels{/name}","comments_url":"https://api.github.com/repos/Dolibarr/dolibarr/issues/4368/comments","events_url":"https://api.github.com/repos/Dolibarr/dolibarr/issues/4368/events","html_url":"https://github.com/Dolibarr/dolibarr/issues/4368","id":125685983,"number":4368,"title":"NEW: Add hook in propals to rewrite propal_prepare_head","user":{"login":"benlo06","id":3706160,"avatar_url":"https://avatars.githubusercontent.com/u/3706160?v=3","gravatar_id":"","url":"https://api.github.com/users/benlo06","html_url":"https://github.com/benlo06","followers_url":"https://api.github.com/users/benlo06/followers","following_url":"https://api.github.com/users/benlo06/following{/other_user}","gists_url":"https://api.github.com/users/benlo06/gists{/gist_id}","starred_url":"https://api.github.com/users/benlo06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benlo06/subscriptions","organizations_url":"https://api.github.com/users/benlo06/orgs","repos_url":"https://api.github.com/users/benlo06/repos","events_url":"https://api.github.com/users/benlo06/events{/privacy}","received_events_url":"https://api.github.com/users/benlo06/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-08T20:19:52Z","updated_at":"2016-01-09T09:30:04Z","closed_at":null,"body":"Hello,\r\nI have write a module who create propals, and for this propals I notes this propals with special demand_reason_id .\r\nI would like if user open this propal I display specific tabs only if demand_reason_id field is set to my special value.\r\nI would like use  complete_head_from_modules to rewrite tabs but, it is not possible to rewrite tab with condition on current object.\r\n\r\nI would like to add hook to modify $head values in function of propal.\r\n\r\nRegards,\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Dolibarr/dolibarr/issues/comments/170214960","html_url":"https://github.com/Dolibarr/dolibarr/issues/4368#issuecomment-170214960","issue_url":"https://api.github.com/repos/Dolibarr/dolibarr/issues/4368","id":170214960,"user":{"login":"defrance","id":1179011,"avatar_url":"https://avatars.githubusercontent.com/u/1179011?v=3","gravatar_id":"","url":"https://api.github.com/users/defrance","html_url":"https://github.com/defrance","followers_url":"https://api.github.com/users/defrance/followers","following_url":"https://api.github.com/users/defrance/following{/other_user}","gists_url":"https://api.github.com/users/defrance/gists{/gist_id}","starred_url":"https://api.github.com/users/defrance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/defrance/subscriptions","organizations_url":"https://api.github.com/users/defrance/orgs","repos_url":"https://api.github.com/users/defrance/repos","events_url":"https://api.github.com/users/defrance/events{/privacy}","received_events_url":"https://api.github.com/users/defrance/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T09:30:04Z","updated_at":"2016-01-09T09:30:04Z","body":"better way is to use $reshook=$hookmanager->executeHooks('printTabsHead',$parameters);\r\nin function in core/lib/functions.lib.php near line 835\r\nin your way just an additionnal jquery script who hide your additionnal tabs "}}