Add ir.message and use custom exceptions

issue3672
This commit is contained in:
Cédric Krier
2018-12-29 14:20:28 +01:00
parent 1bda4e8f6f
commit b0f3c35fa7
3 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ class Dunning(ModelSQL, ModelView):
table = cls.__table__()
cls._sql_constraints = [
('line_unique', Unique(table, table.line),
'Line can be used only once on dunning.'),
'account_dunning.msg_dunning_line_unique'),
]
cls._active_field = 'active'
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data group="1">
<record model="ir.message" id="msg_dunning_line_unique">
<field name="text">Line can be used only once on dunning.</field>
</record>
</data>
</tryton>
+1
View File
@@ -10,3 +10,4 @@ xml:
dunning.xml
party.xml
account.xml
message.xml