Allow to specify the limit on the action object
authorced <>
Wed, 12 Sep 2007 13:20:36 +0000 (13:20 +0000)
committerced <>
Wed, 12 Sep 2007 13:20:36 +0000 (13:20 +0000)
bzr revid: ced-b33370a1591c56d4154b31cc6a5a7526b81103e6

bin/addons/base/ir/ir.xml
bin/addons/base/ir/ir_actions.py

index f3590bc..60105b0 100644 (file)
                <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"/>
                                        </tree>
                                </field>
                                <field name="domain" colspan="4"/>
+                               <field name="limit"/>
+                               <newline/>
+                               <field name="view_mode"/>
+                               <field name="view_id"/>
                        </form>
                </field>
        </record>
index 516ffcb..c791291 100644 (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,