@@ -6,7 +6,6 @@ from datetime import datetime, time, timedelta
|
||||
class OvertimeApprovals(models.Model):
|
||||
_name = 'overtime.approval'
|
||||
_description = "加班审批"
|
||||
# _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin']
|
||||
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin','soong.workflow.mixin']
|
||||
_rec_name = 'name'
|
||||
|
||||
@@ -61,7 +60,10 @@ class OvertimeUserLine(models.Model):
|
||||
department_id = fields.Many2one('hr.department', string="部门")
|
||||
overtime_hours = fields.Float(string="本月加班时长")
|
||||
documents_ids = fields.Many2many('documents.document', string="附件")
|
||||
|
||||
start_time = fields.Datetime(string="开始时间")
|
||||
end_time = fields.Datetime(string="结束时间")
|
||||
hours = fields.Float(string="加班时长")
|
||||
type_overtime = fields.Selection([('work', '工作日加班'), ('weekend', '周末加班'), ('holiday', '节假日加班')], string="加班类型")
|
||||
# def attendance_button(self):
|
||||
# return {
|
||||
# 'type': 'ir.actions.client',
|
||||
|
||||
@@ -44,7 +44,11 @@
|
||||
<tree editable="bottom">
|
||||
<field name="overtime_approval_id" column_invisible="1"/>
|
||||
<field name="overtime_people"/>
|
||||
<field name="type_overtime"/>
|
||||
<field name="reason_application"/>
|
||||
<field name="start_time"/>
|
||||
<field name="end_time"/>
|
||||
<field name="hours"/>
|
||||
<field name="documents_ids" widget="many2many_tags"/>
|
||||
<field name="overtime_hours"/>
|
||||
</tree>
|
||||
@@ -58,7 +62,6 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="approval_request_overtime" model="ir.actions.act_window">
|
||||
<field name="name">加班</field>
|
||||
<field name="res_model">overtime.approval</field>
|
||||
|
||||
@@ -3,7 +3,7 @@ import datetime
|
||||
|
||||
class HrApplicant(models.Model):
|
||||
_inherit = "hr.applicant"
|
||||
|
||||
_rec_name = 'partner_name'
|
||||
#基础信息
|
||||
name = fields.Char(string="标题")
|
||||
takes_time = fields.Date(string="需要时间")
|
||||
|
||||
@@ -54,9 +54,7 @@ class HrApplicant(models.Model):
|
||||
|
||||
|
||||
def write(self, vals):
|
||||
# 调用父类的 write 方法更新记录
|
||||
res = super(HrApplicant, self).write(vals)
|
||||
# 检查是否修改了 'stage_id' 字段
|
||||
if 'stage_id' in vals:
|
||||
self.is_interview_status = False
|
||||
return res
|
||||
@@ -78,5 +76,6 @@ class HrApplicant(models.Model):
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'yuthon.onboard.approval',
|
||||
"views": [[form_id, "form"]],
|
||||
'target': 'current',
|
||||
}
|
||||
'context': {
|
||||
'onboard_id': self.id, },
|
||||
}
|
||||
@@ -20,12 +20,9 @@ class YuthonOnboardApproval(models.Model):
|
||||
name = fields.Char(string='标题',defualt='人事合同')
|
||||
code = fields.Char(string="编号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_onboard_approval_code'))
|
||||
worker_name = fields.Char(string='姓名')
|
||||
department_id = fields.Many2one('hr.department', string="部门")
|
||||
job_id = fields.Many2one('hr.job', string="岗位")
|
||||
|
||||
onboard_id = fields.Many2one('hr.applicant',string='姓名')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储'), ('tctj', '天投城建')], string="甲方")
|
||||
('thlc', '天河粮储'), ('tctj', '天投城建')], string="甲方")
|
||||
grades_id = fields.Many2one('yuthon.job.lv', string='职级')
|
||||
account = fields.Char(string='账号')
|
||||
bank = fields.Char(string='开户行')
|
||||
@@ -38,14 +35,11 @@ class YuthonOnboardApproval(models.Model):
|
||||
oter = fields.Text(string='其他约定')
|
||||
social_security = fields.Char(string='社保时长')
|
||||
documents_ids = fields.Many2many('documents.document', string="附件")
|
||||
|
||||
details_personal_information_form = fields.Many2one('yuthon.message.login', string="个人信息表详情")
|
||||
details_recruitment_needs_form = fields.Many2one('yuthon.recruitment.approval', string="招聘需求详情")
|
||||
details_interview_form = fields.Many2one('yuthon.interview.approval', string="面试详情")
|
||||
details_personal_information_form_id = fields.Many2one('yuthon.message.login', string="个人信息表详情")
|
||||
details_recruitment_needs_form_id = fields.Many2one('yuthon.recruitment.approval', string="招聘需求详情")
|
||||
details_interview_form_id = fields.Many2one('yuthon.interview.approval', string="面试详情")
|
||||
is_issues = fields.Boolean(string='是否上会')
|
||||
related_issues_id = fields.Many2one('issue.library', string="关联议题")
|
||||
|
||||
|
||||
#合同
|
||||
# 合同
|
||||
contract_code = fields.Char(string='合同编号')
|
||||
contracted_status = fields.Selection([('first', '首签'), ('renew', '续签')], string='合同状态')
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</group>
|
||||
<group col="4" string="乙方信息">
|
||||
<group>
|
||||
<field name="worker_name" required="1"/>
|
||||
<field name="onboard_id" required="1"/>
|
||||
<field name="documents_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
<group>
|
||||
@@ -72,9 +72,9 @@
|
||||
<page string="个人信息详情">
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="details_personal_information_form"/>
|
||||
<field name="details_recruitment_needs_form"/>
|
||||
<field name="details_interview_form"/>
|
||||
<field name="details_personal_information_form_id"/>
|
||||
<field name="details_recruitment_needs_form_id"/>
|
||||
<field name="details_interview_form_id"/>
|
||||
</group>
|
||||
<group>
|
||||
</group>
|
||||
|
||||
@@ -318,6 +318,6 @@ class DisassemblyInformationLine(models.Model):
|
||||
yuthon_property_id = fields.Many2one('yuthon.property', string="关联物业信息")
|
||||
property_id = fields.Many2one('yuthon.property', string="物业名称")
|
||||
rent_area = fields.Float(related='property_id.rentable_area', string="可租面积")
|
||||
start_time = fields.Date(string="生效日期")
|
||||
end_date = fields.Date(string="失效日期")
|
||||
start_time = fields.Date(related='property_id.start_time',string="生效日期")
|
||||
end_date = fields.Date(related='property_id.end_date',string="失效日期")
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ class PropertyMergeApproval(models.Model):
|
||||
self.merge_building_area = merge_building_area
|
||||
self.merge_rent_area = merge_rent_area
|
||||
|
||||
|
||||
def put_merge_message(self):
|
||||
property_list = []
|
||||
property_id = self.env['yuthon.property'].create({
|
||||
|
||||
@@ -41,12 +41,12 @@ class PropertySplitApproval(models.Model):
|
||||
|
||||
def put_split_message(self):
|
||||
property_list = []
|
||||
for i in self.property_split_approval_line_ids:
|
||||
for property_split in self.property_split_approval_line_ids:
|
||||
property_id = self.env['yuthon.property'].create({
|
||||
'name': i.split_property,
|
||||
'building_area': i.split_building_area,
|
||||
'rentable_area': i.split_rent_area,
|
||||
'asset_type_id': i.split_asset_type_id.id,
|
||||
'name': property_split.split_property,
|
||||
'building_area': property_split.split_building_area,
|
||||
'rentable_area': property_split.split_rent_area,
|
||||
'asset_type_id': property_split.split_asset_type_id.id,
|
||||
'property_merge_approval_id':self.property_id.id,
|
||||
'is_done_merge': True
|
||||
})
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
<sheet>
|
||||
<header>
|
||||
<button name="put_split_message" type="object" string="按钮" class="oe_highlight"/>
|
||||
<button name="put_free_splitting" string="自由拆分" type="object" class="oe_highlight"/>
|
||||
<button name="put_evaluation_splitting" string="评估拆分" type="object" class="oe_highlight"/>
|
||||
</header>
|
||||
<group col="2" string="物业信息">
|
||||
<group>
|
||||
@@ -37,8 +39,6 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="split_quantity"/>
|
||||
<button name="put_free_splitting" string="自由拆分" type="object" class="btn btn-primary"/>
|
||||
<button name="put_evaluation_splitting" string="评估拆分" type="object" class="btn btn-primary"/>
|
||||
</group>
|
||||
<group string="审批事项">
|
||||
<field name="name"/>
|
||||
|
||||
Reference in New Issue
Block a user