From 66f66a160584c388f0ea6818afdfd21ad128b674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 24 Sep 2020 22:43:50 +0200 Subject: [PATCH] Display the full path of select fields to export issue9595 review323971003 --- tryton/gui/window/win_export.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tryton/gui/window/win_export.py b/tryton/gui/window/win_export.py index ab3221c20d..07ec4c6b65 100644 --- a/tryton/gui/window/win_export.py +++ b/tryton/gui/window/win_export.py @@ -154,14 +154,11 @@ class WinExport(WinCSV): for name, field, string_ in items: path = prefix_field + name - long_string = string_ - if prefix_field: - long_string = prefix_name + string_ node = self.model1.insert(parent_node, 0, [string_, path]) + string_ = prefix_name + string_ - self.fields[path] = (string_, long_string, - field.get('relation')) + self.fields[path] = (string_, field.get('relation')) # Insert relation only to real field if '.' not in name: if field.get('relation'): @@ -178,7 +175,7 @@ class WinExport(WinCSV): child = self.model1.iter_children(iter) if self.model1.get_value(child, 0) is None: prefix_field = self.model1.get_value(iter, 1) - string_, long_string, relation = self.fields[prefix_field] + string_, relation = self.fields[prefix_field] self.model_populate(self._get_fields(relation), iter, prefix_field + '/', string_ + '/') self.model1.remove(child) @@ -306,10 +303,10 @@ class WinExport(WinCSV): self.sel_field(name) def sel_field(self, name): - _, long_string, relation = self.fields[name] + string_, relation = self.fields[name] if relation: name += '/rec_name' - self.model2.append((long_string, name)) + self.model2.append((string_, name)) def response(self, dialog, response): if response == Gtk.ResponseType.OK: