[IMP]:Added a boolean field on the user preferences and user form to be able to deact...
[odoo/odoo.git] / bin / addons / base / ir / ir_actions.py
index 3b51af2..62b3876 100644 (file)
@@ -210,12 +210,14 @@ class act_window(osv.osv):
         return res
 
     def _get_help_status(self, cr, uid, ids, name, arg, context={}):
-        cr.execute(""" SELECT action.id,
-                     CASE WHEN r.uid IS NULL THEN True ELSE False END
-                     AS help_status FROM ir_act_window action
-                     LEFT JOIN ir_act_window_user_rel r ON
-                     (action.id = r.act_id AND (r.uid IS NULL or r.uid= %s)) WHERE action.id = ANY(%s)""",(uid,ids,))
-        return dict(cr.fetchall())
+        activate_tips = self.pool.get('res.users').browse(cr, uid, uid).menu_tips
+        if activate_tips:
+            cr.execute(""" SELECT action.id,
+                         CASE WHEN r.uid IS NULL THEN True ELSE False END
+                         AS help_status FROM ir_act_window action
+                         LEFT JOIN ir_act_window_user_rel r ON
+                         (action.id = r.act_id AND (r.uid IS NULL or r.uid= %s)) WHERE action.id = ANY(%s)""",(uid,ids,))
+            return dict(cr.fetchall())
 
     _columns = {
         'name': fields.char('Action Name', size=64, translate=True),