From 276dc262e03e22d4bade31cd171c3b144ab1611d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 5 Jun 2008 10:33:10 +0200 Subject: [PATCH] Send the same data for relate, action and print --- tryton/gui/window/view_form/view/form.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tryton/gui/window/view_form/view/form.py b/tryton/gui/window/view_form/view/form.py index 24003bec86..9b3eeb90a5 100644 --- a/tryton/gui/window/view_form/view/form.py +++ b/tryton/gui/window/view_form/view/form.py @@ -116,11 +116,6 @@ class ViewForm(ParserView): 'to use the relate button!')) return False self.screen.display() - data = { - 'model': self.screen.name, - 'id': obj_id, - 'ids': [obj_id], - } if atype == 'relate': obj_id = self.screen.current_model \ and self.screen.current_model.id @@ -136,6 +131,11 @@ class ViewForm(ParserView): act['context'] = str( self.screen.current_model.expr_eval( act['context'], check_load=False)) + data = { + 'model': self.screen.name, + 'id': obj_id, + 'ids': [obj_id], + } value = Action._exec_action(act, data, context) if atype in ('print', 'action'): self.screen.reload()