Files
gzth/yuthon_will_task/models/yuthon_will_task.py
T
2024-11-16 11:26:15 +08:00

21 lines
1.1 KiB
Python

from odoo import api, fields, models, modules
import datetime
class YuthonWillTask(models.Model):
_name = 'yuthon.will.task'
_description = '待办'
_rec_name = 'task_content'
priority = fields.Selection([('general', '不紧急不重要'), ('important', '重要不紧急'),
('urgent', '紧急不重要'), ('very_urgent', '重要且紧急')], string='优先级')
task_type = fields.Many2one('task.type.setting', string='任务类型')
task_content = fields.Text(string='任务内容')
remarks = fields.Text(string='备注')
creation_time = fields.Date(string='创建时间')
employee_ids = fields.Many2many('hr.employee', string='人员', default=lambda self: self.env.user.employee_id)
remind = fields.Selection([('fifteen', '提醒-15分钟'), ('thirty', '提醒-30分钟'), ('one_hour', '提醒-1小时'),
('two_hour', '提醒-2小时'), ('one_day', '提醒-1天')], string='提醒')
start_time = fields.Datetime(string='开始时间')
end_time = fields.Datetime(string='结束时间')