[FIX] hr: typo in welcome message + [IMP] hr_holidays: better message when a constraint is fired

bzr revid: qdp-launchpad@openerp.com-20130415150655-ltlkfqy03jj1xgxa
This commit is contained in:
Quentin (OpenERP) 2013-04-15 17:06:55 +02:00
commit 273a82cc0d
2 changed files with 3 additions and 2 deletions

View File

@ -216,7 +216,7 @@ class hr_employee(osv.osv):
(model, mail_group_id) = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'mail', 'group_all_employees')
employee = self.browse(cr, uid, employee_id, context=context)
self.pool.get('mail.group').message_post(cr, uid, [mail_group_id],
body='Welcome to %s! Please help them take the first steps with OpenERP!' % (employee.name),
body='Welcome to %s! Please help him/her take the first steps with OpenERP!' % (employee.name),
subtype='mail.mt_comment', context=context)
except:
pass # group deleted: do not push a message

View File

@ -178,7 +178,8 @@ class hr_holidays(osv.osv):
]
_sql_constraints = [
('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "The employee or employee category of this request is missing."),
('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))",
"The employee or employee category of this request is missing. Please make sure that your user login is linked to an employee."),
('date_check2', "CHECK ( (type='add') OR (date_from <= date_to))", "The start date must be anterior to the end date."),
('date_check', "CHECK ( number_of_days_temp >= 0 )", "The number of days must be greater than 0."),
]