changeset 33fe99ca9bd6 in tryton:5.0
details: https://hg.tryton.org/tryton?cmd=changeset;node=33fe99ca9bd6
description:
        Display the full path of select fields to export

        issue9595
        review323971003
        (grafted from 5a27773085271ff2293e8ade9d87177fbecd5eb8)
diffstat:

 tryton/gui/window/win_export.py |  17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diffs (56 lines):

diff -r 12cefb1c2d8f -r 33fe99ca9bd6 tryton/gui/window/win_export.py
--- a/tryton/gui/window/win_export.py   Wed Sep 02 19:13:32 2020 +0200
+++ b/tryton/gui/window/win_export.py   Thu Sep 24 22:43:50 2020 +0200
@@ -109,14 +109,11 @@
 
             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'):
@@ -133,7 +130,7 @@
         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)
@@ -144,11 +141,11 @@
 
     def _sig_sel_add(self, store, path, iter):
         name = store.get_value(iter, 1)
-        string_, long_string, relation = self.fields[name]
+        string_, relation = self.fields[name]
         if relation:
             return
         num = self.model2.append()
-        self.model2.set(num, 0, long_string, 1, name)
+        self.model2.set(num, 0, string_, 1, name)
 
     def sig_unsel(self, *args):
         store, paths = self.view2.get_selection().get_selected_rows()
@@ -274,10 +271,10 @@
             self.sel_field(name)
 
     def sel_field(self, name):
-        _, long_string, relation = self.fields[name]
+        string_, relation = self.fields[name]
         if relation:
             return
-        self.model2.append((long_string, name))
+        self.model2.append((string_, name))
 
     def response(self, dialog, response):
         if response == gtk.RESPONSE_OK:

Reply via email to