Hide print in menu bar
Dears, How can I hide conditionally the print button in menu bar, e.g. if state == draft: then hide print button .
Note that I have user fields_view_get() to remove the print menu, it works but I need to hide print for specific quotation (only draft). I cannot access the instance of quotation from api.model.
res = super(sale_order_cust, self).fields_view_get(
#remove print from tree view to avoid download unapproved quote
if view_type == 'tree':
toolbar_dic = res['toolbar']