@@ -118,32 +118,6 @@ class HrLeave(models.Model):
|
||||
hour_batch_id = fields.Many2one(string='批量', comodel_name='hr.leave.batch', ondelete='cascade')
|
||||
leave_documents_ids = fields.Many2many(related='holiday_status_id.leave_documents_id', string="假期详情说明", readonly=True)
|
||||
details = fields.Text(string="假期流程说明")
|
||||
request_hour_from_real = fields.Selection([
|
||||
('0', '0:00'), ('0.5', '0:30'),
|
||||
('1', '01:00'), ('1.5', '01:30'),
|
||||
('2', '02:00'), ('2.5', '02:30'),
|
||||
('3', '03:00'), ('3.5', '03:30'),
|
||||
('4', '04:00'), ('4.5', '04:30'),
|
||||
('5', '05:00'), ('5.5', '05:30'),
|
||||
('6', '06:00'), ('6.5', '06:30'),
|
||||
('7', '07:00'), ('7.5', '07:30'),
|
||||
('8', '08:00'), ('8.5', '08:30'),
|
||||
('9', '09:00'), ('9.5', '09:30'),
|
||||
('10', '10:00'), ('10.5', '10:30'),
|
||||
('11', '11:00'), ('11.5', '11:30'),
|
||||
('12', '12:00'), ('12.5', '12:30'),
|
||||
('13', '13:00'), ('13.5', '13:30'),
|
||||
('14', '14:00'), ('14.5', '14:30'),
|
||||
('15', '15:00'), ('15.5', '15:30'),
|
||||
('16', '16:00'), ('16.5', '16:30'),
|
||||
('17', '17:00'), ('17.5', '17:30'),
|
||||
('18', '18:00'), ('18.5', '18:30'),
|
||||
('19', '19:00'), ('19.5', '19:30'),
|
||||
('20', '20:00'), ('20.5', '20:30'),
|
||||
('21', '21:00'), ('21.5', '21:30'),
|
||||
('22', '22:00'), ('22.5', '22:30'),
|
||||
('23', '23:00'), ('23.5', '23:30')],
|
||||
string='实际开始时间', compute='_compute_request_hour_from_real')
|
||||
# custom_document_ids = fields.Many2many(
|
||||
# string='文件',
|
||||
# comodel_name='ir.attachment',
|
||||
@@ -209,14 +183,6 @@ class HrLeave(models.Model):
|
||||
for leave in leave_ids:
|
||||
leave.state = 'draft'
|
||||
|
||||
@api.depends('request_hour_from')
|
||||
def _compute_request_hour_from_real(self):
|
||||
for record in self:
|
||||
if record.request_hour_from == '9':
|
||||
record.request_hour_from_real = '8'
|
||||
else:
|
||||
record.request_hour_from_real = record.request_hour_from
|
||||
|
||||
@api.depends('date_from', 'date_to', 'resource_calendar_id', 'holiday_status_id.request_unit')
|
||||
def _compute_duration(self):
|
||||
super()._compute_duration()
|
||||
|
||||
@@ -230,7 +230,6 @@
|
||||
<field name="request_unit_hours" invisible="True" force_save="1"/>
|
||||
<field name="request_date_from" width="100px" string="请假日期"/>
|
||||
<field name="request_hour_from" width="200px"/>
|
||||
<field name="request_hour_from_real" invisible="True"/>
|
||||
<field name="request_hour_to" width="200px"/>
|
||||
<field name="request_date_to" invisible="True"/>
|
||||
<field name="number_of_hours_text" string="小时" width="100px" invisible="True"/>
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
<field name='name'>领导日程</field>
|
||||
<field name='res_model'>yuthon.will.task</field>
|
||||
<field name='view_mode'>tree,calendar,form</field>
|
||||
<field name='domain'>[('user_role_ids.name', 'in', ['董事长', '分管领导', '总经理', '部门副经理', '副总经理'])]</field>
|
||||
<field name='domain'>[('user_role_ids.name', 'in', ['董事长', '分管领导', '总经理', '部门副经理', '副总经理', '司机'])]</field>
|
||||
<field name="context">{'search_default_next_seven_days': 1}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user