diff --git a/tryton/gui/window/view_form/view/form_gtk/document.py b/tryton/gui/window/view_form/view/form_gtk/document.py index e8b4703e39..f6c2ea6b1a 100644 --- a/tryton/gui/window/view_form/view/form_gtk/document.py +++ b/tryton/gui/window/view_form/view/form_gtk/document.py @@ -47,7 +47,10 @@ class Document(BinaryMixin, Widget): def display(self): super().display() - data = self.field.get_data(self.record) + if self.field and self.record: + data = self.field.get_data(self.record) + else: + data = None if not data: self.image.hide()