From 2aeb4c84120a513d46a0f57ccb309fad05d04df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 12 Apr 2023 18:40:49 +0200 Subject: [PATCH] Do not set s nor p parameter to export URL if screen has no limit Closes #12212 (grafted from 9356e9d17de966478109068ff458d68aa86e811a) --HG-- branch : 6.0 --- sao/src/window.js | 3 ++- tryton/tryton/gui/window/win_export.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sao/src/window.js b/sao/src/window.js index 2b71eea91a..af16c1e8e4 100644 --- a/sao/src/window.js +++ b/sao/src/window.js @@ -1994,7 +1994,8 @@ } else { domain = this.screen.search_domain( this.screen.screen_container.get_text()); - if (!this.ignore_search_limit.prop('checked')) { + if (!this.ignore_search_limit.prop('checked') && + this.screen.limit !== null) { query_string.push(['s', this.screen.limit.toString()]); query_string.push( ['p', Math.floor( diff --git a/tryton/tryton/gui/window/win_export.py b/tryton/tryton/gui/window/win_export.py index 9f72896220..90e659536a 100644 --- a/tryton/tryton/gui/window/win_export.py +++ b/tryton/tryton/gui/window/win_export.py @@ -468,7 +468,8 @@ class WinExport(WinCSV): else: domain = self.screen.search_domain( self.screen.screen_container.get_text()) - if not self.ignore_search_limit.get_active(): + if (not self.ignore_search_limit.get_active() + and self.screen.limit is not None): query_string.append(('s', str(self.screen.limit))) query_string.append( ('p', str(self.screen.offset // self.screen.limit)))