From 5ad66b5dc5b7ebefe525e4aa7e8fcb544f2b0f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 12 Nov 2008 18:41:55 +0100 Subject: [PATCH] Add context when searching ids for report --- tryton/action/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tryton/action/main.py b/tryton/action/main.py index 972882720b..b2d80e7e08 100644 --- a/tryton/action/main.py +++ b/tryton/action/main.py @@ -23,8 +23,11 @@ class Action(object): datas = data.copy() ids = datas['ids'] del datas['ids'] + ctx = rpc.CONTEXT.copy() + ctx.update(context) if not ids: - args = ('object', 'execute', datas['model'], 'search', []) + args = ('object', 'execute', datas['model'], 'search', [], + 0, None, None, ctx) try: ids = rpc.execute(*args) except Exception, exception: @@ -35,8 +38,6 @@ class Action(object): message(_('Nothing to print!'), window) return False datas['id'] = ids[0] - ctx = rpc.CONTEXT.copy() - ctx.update(context) args = ('report', 'execute', name, ids, datas, ctx) try: res = rpc.execute(*args)