Merge pull request !2610 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-04-29 04:34:54 +00:00
committed by Gitee
3 changed files with 5 additions and 11 deletions
+2 -3
View File
@@ -15,15 +15,14 @@ class YuthonWillTask(models.Model):
priority = fields.Selection([('general', '不紧急不重要'), ('important', '重要不紧急'),
('urgent', '紧急不重要'), ('very_urgent', '重要且紧急')], string='优先级')
task_type = fields.Many2one('task.type.setting', string='任务类型')
user_id = fields.Many2one('res.users', string="创建人", default=lambda self: self.env.user)
task_content = fields.Text(string='任务内容')
remarks = fields.Text(string='备注')
creation_time = fields.Date(string='创建时间', default=fields.Date.today())
employee_ids = fields.Many2many('hr.employee', 'will_task_employee_rel', 'custom_id', 'employee_id',
string='人员', default=lambda self: self.env.user.employee_id)
employee_ids2 = fields.Many2many('hr.employee', 'will_task_employee_rel2',
'custom_id', 'employee_id', string='司机', store=True)
employee_ids2 = fields.Many2many('hr.employee', 'will_task_employee_rel2', 'custom_id', 'employee_id',
string='司机')
users_ids = fields.Many2many('res.users', string='用户', store=True)
user_role_ids = fields.Many2many('soong.user.role', string='角色')
task_time_ids = fields.Many2many('yuthon.task.time', string='提醒')
@@ -13,7 +13,6 @@
<field name='start_time' required="1"/>
<field name='task_content' required="1"/>
<field name='employee_ids' widget="many2many_tags" required="1"/>
<field name='task_type'/>
<field name='priority'/>
<field name='end_time' optional="hide" />
<field name='creation_time' optional="hide"/>
@@ -66,7 +65,6 @@
<field name="employee_ids" widget="many2many_tags" options="{'no_create': True}"/>
<field name='employee_ids2' widget="many2many_tags" domain="[('user_role_ids.name', 'in', ['司机'])]"/>
<field name='users_ids' widget="many2many_tags" invisible="1"/>
<field name="task_type"/>
<field name="remarks"/>
<field name="creation_time" invisible="1"/>
</group>
@@ -95,7 +93,6 @@
<field name='start_time' required="1"/>
<field name='task_content' required="1"/>
<field name='employee_ids' widget="many2many_tags" required="1"/>
<field name='task_type'/>
<field name='priority'/>
<field name='end_time' optional="hide" />
<field name='creation_time' optional="hide"/>
@@ -135,7 +132,6 @@
<field name="employee_ids" widget="many2many_tags" options="{'no_create': True}"/>
<field name='employee_ids2' widget="many2many_tags" domain="[('user_role_ids.name', 'in', ['司机'])]"/>
<field name='users_ids' widget="many2many_tags" invisible="1"/>
<field name="task_type"/>
<field name="remarks"/>
<field name="creation_time" invisible="1"/>
</group>
@@ -165,7 +161,6 @@
quick_create_view_id="%(yuthon_will_task.view_yuthon_will_task_form)d"
color="employee_ids">
<field name="priority"/>
<field name="task_type"/>
</calendar>
</field>
</record>
+3 -3
View File
@@ -5,12 +5,12 @@
<field name="model">task.room.wizard</field>
<field name="arch" type="xml">
<form string="安排日程会议">
<group col="3">
<group col="2">
<group>
<button name="create_will_task" type="object" string="日程" class="btn btn-primary"/>
<button name="create_will_task" type="object" string="日程" class="btn btn-primary button_width"/>
</group>
<group>
<button name="create_room" type="object" string="会议" class="btn btn-primary"/>
<button name="create_room" type="object" string="会议" class="btn btn-primary button_width"/>
</group>
</group>
<footer/>