[FIX] ir.actions.act_window: 'required' attribute was missing on a few important fields, sometimes leading to hard-to-diagnose problems. also added some tooltips

lp bug: https://launchpad.net/bugs/580218 fixed

bzr revid: odo@openerp.com-20100705175759-vzbqddak93it5wwe
This commit is contained in:
Ferdinand Gassauer, Olivier Dony 2010-07-05 19:57:59 +02:00 committed by Olivier Dony
parent d224a90ba8
commit 5b6fa2e4ac
1 changed files with 14 additions and 7 deletions

View File

@ -226,13 +226,19 @@ class act_window(osv.osv):
'name': fields.char('Action Name', size=64, translate=True),
'type': fields.char('Action Type', size=32, required=True),
'view_id': fields.many2one('ir.ui.view', 'View Ref.', ondelete='cascade'),
'domain': fields.char('Domain Value', size=250),
'context': fields.char('Context Value', size=250),
'res_model': fields.char('Object', size=64),
'src_model': fields.char('Source Object', size=64),
'domain': fields.char('Domain Value', size=250,
help="Optional domain filtering of the destination data, as a Python expression"),
'context': fields.char('Context Value', size=250, required=True,
help="Context dictionary as Python expression, empty by default (Default: {})"),
'res_model': fields.char('Object', size=64, required=True,
help="Model name of the object to open in the view window"),
'src_model': fields.char('Source Object', size=64,
help="Optional model name of the objects on which this action should be visible"),
'target': fields.selection([('current','Current Window'),('new','New Window')], 'Target Window'),
'view_type': fields.selection((('tree','Tree'),('form','Form')),string='View Type'),
'view_mode': fields.char('View Mode', size=250),
'view_type': fields.selection((('tree','Tree'),('form','Form')), string='View Type', required=True,
help="View type: set to 'tree' for a hierarchical tree view, or 'form' for other views"),
'view_mode': fields.char('View Mode', size=250, required=True,
help="Comma-separated list of allowed view modes, such as 'form', 'tree', 'calendar', etc. (Default: tree,form)"),
'usage': fields.char('Action Usage', size=32),
'view_ids': fields.one2many('ir.actions.act_window.view', 'act_window_id', 'Views'),
'views': fields.function(_views_get_fnc, method=True, type='binary', string='Views'),
@ -247,7 +253,8 @@ class act_window(osv.osv):
'default_user_ids': fields.many2many('res.users', 'ir_act_window_user_rel', 'act_id', 'uid', 'Users'),
'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': fields.text('Action description',
help='Optional help text for the users with a description of the target view, such as its usage and purpose.')
}
_defaults = {
'type': lambda *a: 'ir.actions.act_window',