changeset 99beee9b9337 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset&node=99beee9b9337
description:
        Hide link on new record

        There is no point to make search_count call for a record with negative 
id as
        the result is always empty.

        issue11707
        review411721003
diffstat:

 tryton/gui/window/view_form/view/form_gtk/state_widget.py |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r c6b8920b8b74 -r 99beee9b9337 
tryton/gui/window/view_form/view/form_gtk/state_widget.py
--- a/tryton/gui/window/view_form/view/form_gtk/state_widget.py Sun Sep 18 
12:10:45 2022 +0200
+++ b/tryton/gui/window/view_form/view/form_gtk/state_widget.py Sun Sep 18 
12:27:39 2022 +0200
@@ -131,6 +131,9 @@
             self.hide()
             return
         if record:
+            if record.id < 0:
+                self.hide()
+                return
             data = {
                 'model': record.model_name,
                 'id': record.id,

Reply via email to