title: How to hide Edit button based on state in Odoo 11
body: <p><img src="https://i.imgur.com/KMwbWA8.png" alt=""></p>
  
  <p>how can I hide the edit button when the state is "In Progress"
  I tried doing ir.rule like <a href="https://www.odoo.com/forum/help-1/question/how-to-hide-the-edit-and-create-buttons-conditionally-131216" rel="nofollow noreferrer">this</a> but it didn't work it only filter(domain) my treeview
  I also tried to doing it in JavaScript but i can't find any odoo 11 sample</p>