diff --git a/yuthon_holiday/i18n/zh_CN.po b/yuthon_holiday/i18n/zh_CN.po
index 80bfbe3c8..12e8fc015 100644
--- a/yuthon_holiday/i18n/zh_CN.po
+++ b/yuthon_holiday/i18n/zh_CN.po
@@ -88,6 +88,13 @@ msgstr "开始时间"
msgid "Hour to"
msgstr "结束时间"
+#. module: hr_holidays
+#. odoo-python
+#: code:addons/hr_holidays/models/hr_leave.py:0
+#, python-format
+msgid "There is no valid allocation to cover that request."
+msgstr "假期时间段重复冲突,请修改!。"
+
#. module: hr_holidays
#: model:ir.model.fields.selection,name:hr_holidays.selection__hr_leave__request_hour_from__0
#: model:ir.model.fields.selection,name:hr_holidays.selection__hr_leave__request_hour_to__0
diff --git a/yuthon_hr_employee/models/yuthon_hr_department.py b/yuthon_hr_employee/models/yuthon_hr_department.py
index 578309e50..08fab02ac 100644
--- a/yuthon_hr_employee/models/yuthon_hr_department.py
+++ b/yuthon_hr_employee/models/yuthon_hr_department.py
@@ -24,6 +24,12 @@ class YuthonHrDepartment(models.Model):
company_id = fields.Many2one('res.company', string="公司", index=True, default=lambda self: self.env.company)
pinyin_name = fields.Char(string="拼音名称", compute='_compute_pinyin', index=True, store=True)
+ @api.constrains('create_date', 'end_date')
+ def _check_start_end_time(self):
+ for record in self:
+ if record.create_date and record.end_date and record.create_date > record.end_date:
+ raise models.ValidationError("开始时间不能大于结束时间!")
+
def do_department_to_res_groups(self):
"""
批量生成新的权限组
diff --git a/yuthon_salary/wizard/salary_print_wizard.py b/yuthon_salary/wizard/salary_print_wizard.py
index 66fa437c5..2a776c93e 100644
--- a/yuthon_salary/wizard/salary_print_wizard.py
+++ b/yuthon_salary/wizard/salary_print_wizard.py
@@ -26,12 +26,6 @@ class SalaryPrintWizard(models.Model):
], string="月份", default=lambda self: str(datetime.datetime.now().month))
password = fields.Char(string='密码')
- @api.onchange('password')
- def _check_password(self):
- login = self.env.user.login
- if self.password != login:
- raise ValidationError('密码错误!')
-
def print_fixed_report(self):
fields_list = [
'employee_id',
@@ -166,6 +160,9 @@ class SalaryPrintWizard(models.Model):
],
'field_order': str([i for i in range(1, len(fields_list) + 1)])
}
+ login = self.env.user.login
+ if self.password != login:
+ raise ValidationError('密码错误!')
return {
'type': 'ir.actions.report',
'data': {
diff --git a/yuthon_salary/wizard/salary_print_wizard_views.xml b/yuthon_salary/wizard/salary_print_wizard_views.xml
index 9a9dd19c1..0f0aa0f88 100644
--- a/yuthon_salary/wizard/salary_print_wizard_views.xml
+++ b/yuthon_salary/wizard/salary_print_wizard_views.xml
@@ -9,7 +9,7 @@
-
+