Allow to specify the limit on the action object

bzr revid: ced-b33370a1591c56d4154b31cc6a5a7526b81103e6
This commit is contained in:
ced 2007-09-12 13:20:36 +00:00
parent 2bb65749cd
commit ce079a44db
2 changed files with 10 additions and 5 deletions

View File

@ -274,13 +274,12 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Open a Window">
<field name="name" colspan="4" select="1"/>
<field name="name" select="1"/>
<field name="type" readonly="1"/>
<field name="res_model" select="1"/>
<field name="src_model" select="2"/>
<field name="usage"/>
<field name="view_type"/>
<field name="view_mode"/>
<field name="view_id"/>
<field name="view_ids" colspan="4">
<form string="Views">
<field name="sequence" colspan="4"/>
@ -294,6 +293,10 @@
</tree>
</field>
<field name="domain" colspan="4"/>
<field name="limit"/>
<newline/>
<field name="view_mode"/>
<field name="view_id"/>
</form>
</field>
</record>

View File

@ -181,12 +181,14 @@ class act_window(osv.osv):
'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'),
'limit': fields.integer('Limit', help='Default limit for the list view'),
}
_defaults = {
'type': lambda *a: 'ir.actions.act_window',
'view_type': lambda *a: 'form',
'view_mode': lambda *a: 'tree,form',
'context': lambda *a: '{}'
'context': lambda *a: '{}',
'limit': lambda *a: 80,
}
act_window()
@ -204,7 +206,7 @@ class act_window_view(osv.osv):
('calendar', 'Calendar')), string='Type of view', required=True),
'act_window_id': fields.many2one('ir.actions.act_window', 'Action'),
'multi': fields.boolean('On multiple doc.',
help="If set to true, the action will not be displayed on the right toolbar of a form views.")
help="If set to true, the action will not be displayed on the right toolbar of a form views."),
}
_defaults = {
'multi': lambda *a: False,