changeset 1be6b3418bdb in modules/timesheet_cost:default
details:
https://hg.tryton.org/modules/timesheet_cost?cmd=changeset;node=1be6b3418bdb
description:
Add ir.message and use custom exceptions
issue3672
diffstat:
company.py | 2 +-
message.xml | 10 ++++++++++
tryton.cfg | 1 +
3 files changed, 12 insertions(+), 1 deletions(-)
diffs (34 lines):
diff -r 708291e8abc3 -r 1be6b3418bdb company.py
--- a/company.py Mon Oct 01 13:02:25 2018 +0200
+++ b/company.py Sat Dec 29 14:20:30 2018 +0100
@@ -83,7 +83,7 @@
cls._sql_constraints = [
('employee_date_cost_price_uniq',
Unique(t, t.employee, t.date, t.cost_price),
- 'A employee can only have one cost price by date.'),
+ 'timesheet_cost.msg_employee_unique_cost_price_date'),
]
cls._order.insert(0, ('date', 'DESC'))
diff -r 708291e8abc3 -r 1be6b3418bdb message.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/message.xml Sat Dec 29 14:20:30 2018 +0100
@@ -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_employee_unique_cost_price_date">
+ <field name="text">An employee can only have one cost price by
date.</field>
+ </record>
+ </data>
+</tryton>
diff -r 708291e8abc3 -r 1be6b3418bdb tryton.cfg
--- a/tryton.cfg Mon Oct 01 13:02:25 2018 +0200
+++ b/tryton.cfg Sat Dec 29 14:20:30 2018 +0100
@@ -8,3 +8,4 @@
xml:
company.xml
timesheet.xml
+ message.xml