From c4f3e062eb1780139ccd56a3d44a1a1523e8a834 Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 26 Jul 2007 08:32:15 +0000 Subject: [PATCH] kernel,base: allow to specify in the context to not use the default test on field active bzr revid: ced-d28a0a444b59bf5b673b6b74eb61d46d6ab4a0a5 --- bin/addons/base/ir/ir.xml | 3 ++- bin/osv/orm.py | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/addons/base/ir/ir.xml b/bin/addons/base/ir/ir.xml index 6e41b712b64..8240af0808d 100644 --- a/bin/addons/base/ir/ir.xml +++ b/bin/addons/base/ir/ir.xml @@ -877,9 +877,10 @@ Scheduled Actions ir.cron form + {'active_test': False} - diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 2adfb0d3751..ec77db4b6ba 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1428,13 +1428,12 @@ class orm(object): args = args[:] # if the object has a field named 'active', filter out all inactive # records unless they were explicitely asked for - if 'active' in self._columns and active_test: + if 'active' in self._columns and (active_test and context.get('active_test', True)): i = 0 active_found = False while i