From 7dc6be043d9678e4d46e3908e69177b47d23f4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 6 Sep 2008 19:00:06 +0200 Subject: [PATCH] Set empty string as default value for parent_name --- tryton/gui/window/view_form/view/form_gtk/one2many.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/one2many.py b/tryton/gui/window/view_form/view/form_gtk/one2many.py index 88aaf368f1..7d71482a73 100644 --- a/tryton/gui/window/view_form/view/form_gtk/one2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/one2many.py @@ -200,7 +200,7 @@ class Dialog(object): self.dia.show() self.screen = Screen(model_name, self.dia, view_type=[], parent=parent, - parent_name=attrs.get('relation_field'), + parent_name=attrs.get('relation_field', ''), exclude_field=attrs.get('relation_field', None), readonly=readonly, domain=domain) self.screen.models._context.update(model_ctx) @@ -461,7 +461,7 @@ class One2Many(WidgetInterface): self.screen = Screen(attrs['relation'], self._window, view_type=attrs.get('mode','tree,form').split(','), - parent=self.parent, parent_name=attrs.get('relation_field'), + parent=self.parent, parent_name=attrs.get('relation_field', ''), views_preload=attrs.get('views', {}), tree_saves=attrs.get('saves', False), create_new=True, row_activate=self._on_activate,