会员列表导出

This commit is contained in:
李鹏宇
2026-04-24 15:08:10 +08:00
parent 433b82fc9e
commit d2946d9f4a
2 changed files with 16 additions and 0 deletions
@@ -38,6 +38,7 @@ class YuthonHrEmployee(models.Model):
('formal_none', '正式合同(无固定)'),
('part_time', '兼职协议'), ('employment', '用工协议'), ('internship', '实习协议')], string="用工形式")
contract_type_id = fields.Many2one(related='contract_id.contract_type_id', string="用工形式")
party_id = fields.Many2one(related='contract_id.party_id', string="甲方(用人单位)", store=True)
date_end = fields.Date(string="合同结束日期", compute='_compute_date_end')
# version = fields.Char(related='contract_id.version', string="版本")
end_comparison = fields.Selection([('red', '小于30天'), ('yellow', '小于60天'), ('blue', '小于90天')], string="结束时间对比(颜色)",
@@ -78,6 +79,18 @@ class YuthonHrEmployee(models.Model):
bank_account = fields.Char(string="银行卡号")
user_location_type = fields.Selection([('formal', '本地农业'), ('labor', '本地非农业'),
('part_time', '外地农业'), ('practice', '外地非农业')], string="户籍类型")
is_local_location = fields.Char(
string="是否外地",
compute='_compute_is_local_location',
)
@api.depends('user_location_type')
def _compute_is_local_location(self):
for rec in self:
if rec.user_location_type in ('formal', 'labor'):
rec.is_local_location = '否'
else:
rec.is_local_location = '是'
duty_replacement_card = fields.Integer(string="值班补卡次数(月)")
# 工作信息
entry_date = fields.Date(string="入职日期")
@@ -594,6 +594,9 @@
<field name="work_phone" readonly="1"/>
<field name="department_id" readonly="1" options='{"no_open": True, "no_create": True}'/>
<field name="job_id" readonly="1" options='{"no_open": True, "no_create": True}'/>
<field name="party_id" readonly="1" options='{"no_open": True}'/>
<field name="user_type" readonly="1"/>
<field name="is_local_location" readonly="1" string="是否外地"/>
<field name="identification_id" readonly="1"/>
<field name="entry_date" readonly="1"/>
<field name="departure_date" readonly="1"/>