details: https://code.tryton.org/tryton/commit/e41a832bd671
branch: default
user: Nicolas Évrard <[email protected]>
date: Thu Apr 02 19:44:24 2026 +0200
description:
Fallback on the model name when there is no name param in a tryton URL
Closes #14743
diffstat:
sao/src/sao.js | 6 +++++-
tryton/tryton/gui/main.py | 4 +++-
2 files changed, 8 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 7543e85afb49 -r e41a832bd671 sao/src/sao.js
--- a/sao/src/sao.js Fri Apr 24 16:14:05 2026 +0200
+++ b/sao/src/sao.js Thu Apr 02 19:44:24 2026 +0200
@@ -526,7 +526,11 @@
if (params.limit !== undefined) {
attributes.limit = loads(params.limit || 'null');
}
- attributes.name = loads(params.name || '""');
+ if (params.name) {
+ attributes.name = loads(params.name);
+ } else {
+ attributes.name =
Sao.common.MODELNAME.get(attributes.model);
+ }
attributes.search_value = loads(params.search_value || '[]');
attributes.domain = loads(params.domain || '[]');
attributes.context = loads(params.context || '{}');
diff -r 7543e85afb49 -r e41a832bd671 tryton/tryton/gui/main.py
--- a/tryton/tryton/gui/main.py Fri Apr 24 16:14:05 2026 +0200
+++ b/tryton/tryton/gui/main.py Thu Apr 02 19:44:24 2026 +0200
@@ -1013,7 +1013,9 @@
attributes['view_ids'] = loads(params.get('views', '[]'))
if 'limit' in params:
attributes['limit'] = loads(params.get('limit', 'null'))
- attributes['name'] = loads(params.get('name', '""'))
+ attributes['name'] = (loads(n)
+ if (n := params.get('name'))
+ else common.MODELNAME.get(model))
attributes['search_value'] = loads(
params.get('search_value', '[]'))
attributes['domain'] = loads(params.get('domain', '[]'))