From bb20c88e53bf05b6902633e0b56409d249ba033a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 8 Oct 2008 11:23:51 +0200 Subject: [PATCH] Fix test on obj_id for print action for issue421 --- tryton/gui/window/view_form/view/form.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/view/form.py b/tryton/gui/window/view_form/view/form.py index a6cdfe605b..9b007675e9 100644 --- a/tryton/gui/window/view_form/view/form.py +++ b/tryton/gui/window/view_form/view/form.py @@ -117,7 +117,7 @@ class ViewForm(ParserView): self.screen.save_current() obj_id = self.screen.current_model \ and self.screen.current_model.id - if not obj_id: + if obj_id < 0: if atype in ('print'): message(_('You must save this record ' \ 'to use the print button!'), self.window)