diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py index 1774b64fefa..5e37c1fa614 100644 --- a/bin/addons/base/ir/ir_actions.py +++ b/bin/addons/base/ir/ir_actions.py @@ -255,8 +255,10 @@ class act_window(osv.osv): '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') + help='It gives the status if the tip has to be displayed or not when a user executes an action'), + 'multi': fields.boolean('Action on Multiple Doc.', help="If set to true, the action will not be displayed on the right toolbar of a form view"), } + _defaults = { 'type': lambda *a: 'ir.actions.act_window', 'view_type': lambda *a: 'form', @@ -265,7 +267,8 @@ class act_window(osv.osv): 'limit': lambda *a: 80, 'target': lambda *a: 'current', 'auto_refresh': lambda *a: 0, - 'auto_search':lambda *a: True + 'auto_search':lambda *a: True, + 'multi': False, } act_window() diff --git a/bin/tools/convert.py b/bin/tools/convert.py index 6059d4a54ec..a69885be4db 100644 --- a/bin/tools/convert.py +++ b/bin/tools/convert.py @@ -488,6 +488,8 @@ form: module.record_id""" % (xml_id,) if rec.get('target'): res['target'] = rec.get('target','') + if rec.get('multi'): + res['multi'] = rec.get('multi', False) id = self.pool.get('ir.model.data')._update(cr, self.uid, 'ir.actions.act_window', self.module, res, xml_id, noupdate=self.isnoupdate(data_node), mode=self.mode) self.idref[xml_id] = int(id) diff --git a/bin/tools/yaml_import.py b/bin/tools/yaml_import.py index 7b3c5edc6e1..8aaf34f7bf6 100644 --- a/bin/tools/yaml_import.py +++ b/bin/tools/yaml_import.py @@ -607,6 +607,7 @@ class YamlInterpreter(object): 'usage': node.usage, 'limit': node.limit, 'auto_refresh': node.auto_refresh, + 'multi': getattr(node, 'multi', False), } self._set_group_values(node, values)