16.0 dev recup #4
@@ -1 +1 @@
|
||||
from . import hr_leave_type, hr_leave
|
||||
from . import hr_leave_type, hr_leave, hr_leave_allocation
|
@@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
# Copyright (c) 2005-2006 Axelor SARL. (http://www.axelor.com)
|
||||
|
||||
from odoo import models
|
||||
|
||||
class HrLeaveAllocation(models.Model):
|
||||
_inherit = "hr.leave.allocation"
|
||||
|
||||
_sql_constraints = [
|
||||
('type_value',
|
||||
"CHECK( (holiday_type='employee' AND (employee_id IS NOT NULL OR multi_employee IS TRUE)) or "
|
||||
"(holiday_type='category' AND category_id IS NOT NULL) or "
|
||||
"(holiday_type='department' AND department_id IS NOT NULL) or "
|
||||
"(holiday_type='company' AND mode_company_id IS NOT NULL))",
|
||||
"The employee, department, company or employee category of this request is missing. Please make sure that your user login is linked to an employee."),
|
||||
('duration_check', "CHECK((allocation_type != 'regular'))", "The duration must be greater than 0."),
|
||||
]
|
Reference in New Issue
Block a user