@@ -34,7 +34,7 @@ class RoomBooking(models.Model):
|
||||
is_day = fields.Boolean(string="提前一天", default=True)
|
||||
meeting_type = fields.Selection([('up', '线上'), ('down', '线下'), ('exterior', '外部')], default='down', string="会议形式",
|
||||
required=True)
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='所属公司')
|
||||
meeting_type_id = fields.Many2one('room.meeting.type', string="会议类型")
|
||||
room_users_ids = fields.Many2many('res.users', string="参会人员", store=True)
|
||||
|
||||
@@ -28,7 +28,7 @@ class Room(models.Model):
|
||||
# Technical/Statistics
|
||||
access_token = fields.Char("Access Token", default=lambda self: str(uuid4()), copy=False, readonly=True, required=True)
|
||||
bookings_count = fields.Integer("Bookings Count", compute="_compute_bookings_count")
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='公司')
|
||||
is_available = fields.Boolean(string="Is Room Currently Available", compute="_compute_is_available")
|
||||
next_booking_start = fields.Datetime("Next Booking Start", compute="_compute_next_booking_start")
|
||||
|
||||
@@ -22,7 +22,7 @@ class YuthonUserRole(models.Model):
|
||||
personnel = fields.Text(string="在岗人员", store=True)
|
||||
employee_ids = fields.One2many('hr.employee', 'user_role_id')
|
||||
child_ids = fields.One2many('soong.user.role', 'parent_id', string='下级角色', index=True)
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储'), ('thtjbb', '天河投资本部')], string="所属公司", compute='compute_company')
|
||||
pinyin_name = fields.Char(string="拼音名称", compute='_compute_pinyin', index=True, store=True)
|
||||
|
||||
@@ -42,7 +42,7 @@ class YuthonUserRole(models.Model):
|
||||
|
||||
@api.depends('department_id')
|
||||
def compute_company(self):
|
||||
company_mapping = {'天河投资集团': 'thtz',
|
||||
company_mapping = {'集团本部': 'thtz',
|
||||
'天河物管': 'thwg',
|
||||
'天河粮储': 'thlc',
|
||||
'天河投资本部': 'thtjbb'}
|
||||
@@ -51,7 +51,7 @@ class YuthonUserRole(models.Model):
|
||||
department = record.department_id
|
||||
while department and department.id not in visited_departments:
|
||||
visited_departments.add(department.id)
|
||||
if department.name == '天河投资集团':
|
||||
if department.name == '集团本部':
|
||||
record.yuthon_company = 'thtz'
|
||||
break
|
||||
elif department.name in company_mapping:
|
||||
|
||||
@@ -12,7 +12,7 @@ class HrContract(models.Model):
|
||||
name = fields.Char(string="合同名称", compute='_compute_name', readonly=False)
|
||||
resource_calendar_id = fields.Many2one('resource.calendar', string='考勤时间表')
|
||||
date_of_entry = fields.Date(string="入职时间", default=lambda self: self._default_date_of_entry())
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
related='employee_id.yuthon_company', string="所属公司", readonly=False)
|
||||
work_entry_source = fields.Selection([
|
||||
('calendar', '考勤安排'),
|
||||
|
||||
@@ -9,6 +9,6 @@ class YuthonHolidaySetting(models.Model):
|
||||
_description = '请假流程说明'
|
||||
|
||||
name = fields.Text(string='名称')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='所属公司')
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='所属公司')
|
||||
department_ids = fields.Many2many('hr.department', string="部门")
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class HrAttendanceMonth(models.Model):
|
||||
is_statistics = fields.Boolean(string="是否已统计", store=True, default=False)
|
||||
statistics_time = fields.Datetime(string="统计时间")
|
||||
attendance_month_detail_ids = fields.One2many(string="出勤月度汇总明细", comodel_name='hr.attendance.month.detail', inverse_name='hr_attendance_month_id')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],string='公司')
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],string='公司')
|
||||
|
||||
def _compute_name(self):
|
||||
for record in self:
|
||||
@@ -128,7 +128,7 @@ class HrAttendanceMonthDetail(models.Model):
|
||||
|
||||
note = fields.Char(string='备注')
|
||||
hr_attendance_month_id = fields.Many2one('hr.attendance.month', string="出勤月度汇总", ondelete="cascade", readonly=True)
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='公司')
|
||||
signature = fields.Image(string="签名", copy=False, attachment=True, max_width=1024, max_height=1024)
|
||||
signed_by = fields.Char(string="签名者", copy=False)
|
||||
|
||||
@@ -6,7 +6,7 @@ class OvertimePage(models.Model):
|
||||
_name = 'overtime.page'
|
||||
_description = '加班说明配置'
|
||||
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='公司')
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='公司')
|
||||
department_id = fields.Many2one("hr.department", string="部门")
|
||||
day_time = fields.Char(string="工作日加班时间不超过")
|
||||
month_time = fields.Char(string="公休日和节假日不超过")
|
||||
|
||||
@@ -25,7 +25,7 @@ class HrAttendanceMonthWizard(models.TransientModel):
|
||||
('11', '11月份'),
|
||||
('12', '12月份')
|
||||
], string="考勤月份")
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='公司', default=lambda self: self._get_default_yuthon_company())
|
||||
|
||||
def _get_default_yuthon_company(self):
|
||||
|
||||
@@ -13,7 +13,7 @@ class HrJob(models.Model):
|
||||
]
|
||||
|
||||
number = fields.Char(string="序号")
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'), ('thtjbb', '集团本部')], string="所属公司")
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储'), ('thtjbb', '集团本部')], string="所属公司")
|
||||
job_type_id = fields.Many2one('hr.job.type', string="岗位类别")
|
||||
start_date = fields.Date(string="生效日期", default=lambda self: fields.Date.today())
|
||||
end_date = fields.Date(string="失效日期", default=fields.Date.from_string('2099-01-01'))
|
||||
|
||||
@@ -14,7 +14,7 @@ class YuthonHrDepartment(models.Model):
|
||||
department_function = fields.Char(string="部门职能")
|
||||
is_institution = fields.Boolean(string="是否机构")
|
||||
is_global_department = fields.Boolean(string="是否全局部门")
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储')], default='thtz', store=True, compute="_compute_company",string="所属公司")
|
||||
create_date = fields.Date(string="创建时间", default=fields.Date.today())
|
||||
start_date = fields.Date(string="生效日期", default=fields.Date.today())
|
||||
@@ -82,7 +82,7 @@ class YuthonHrDepartment(models.Model):
|
||||
@api.depends('name', 'parent_id')
|
||||
def _compute_company(self):
|
||||
company_mapping = {
|
||||
'天河投资集团': 'thtz',
|
||||
'集团本部': 'thtz',
|
||||
'天河物管': 'thwg',
|
||||
'天河粮储': 'thlc',
|
||||
'天河投资本部': 'thtjbb',
|
||||
|
||||
@@ -38,7 +38,7 @@ class YuthonHrEmployee(models.Model):
|
||||
|
||||
contract_company = fields.Selection([('thtz', '天河投资'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储'), ('ttcj','天投城建')], default='thtz', string="合同所属公司")
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储')], default='thtz', store=True, compute="compute_company", string="所属公司")
|
||||
# 个人信息
|
||||
user_salary = fields.Float(string="基本工资")
|
||||
@@ -237,7 +237,7 @@ class YuthonHrEmployee(models.Model):
|
||||
|
||||
@api.depends('department_id')
|
||||
def compute_company(self):
|
||||
company_mapping = {'天河投资集团': 'thtz',
|
||||
company_mapping = {'集团本部': 'thtz',
|
||||
'天河物管': 'thwg',
|
||||
'天河粮储': 'thlc',
|
||||
'天河投资本部': 'thtjbb'}
|
||||
@@ -246,7 +246,7 @@ class YuthonHrEmployee(models.Model):
|
||||
department = record.department_id
|
||||
while department and department.id not in visited_departments:
|
||||
visited_departments.add(department.id)
|
||||
if department.name == '天河投资集团':
|
||||
if department.name == '集团本部':
|
||||
record.yuthon_company = 'thtz'
|
||||
break
|
||||
elif department.name in company_mapping:
|
||||
|
||||
@@ -26,7 +26,7 @@ class YuthonOnboardApproval(models.Model):
|
||||
employee_name = fields.Char(string='姓名')
|
||||
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('ttcj','天投城建'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('ttcj','天投城建'),
|
||||
('thlc', '天河粮储')], string="甲方")
|
||||
account = fields.Char(string='账号')
|
||||
reason = fields.Html(string="正文")
|
||||
|
||||
@@ -10,7 +10,7 @@ class YuthonPrepareApproval(models.Model):
|
||||
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_prepare_approval_code'))
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string="所属公司")
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string="所属公司")
|
||||
name = fields.Char(string='标题')
|
||||
reason = fields.Html(string="正文")
|
||||
is_issues = fields.Boolean(string='是否上会')
|
||||
@@ -87,7 +87,7 @@ class PrepareApprovalLine(models.Model):
|
||||
prepare_approval_id = fields.Many2one('yuthon.prepare.approval', string="编制调整需求表")
|
||||
hr_job_id = fields.Many2one('hr.job', string='工作岗位')
|
||||
department_id = fields.Many2one("hr.department", string="部门")
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储')], string="所属公司")
|
||||
job_type_id = fields.Many2one('hr.job.type', string="岗位类型")
|
||||
compiling_external = fields.Integer(string="编制外人数")
|
||||
@@ -143,7 +143,7 @@ class NewPrepareApprovalLine(models.Model):
|
||||
prepare_approval_id = fields.Many2one('yuthon.prepare.approval', string="编制调整需求表")
|
||||
hr_job_id = fields.Many2one('hr.job', string='工作岗位')
|
||||
department_id = fields.Many2one("hr.department", string="部门")
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储')], string="所属公司")
|
||||
job_type_id = fields.Many2one('hr.job.type', string="岗位类型")
|
||||
compiling_external = fields.Integer(string="编制外人数")
|
||||
|
||||
@@ -42,7 +42,7 @@ class YuthonReassignmentApproval(models.Model):
|
||||
change_rank = fields.Char(string='职级')
|
||||
change_reason = fields.Char(string="异动原因")
|
||||
change_date = fields.Date(string="调动日期")
|
||||
change_yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
change_yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储')], string="任职单位")
|
||||
handover_date = fields.Date(string="移交日期")
|
||||
handover_person_id = fields.Many2one("hr.employee", string="工作接交人")
|
||||
|
||||
@@ -18,7 +18,7 @@ class YuthonRecruitmentApproval(models.Model):
|
||||
issues_result = fields.Html(string="会议结果")
|
||||
related_issues_id = fields.Many2one('issue.library', string="关联议题")
|
||||
notice_documents_ids = fields.Many2many('ir.attachment', string='议题附件')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储')], string="所属公司")
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
|
||||
|
||||
@@ -15,7 +15,7 @@ class YuthonRegularizationPrepareApproval(models.Model):
|
||||
job_id = fields.Many2one(related='users_id.employee_id.job_id', string="主岗")
|
||||
phone = fields.Char(string='手机号')
|
||||
job = fields.Char(string="职务")
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储')], string="任职单位")
|
||||
job_type_id = fields.Many2one('hr.job.type', string="岗位类别")
|
||||
onboarding_time = fields.Date(related='users_id.employee_id.open_start_time',string="入职日期")
|
||||
|
||||
@@ -11,7 +11,7 @@ class YuthonRewardApproval(models.Model):
|
||||
text = fields.Text(string='正文')
|
||||
code = fields.Char(string="编号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_salary_approval_code'))
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储')], string="所属公司")
|
||||
users_id = fields.Many2one('res.users', string="录入人", default=lambda self: self.env.user.id)
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
|
||||
@@ -14,7 +14,7 @@ class YutransferApproval(models.Model):
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_leaving_approval_code'))
|
||||
users_id = fields.Many2one('res.users', string="录入人", default=lambda self: self.env.user.id)
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储')], string="所属公司")
|
||||
main_post = fields.Many2one("hr.job", string="主岗")
|
||||
duties = fields.Char(string="职务")
|
||||
|
||||
@@ -8,7 +8,7 @@ class RoomBooking(models.Model):
|
||||
is_issue = fields.Boolean(string="是否关联议题")
|
||||
issue_meeting_line_ids = fields.One2many('issue.meeting.line', 'meeting_booking_id', string="关联议题明细行")
|
||||
number_of_meetings = fields.Integer(string='会议次数')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='公司')
|
||||
|
||||
def bottom_meeting_approval(self):
|
||||
|
||||
@@ -14,8 +14,8 @@ class IssueApproval(models.Model):
|
||||
create_time = fields.Date(string='创建日期', default=lambda self: fields.Date.today())
|
||||
employee_id = fields.Many2one('hr.employee', string="经办人", default=lambda self: self.env.user.employee_id)
|
||||
department_id = fields.Many2one(related='employee_id.department_id', string="部门")
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'),
|
||||
('thtjbb', '天河投资本部')],
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储'),
|
||||
('thtjbb', '集团本部')],
|
||||
related='employee_id.yuthon_company', string="所属公司")
|
||||
user_id = fields.Many2one('res.users', string="经办人", default=lambda self: self.env.user)
|
||||
meeting_details = fields.Char(string="会议详情")
|
||||
|
||||
@@ -15,7 +15,7 @@ class IssueApprovalDecision(models.Model):
|
||||
team_meet = fields.Selection([('approval', '审'), ('decide', '决')], string='经营班子会')
|
||||
board_meet = fields.Selection([('approval', '审'), ('decide', '决'), ('commission', '授权投决会')], string='董事会', compute='_compute_board_meet', readonly=False)
|
||||
district_bureau = fields.Selection([('record', '备案'), ('approved', '核准'), ('record_approved', '备案、核准')], string='上级单位')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储')], string="所属公司")
|
||||
department_id = fields.Many2one('hr.department', string="部门")
|
||||
start_date = fields.Date(string="生效日期")
|
||||
|
||||
@@ -37,7 +37,7 @@ class IssueLibrary(models.Model):
|
||||
# 权限相关隐藏字段
|
||||
employee_id = fields.Many2one('hr.employee', string='创建人', default=lambda self: self.env.user.employee_id)
|
||||
department_id = fields.Many2one('hr.department', string='部门', related='employee_id.department_id')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储')], string="所属公司", related='employee_id.yuthon_company')
|
||||
users_role_ids = fields.Many2many('soong.user.role', string='角色范围', related='employee_id.user_role_ids')
|
||||
approval_name = fields.Char(string="审批标题")
|
||||
|
||||
@@ -11,7 +11,7 @@ class IssueMeetingMinutes(models.Model):
|
||||
|
||||
name = fields.Char(string='名称')
|
||||
number_of_meetings = fields.Integer(string='会议次数')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='公司')
|
||||
meeting_id = fields.Many2one('room.booking', string='会议名称', required=True)
|
||||
meeting_type_id = fields.Many2one('room.meeting.type', string="会议类型")
|
||||
|
||||
@@ -26,7 +26,7 @@ class PropertyBankStatements(models.Model):
|
||||
contract_penalty = fields.Char(string="合同累计违约金")
|
||||
original_amount = fields.Float(string='交易金额')
|
||||
is_reconciliation = fields.Boolean('是否已对账')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],string='所属公司')
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],string='所属公司')
|
||||
voucher_type = fields.Selection([('electronic_transfer', '电子转账凭证'), ('telegraphic_transfer', '电汇凭证')], string='凭证种类')
|
||||
remake = fields.Text('备注')
|
||||
property_ids = fields.Many2many('yuthon.property', string='物业地址')
|
||||
|
||||
@@ -17,7 +17,7 @@ class PropertyEligibility(models.Model):
|
||||
eligibility_ids = fields.One2many('property.eligibility.line', 'eligibility_id', string="意向客户明细")
|
||||
sincerity_gold = fields.Float(string="诚意金")
|
||||
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='公司')
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='公司')
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
is_issues = fields.Boolean(string='是否上会')
|
||||
issues_result = fields.Html(string="会议结果")
|
||||
|
||||
@@ -12,7 +12,7 @@ class PropertyIntentionApproval(models.Model):
|
||||
name = fields.Char(string="标题")
|
||||
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_intention_code'))
|
||||
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='公司')
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='公司')
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
is_issues = fields.Boolean(string='是否上会')
|
||||
issues_result = fields.Html(string="会议结果")
|
||||
|
||||
@@ -13,7 +13,7 @@ class PropertyTransferApproval(models.Model):
|
||||
code = fields.Char(string="编号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('property_transfer_code'))
|
||||
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='公司')
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='公司')
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
is_issues = fields.Boolean(string='是否上会')
|
||||
issues_result = fields.Html(string="会议结果")
|
||||
|
||||
@@ -11,7 +11,7 @@ class HrPayrollStructure(models.Model):
|
||||
lv_name = fields.Char(related='level_id.name', string='级别名称', store=True)
|
||||
name = fields.Char(string="职级名称")
|
||||
sequence = fields.Char(string='级别序号', store=True)
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='所属公司')
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='所属公司')
|
||||
create_time = fields.Date(string="生效日期", default=fields.Date.today())
|
||||
end_time = fields.Date(string="失效日期")
|
||||
is_enable = fields.Boolean(string="启用", default=True)
|
||||
|
||||
@@ -6,5 +6,5 @@ class HrPayrollStructureType(models.Model):
|
||||
_description = '职级类别'
|
||||
|
||||
name = fields.Char(string='职级类型', required=True)
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='所属公司')
|
||||
@@ -6,7 +6,7 @@ class InheritHrSalaryRule(models.Model):
|
||||
_order = 'sequence asc'
|
||||
|
||||
category_id = fields.Many2one('hr.salary.rule.category', required=False, string='类别')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='所属公司')
|
||||
amount_fix = fields.Float(string='固定金额', group_operator=None)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ class YuthonPayrollCommon(models.Model):
|
||||
_description = '薪资常用项'
|
||||
|
||||
name = fields.Char(string='工资项名称')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],string='公司')
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],string='公司')
|
||||
department_id = fields.Many2one('hr.department', string="部门")
|
||||
conditional_formulas = fields.Char(string='条件公式')
|
||||
start_date = fields.Date(string="生效日期", default=fields.Date.today())
|
||||
@@ -43,7 +43,7 @@ class YuthonPayrollCommon(models.Model):
|
||||
if ins.name == '工龄':
|
||||
formula_salary = "result = int((employee.cumulative_work_month / 12) * 10)"
|
||||
if ins.name == '工会会费':
|
||||
formula_salary = "result = contract.wage * 0.05"
|
||||
formula_salary = "result = contract.wage * -0.05"
|
||||
if ins.name == '加班费':
|
||||
formula_salary = "result = employee.all_overtime_hours - 40 * contract.wage /21.75 / 8"
|
||||
rule_list.append([0, 0, {
|
||||
@@ -62,7 +62,7 @@ class YuthonPayrollTemporary(models.Model):
|
||||
_description = '薪资临时项'
|
||||
|
||||
name = fields.Char(string='工资项名称')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='公司')
|
||||
department_id = fields.Many2one('hr.department', string="部门")
|
||||
start_date = fields.Date(string="生效日期", default=fields.Date.today())
|
||||
|
||||
@@ -7,7 +7,7 @@ class YuthonPayrollTypeSetting(models.Model):
|
||||
_description = '职级类别配置'
|
||||
|
||||
name = fields.Char(string='职级类别')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储')], string='所属公司')
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class SalaryComputeWizard(models.Model):
|
||||
_name = 'salary.compute.wizard'
|
||||
_description = '薪资计算弹窗'
|
||||
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='公司')
|
||||
employee_ids = fields.Many2many('hr.employee', string='人员', store=True)
|
||||
select_year = fields.Selection(selection=[(str(i), str(i)) for i in range(2024, 2060)], string='年份',
|
||||
|
||||
@@ -52,8 +52,8 @@ class YuthonSalaryWizard(models.Model):
|
||||
}
|
||||
|
||||
def salary_tz_data(self,row,salary_dates):
|
||||
yuthon_company_dict = {'天河投资集团': 'thtz', '天河物管': 'thwg', '天河粮储': 'thlc', '': ''}
|
||||
yuthon_company_dict2 = {'天河投资集团': 'TT', '天河物管': 'TW', '天河粮储': 'TL', '': ''}
|
||||
yuthon_company_dict = {'集团本部': 'thtz', '天河物管': 'thwg', '天河粮储': 'thlc', '': ''}
|
||||
yuthon_company_dict2 = {'集团本部': 'TT', '天河物管': 'TW', '天河粮储': 'TL', '': ''}
|
||||
salary_name = self.env['hr.salary.rule']
|
||||
text = row[2].value
|
||||
yuthon_company = yuthon_company_dict.get(row[10].value)
|
||||
@@ -90,8 +90,8 @@ class YuthonSalaryWizard(models.Model):
|
||||
salary_name.create(salary_date)
|
||||
struct_id.write({'default_struct_id': structure_id.id})
|
||||
def salary_lc_data(self, row, salary_dates):
|
||||
yuthon_company_dict = {'天河投资集团': 'thtz', '天河物管': 'thwg', '天河粮储': 'thlc', '': ''}
|
||||
yuthon_company_dict2 = {'天河投资集团': 'TT', '天河物管': 'TW', '天河粮储': 'TL', '': ''}
|
||||
yuthon_company_dict = {'集团本部': 'thtz', '天河物管': 'thwg', '天河粮储': 'thlc', '': ''}
|
||||
yuthon_company_dict2 = {'集团本部': 'TT', '天河物管': 'TW', '天河粮储': 'TL', '': ''}
|
||||
salary_name = self.env['hr.salary.rule']
|
||||
text = row[2].value
|
||||
company_code = yuthon_company_dict.get(row[11].value)
|
||||
@@ -132,8 +132,8 @@ class YuthonSalaryWizard(models.Model):
|
||||
salary_name.create(salary_date)
|
||||
|
||||
def salary_wg_data(self, row, salary_dates):
|
||||
yuthon_company_dict = {'天河投资集团': 'thtz', '天河物管': 'thwg', '天河粮储': 'thlc', '': ''}
|
||||
yuthon_company_dict2 = {'天河投资集团': 'TT', '天河物管': 'TW', '天河粮储': 'TL', '': ''}
|
||||
yuthon_company_dict = {'集团本部': 'thtz', '天河物管': 'thwg', '天河粮储': 'thlc', '': ''}
|
||||
yuthon_company_dict2 = {'集团本部': 'TT', '天河物管': 'TW', '天河粮储': 'TL', '': ''}
|
||||
salary_name = self.env['hr.salary.rule']
|
||||
text = row[2].value
|
||||
yuthon_company = yuthon_company_dict.get(row[16].value)
|
||||
|
||||
@@ -27,7 +27,7 @@ class YuthonWillTask(models.Model):
|
||||
users_ids = fields.Many2many('res.users', string='用户')
|
||||
user_role_ids = fields.Many2many('soong.user.role', string='角色')
|
||||
task_time_ids = fields.Many2many('yuthon.task.time', string='提醒')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='所属公司')
|
||||
yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='所属公司')
|
||||
start_time = fields.Datetime(string='开始时间', default=fields.Datetime.now)
|
||||
end_time = fields.Datetime(string='结束时间', default=lambda self: datetime.combine(datetime.now().date(), time(11, 0, 0)))
|
||||
state = fields.Selection([('will', '待办'), ('done', '已办'), ('cancel', '取消')], default='will', string='状态', store=True)
|
||||
|
||||
Reference in New Issue
Block a user