From ce079a44db20d95fe64440ac70955214272d4c42 Mon Sep 17 00:00:00 2001
From: ced <>
Date: Wed, 12 Sep 2007 13:20:36 +0000
Subject: [PATCH] Allow to specify the limit on the action object
bzr revid: ced-b33370a1591c56d4154b31cc6a5a7526b81103e6
---
bin/addons/base/ir/ir.xml | 9 ++++++---
bin/addons/base/ir/ir_actions.py | 6 ++++--
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/bin/addons/base/ir/ir.xml b/bin/addons/base/ir/ir.xml
index f3590bcbc4e..60105b0a23c 100644
--- a/bin/addons/base/ir/ir.xml
+++ b/bin/addons/base/ir/ir.xml
@@ -274,13 +274,12 @@
form
diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py
index 516ffcbdce2..c791291e93a 100644
--- a/bin/addons/base/ir/ir_actions.py
+++ b/bin/addons/base/ir/ir_actions.py
@@ -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,