diff options
| author | nch@tinyerp.com <> | 2010-10-06 19:41:09 +0530 |
|---|---|---|
| committer | nch@tinyerp.com <> | 2010-10-06 19:41:09 +0530 |
| commit | 9f2d1a15a0be0ccd96ff150a8fd87d9da64f1a1f (patch) | |
| tree | 7def89c79b53be4a3f1c77e38190d7a03f077105 | |
| parent | a74c490c6d38224ab3365e09b17eb227fe0d696e (diff) | |
[IMP]:added a function field on ir.actions.act_window to show/hide the menu action tips on that action.
bzr revid: nch@tinyerp.com-20101006141109-peuk7j2mh8hqig5e
| -rw-r--r-- | bin/addons/base/ir/ir_actions.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py index 074bfa04f85..297aebaf5dc 100644 --- a/bin/addons/base/ir/ir_actions.py +++ b/bin/addons/base/ir/ir_actions.py @@ -214,6 +214,10 @@ class act_window(osv.osv): res[act.id] = str(form_arch) return res + def _get_help_status(self, cr, uid, ids, name, arg, context={}): + activate_tips = self.pool.get('res.users').browse(cr, uid, uid).menu_tips + return dict([(id, activate_tips) for id in ids]) + _columns = { 'name': fields.char('Action Name', size=64, translate=True), 'type': fields.char('Action Type', size=32, required=True), @@ -246,7 +250,8 @@ class act_window(osv.osv): 'menus': fields.char('Menus', size=4096), 'help': fields.text('Action description', help='Optional help text for the users with a description of the target view, such as its usage and purpose.'), - + 'display_menu_tip':fields.function(_get_help_status, type='boolean', method=True, string='Display Menu Tips', + help='It gives the status if the tip has to be displayed or not when a user executes an action') } _defaults = { 'type': lambda *a: 'ir.actions.act_window', |
