45 lines
2.6 KiB
Python
45 lines
2.6 KiB
Python
from odoo import models, fields, api
|
|
|
|
|
|
class YuthonSocialFilesApproval(models.Model):
|
|
_name = 'yuthon.social.files.approval'
|
|
_description = '社保档案'
|
|
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
|
|
|
name = fields.Char(string='档案名称', required=True)
|
|
code = fields.Char(string="编号",
|
|
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_social_files_approval_code'))
|
|
resignation_name = fields.Char(string='姓名')
|
|
phone = fields.Char(string='手机号')
|
|
card = fields.Char(string='身份证号')
|
|
form_employment = fields.Selection([('exercitation', '实习'),
|
|
('expatriate', '外派'),
|
|
('tryout', '试用'),
|
|
('official', '正式'),
|
|
], string="聘用形式")
|
|
form_management = fields.Selection([('hq', '总部'), ('branch', '分公司')], string="管理形式")
|
|
subject_contract = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储')], string="合同主体")
|
|
social_entity = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储')], string="社保主体")
|
|
provident_entity = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储')], string="公积金主体")
|
|
department_id = fields.Many2one('hr.department', string='部门')
|
|
job_id = fields.Many2one('hr.job', string="岗位")
|
|
entry_time = fields.Datetime(string="入职时间")
|
|
separation_time = fields.Datetime(string="离职时间")
|
|
city_work = fields.Char(string="工作城市")
|
|
social_city = fields.Char(string="社保城市")
|
|
provident_city = fields.Char(string="公积金城市")
|
|
social_security_base = fields.Float(string="社保基数")
|
|
provident_base = fields.Float(string="公积金基数")
|
|
social_group = fields.Char(string="社保组")
|
|
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
|
|
default='normal')
|
|
active = fields.Boolean('Active', default=True, tracking=True)
|
|
work_end = fields.Boolean(string="结束")
|
|
|
|
def _get_default_name_title(self):
|
|
return self._description if self._description else self._name
|
|
|
|
name_title = fields.Char(default=_get_default_name_title)
|
|
self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])])
|
|
|