@@ -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
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
批量生成新的权限组
|
||||
|
||||
@@ -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': {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<group>
|
||||
<field name="current_year"/>
|
||||
<field name="current_month"/>
|
||||
<field name="password" help="请输入密码"/>
|
||||
<field name="password" placeholder="请输入密码"/>
|
||||
</group>
|
||||
</sheet>
|
||||
<footer>
|
||||
|
||||
@@ -15,7 +15,7 @@ class YuthonWillTask(models.Model):
|
||||
|
||||
priority = fields.Selection([('general', '不紧急不重要'), ('important', '重要不紧急'),
|
||||
('urgent', '紧急不重要'), ('very_urgent', '重要且紧急')], string='优先级')
|
||||
user_id = fields.Many2one('res.users', string="创建人", default=lambda self: self.env.user)
|
||||
user_id = fields.Many2one('res.users', string="创建人")
|
||||
company_id = fields.Many2one('res.company', string="公司", default=lambda self: self.env.company)
|
||||
task_content = fields.Text(string='任务内容')
|
||||
remarks = fields.Text(string='备注')
|
||||
|
||||
Reference in New Issue
Block a user