添加功能

This commit is contained in:
李鹏宇
2026-02-22 17:59:29 +08:00
parent acdc79a37b
commit 7f658e8e06
3 changed files with 10 additions and 1 deletions
@@ -109,9 +109,16 @@ class YuthonMedicalManage(models.Model):
current_date = fields.Date.today()
current_year = str(current_date.year)
last_year = str(int(current_year) - 1)
target_companies = ['广州市天河投资集团有限公司', '广州市天投城市建设开发有限公司',
'广州天投云擎数字科技有限公司']
party_setting_records = self.env['yuthon.party.setting'].search([
('party', 'in', target_companies)
]).ids
open_employees = self.env['hr.employee'].search([
('user_state', '=', 'in'),
('company_id.name', '=', '集团本部')
('company_id.name', '=', '集团本部'),
('contract_id.party_id', 'in', party_setting_records),
('active', '=', True)
])
for employee in open_employees:
medical_manage_rec = self.env['yuthon.medical.manage'].search([