From 9830447295bbd212cff8379bdedb28dd45734ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 13 Jun 2023 00:06:06 +0200 Subject: [PATCH] Use message for exclusive constraint on trigger --- trytond/trytond/ir/message.xml | 3 +++ trytond/trytond/ir/trigger.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/trytond/trytond/ir/message.xml b/trytond/trytond/ir/message.xml index bbf181b6d9..e40ca0c3a2 100644 --- a/trytond/trytond/ir/message.xml +++ b/trytond/trytond/ir/message.xml @@ -321,6 +321,9 @@ this repository contains the full copyright notices and license terms. --> Some activated modules depend on the ones you are trying to deactivate: + + You can not select "On Time" and any other on the same time, they are mutually exclusive. + Condition "%(condition)s" is not a valid PYSON expression for trigger "%(trigger)s". diff --git a/trytond/trytond/ir/trigger.py b/trytond/trytond/ir/trigger.py index 624c161951..ec4958081c 100644 --- a/trytond/trytond/ir/trigger.py +++ b/trytond/trytond/ir/trigger.py @@ -71,7 +71,7 @@ class Trigger(DeactivableMixin, ModelSQL, ModelView): & ((t.on_create == Literal(True)) | (t.on_write == Literal(True)) | (t.on_delete == Literal(True))))), - '"On Time" and others are mutually exclusive!'), + 'ir.msg_trigger_exclusive'), ] cls._order.insert(0, ('name', 'ASC'))