[FIX] get rid of unsued menus and submenu

bzr revid: al@openerp.com-20110811181217-y2yxdz34uswijwza
This commit is contained in:
Antony Lesuisse 2011-08-11 20:12:17 +02:00
parent a94ac45ed7
commit 2f9f557e18
3 changed files with 1 additions and 11 deletions

View File

@ -535,7 +535,6 @@
<field name="type" readonly="1"/>
<field name="src_model" select="2"/>
<field name="usage"/>
<field name="menus"/>
</group>
<notebook colspan="4">
<page string="General Settings">

View File

@ -284,7 +284,6 @@ class act_window(osv.osv):
'filter': fields.boolean('Filter'),
'auto_search':fields.boolean('Auto Search'),
'search_view' : fields.function(_search_view, type='text', method=True, string='Search View'),
'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.',
translate=True),

View File

@ -1767,7 +1767,7 @@ class orm_template(object):
:param view_type: type of the view to return if view_id is None ('form', tree', ...)
:param context: context arguments, like lang, time zone
:param toolbar: true to include contextual actions
:param submenu: example (portal_project module)
:param submenu: deprecated
:return: dictionary describing the composition of the requested view (including inherited views and extensions)
:raise AttributeError:
* if the inherited view has unknown position to work with other than 'before', 'after', 'inside', 'replace'
@ -1999,14 +1999,6 @@ class orm_template(object):
result['arch'] = xarch
result['fields'] = xfields
if submenu:
if context and context.get('active_id', False):
data_menu = self.pool.get('ir.ui.menu').browse(cr, user, context['active_id'], context).action
if data_menu:
act_id = data_menu.id
if act_id:
data_action = self.pool.get('ir.actions.act_window').browse(cr, user, [act_id], context)[0]
result['submenu'] = getattr(data_action, 'menus', False)
if toolbar:
def clean(x):
x = x[2]