Move error message to message.xml

This commit is contained in:
Albert Cervera i Areny 2019-06-17 23:51:19 +02:00
parent 8181c2ef7d
commit 8e915b27ff
3 changed files with 9 additions and 1 deletions

7
message.xml Normal file
View File

@ -0,0 +1,7 @@
<tryton>
<data group="1">
<record model="ir.message" id="msg_category_name_unique">
<field name="text">The Name of the Lot Cost Category must be unique.</field>
</record>
</data>
</tryton>

View File

@ -24,7 +24,7 @@ class LotCostCategory(ModelSQL, ModelView):
t = cls.__table__()
cls._sql_constraints += [
('name_uniq', Unique(t, t.name),
'The Name of the Lot Cost Category must be unique.'),
'stock_lot_cost.msg_category_name_unique'),
]

View File

@ -4,3 +4,4 @@ depends:
stock_lot
xml:
stock.xml
message.xml