[FIX] sale_timesheet: too long sql name

The generated SQL constraints name is too long, and so, when raising, it
does not show the defined error message, since Postgresql truncated the
name. thus Odoo can not match the error with the error message.

Task #1883640
This commit is contained in:
jem-odoo
2018-09-13 11:43:45 +02:00
parent 708492b0a1
commit 0c28a6387f
@@ -19,5 +19,5 @@ class ProjectProductEmployeeMap(models.Model):
price_unit = fields.Float(related='sale_line_id.price_unit', readonly=True)
_sql_constraints = [
('uniq_map_sale_line_employee_per_project', 'UNIQUE(project_id,employee_id)', 'You can only map one employee with sale order item per project.'),
('uniqueness_employee', 'UNIQUE(project_id,employee_id)', 'An employee cannot be selected more than once in the mapping. Please remove duplicate(s) and try again.'),
]