Use message for exclusive constraint on trigger

This commit is contained in:
Cédric Krier
2023-06-13 00:06:06 +02:00
parent 7ec46a6295
commit 9830447295
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -321,6 +321,9 @@ this repository contains the full copyright notices and license terms. -->
<field name="text">Some activated modules depend on the ones you are trying to deactivate:</field>
</record>
<record model="ir.message" id="msg_trigger_exclusive">
<field name="text">You can not select "On Time" and any other on the same time, they are mutually exclusive.</field>
</record>
<record model="ir.message" id="msg_trigger_invalid_condition">
<field name="text">Condition "%(condition)s" is not a valid PYSON expression for trigger "%(trigger)s".</field>
</record>
+1 -1
View File
@@ -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'))