From 1740c4a6b9e1fc67215cfed794a41008abff4717 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 9 Sep 2008 17:22:16 +0200 Subject: [PATCH] bugfix with actions [openobject-client @ christophe@tinyerp.com-20080909152216-5s52x022z8q9k6ft] --- bin/modules/action/main.py | 4 +++- bin/widget/model/field.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/modules/action/main.py b/bin/modules/action/main.py index 4e1a389e..a5b1d343 100644 --- a/bin/modules/action/main.py +++ b/bin/modules/action/main.py @@ -167,9 +167,11 @@ class main(service.Service): if 'id' in data: try: id = data.get('id', False) + ctx = rpc.session.context.copy() + ctx['get_binary_size'] = False actions = rpc.session.rpc_exec_auth('/object', 'execute', 'ir.values', 'get', 'action', keyword, - [(data['model'], id)], False, rpc.session.context) + [(data['model'], id)], False, ctx) actions = map(lambda x: x[2], actions) except rpc.rpc_exception, e: # common.error(_('Error: ')+str(e.type), e.message, e.data) diff --git a/bin/widget/model/field.py b/bin/widget/model/field.py index af8966dd..156f9344 100644 --- a/bin/widget/model/field.py +++ b/bin/widget/model/field.py @@ -151,7 +151,7 @@ class BinaryField(CharField): model.value[self.name] = None name = get_binary_size and self.get_size_name() or self.name model.value[name] = value - if model.is_wizard(): + if not get_binary_size: model.value[self.get_size_name()] = tools.human_size(len(value)) if modified: model.modified = True -- 2.11.4.GIT