From 3381c7422382b83227db3e3511c718f693e6ad3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 24 Jul 2025 09:59:21 +0800 Subject: [PATCH 01/13] 1 --- .../models/hr_attendance_detail_wechat.py | 14 ++++++++------ yuthon_work_brand/views/hr_menus.xml | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py index 5888b0760..b33e3276c 100644 --- a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py +++ b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py @@ -86,15 +86,15 @@ class HrAttendanceDetail(models.Model): def create(self, vals_list): res = super(HrAttendanceDetail, self).create(vals_list) for attendance_obj in res: - self.sudo()._do_save_wx_attendance_data(attendance_obj.user_id, attendance_obj.current_data) - self.sudo()._do_plan_save_wx_attendance_data(attendance_obj.user_id, attendance_obj.current_data) + self.sudo()._do_save_wx_attendance_data(attendance_obj.employee_id.user_id, attendance_obj.create_date.date()) + self.sudo()._do_plan_save_wx_attendance_data(attendance_obj.employee_id.user_id, attendance_obj.create_date.date()) return res def write(self, vals): res = super(HrAttendanceDetail, self).write(vals) for attendance_obj in self: - self.sudo()._do_save_wx_attendance_data(attendance_obj.user_id, attendance_obj.current_data) - self.sudo()._do_plan_save_wx_attendance_data(attendance_obj.user_id, attendance_obj.current_data) + self.sudo()._do_save_wx_attendance_data(attendance_obj.employee_id.user_id, attendance_obj.create_date.date()) + self.sudo()._do_plan_save_wx_attendance_data(attendance_obj.employee_id.user_id, attendance_obj.create_date.date()) return res @@ -332,8 +332,8 @@ class HrAttendanceDetail(models.Model): # 同步整理当天出勤数据 attendance_obj = self.env['hr.attendance'].search([("userid", "=", user.oauth_uid), ("current_data", "=", current_date)], limit=1) hr_employee_obj = self.env['hr.employee'].sudo().search([("user_id", "=", user.id)], limit=1) - current_datetime_start = datetime.combine(datetime.strptime(current_date, '%Y-%m-%d'), datetime.min.time()) - current_datetime_end = datetime.combine(datetime.strptime(current_date, '%Y-%m-%d'), datetime.max.time()) + # current_datetime_start = datetime.combine(datetime.strptime(current_date, '%Y-%m-%d'), datetime.min.time()) + # current_datetime_end = datetime.combine(datetime.strptime(current_date, '%Y-%m-%d'), datetime.max.time()) if not attendance_obj: # 判断是否是 普通打卡 if not hr_employee_obj.default_planning_role_id: @@ -367,6 +367,7 @@ class HrAttendanceDetail(models.Model): :return: """ # 同步整理当天出勤数据 + current_date = str(current_date) hr_employee_obj = self.env['hr.employee'].sudo().search([("user_id", "=", user.id)], limit=1) current_datetime_start = datetime.combine(datetime.strptime(current_date, '%Y-%m-%d'), datetime.min.time()) current_datetime_end = datetime.combine(datetime.strptime(current_date, '%Y-%m-%d'), datetime.max.time()) @@ -406,6 +407,7 @@ class HrAttendanceDetail(models.Model): :param attendance_obj: 判断的时刻的考勤集合 :return: """ + current_date = str(current_date) current_datetime_start = datetime.combine(datetime.strptime(current_date, '%Y-%m-%d'), datetime.min.time()) current_datetime_end = datetime.combine(datetime.strptime(current_date, '%Y-%m-%d'), datetime.max.time()) hr_employee_obj = self.env['hr.employee'].sudo().search([("user_id", "=", user.id)], limit=1) diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml index 33e9e709f..f82da962b 100644 --- a/yuthon_work_brand/views/hr_menus.xml +++ b/yuthon_work_brand/views/hr_menus.xml @@ -169,8 +169,8 @@ parent="hr_attendance_root_board_menu" sequence="15" action="yuthon_hr_attendance.hr_attendance_detail_action"/> - From 9bda02d657ae2a2f673cbca167c3969b317a9629 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 24 Jul 2025 10:08:45 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_salary/views/inherit_hr_payslip_views.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index ac6eb5a4c..faade988f 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -241,6 +241,7 @@ + @@ -292,6 +293,7 @@ + @@ -341,6 +343,7 @@ + From 87c2339ac538f8edf2dd1f85291a8552a8bc37cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 24 Jul 2025 10:16:22 +0800 Subject: [PATCH 03/13] 1 --- .../controllers/applet_attendance.py | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index 637bb33e9..14e5dd99f 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -108,13 +108,22 @@ class AppletAttendance(Controller): _logger.info(f"\n应打卡地址 地址验证: {address_id.address_name} 详细: {address_id.address_name2}___") _logger.info(f"\n人员: {employee_id.name} 当前所在地址: {self_address['formatted_address']}__________") _logger.info(f"\n可打卡 当前经度: {kw['att_longitude']} 当前纬度: {kw['att_latitude']} 范围:{address_id.card_rice}米__________") - if self.is_within_radius_geopy(kw['att_latitude'], kw['att_longitude'], address_id.latitude, address_id.longitude, card_rice) and kw['wifi_name'] in wifi_name_list: - message = '可以打卡' - state = 'yes' - _logger.info(f"\n可打卡") - break + if wifi_name_list: + if self.is_within_radius_geopy(kw['att_latitude'], kw['att_longitude'], address_id.latitude, address_id.longitude, card_rice) and kw['wifi_name'] in wifi_name_list: + message = '可以打卡' + state = 'yes' + _logger.info(f"\n可打卡") + break + else: + _logger.info(f"\n不可打卡 ") else: - _logger.info(f"\n不可打卡 ") + if self.is_within_radius_geopy(kw['att_latitude'], kw['att_longitude'], address_id.latitude, address_id.longitude, card_rice): + message = '可以打卡' + state = 'yes' + _logger.info(f"\n可打卡") + break + else: + _logger.info(f"\n不可打卡 ") if self.is_workday(current_date): attendance_id_class = f"{attendance_id.shift_name} {start_time_str}-{end_time_str}" else: From 6d7668da8759d1a176c2f9454262aa6b74aa7806 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 24 Jul 2025 10:56:13 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_salary/views/inherit_hr_payslip_views.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index faade988f..a757a7753 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -394,11 +394,14 @@ + + + @@ -408,7 +411,6 @@ - @@ -447,6 +449,7 @@ + @@ -455,7 +458,6 @@ - From 1b8775dd117b5788244378999ec68a6cf15c17e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 24 Jul 2025 11:24:32 +0800 Subject: [PATCH 05/13] 1 --- attendance_iot/controllers/kaoqin_test.py | 1 - attendance_iot/views/attendance_iot_user_views.xml | 2 +- yuthon_hr_attendance/controllers/applet_attendance.py | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/attendance_iot/controllers/kaoqin_test.py b/attendance_iot/controllers/kaoqin_test.py index bfed3b0c0..ab2a59f8d 100644 --- a/attendance_iot/controllers/kaoqin_test.py +++ b/attendance_iot/controllers/kaoqin_test.py @@ -64,7 +64,6 @@ class BusController(Controller): 'source': 'iot', # 打卡来源 'attendance_iot_id': attendance_iot_id.id, # 打卡设备 }) - request.env(user=SUPERUSER_ID)["hr.attendance.detail"].get_hr_attendance_time(employee_id.user_id.login) return {"Result": 0, "Msg": "添加成功"} @route('/api/v1/user/inf_photo', methods=['POST'], type='json', auth='none', csrf=False) diff --git a/attendance_iot/views/attendance_iot_user_views.xml b/attendance_iot/views/attendance_iot_user_views.xml index af97a3277..6041a586c 100644 --- a/attendance_iot/views/attendance_iot_user_views.xml +++ b/attendance_iot/views/attendance_iot_user_views.xml @@ -8,7 +8,7 @@ - + diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index 14e5dd99f..c57a10121 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -216,7 +216,6 @@ class AppletAttendance(Controller): 'source': 'mini_programs', }) return_data = {'code': '200', 'message': '打卡成功'} - request.env(user=SUPERUSER_ID)["hr.attendance.detail"].get_hr_attendance_time(res_user_id.login) _logger.info("打卡记录创建成功") else: return_data = {'code': '200', 'message': '未识别到员工'} From 8e1b3977c7c27e25a4cf5d1a64a8422b750825bd Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 24 Jul 2025 11:54:13 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wizard/hr_attendance_month_wizard.py | 84 +++++++++++++------ 1 file changed, 57 insertions(+), 27 deletions(-) diff --git a/yuthon_hr_attendance/wizard/hr_attendance_month_wizard.py b/yuthon_hr_attendance/wizard/hr_attendance_month_wizard.py index 1d3441713..8576a1006 100644 --- a/yuthon_hr_attendance/wizard/hr_attendance_month_wizard.py +++ b/yuthon_hr_attendance/wizard/hr_attendance_month_wizard.py @@ -5,6 +5,7 @@ from odoo import models, api, fields, _ from odoo.tools.float_utils import float_round from odoo.exceptions import ValidationError, UserError from datetime import date +from datetime import timedelta class HrAttendanceMonthWizard(models.TransientModel): @@ -101,16 +102,16 @@ class HrAttendanceMonthWizard(models.TransientModel): # 1 生成出勤生成记录 # 2 生成出勤月度明细 # 获取出勤月度汇总记录结果表 - for record in self: - year = record.current_year - month = record.current_month - existing_records = self.env["hr.attendance.month"].search([ - ('current_year', '=', year), - ('current_month', '=', month), - ('company_id', '=', record.company_id.id) - ]) - if existing_records: - raise ValidationError(f"{year}年{month}月分的记录已经存在,不能重复操作.") + # for record in self: + # year = record.current_year + # month = record.current_month + # existing_records = self.env["hr.attendance.month"].search([ + # ('current_year', '=', year), + # ('current_month', '=', month), + # ('company_id', '=', record.company_id.id) + # ]) + # if existing_records: + # raise ValidationError(f"{year}年{month}月分的记录已经存在,不能重复操作.") self.ensure_one() attendance_month_obj = self._get_attendance_month_obj() # 查询所有的当前员工? 是否需要判断当前员工是否关联企业微信??预留 @@ -127,7 +128,7 @@ class HrAttendanceMonthWizard(models.TransientModel): for employee in hr_employee_obj: if ( employee.id not in resource_user_ids and - employee.contract.state not in ['draft', 'cancel'] + employee.contract_id.state not in ['draft', 'cancel'] ): if employee.id not in all_employee_ids: # 判断当前是否已经创建了考勤明细 @@ -140,8 +141,8 @@ class HrAttendanceMonthWizard(models.TransientModel): attendance_month_detail_obj.analysis_attendance_month_detail() self.get_leave_and_overtime_info(employee.id) # 返回action动作 - action = self._hr_attendance_month_detail_action() - return action + action = self._hr_attendance_month_detail_action() + return action # 考勤定时任务 def button_attendance_month(self): @@ -218,10 +219,8 @@ class HrAttendanceMonthWizard(models.TransientModel): start_date = start_in_month end_date = end_in_month - leave = self._create_leave_record(holiday_status_id, start_date, end_date) - leave_days[leave_type] = leave.number_of_days - # leave_days[leave_type] = self._process_shift_days(leave, start_date, end_date) - leave.unlink() + days = self._create_leave_record(holiday_status_id, start_date, end_date) + leave_days[leave_type] = days else: for leave in leave_records: total_days += leave.number_of_days_display @@ -241,13 +240,44 @@ class HrAttendanceMonthWizard(models.TransientModel): # 创建用户记录传入日期来获取天数 def _create_leave_record(self, holiday_status_id, start_date, end_date): - admin_id = self.env['hr.employee'].search([("name", "=", 'Administrator')]) - if not admin_id: - return None - return self.env['hr.leave'].sudo().create({ - 'employee_id': admin_id.id, - 'holiday_status_id': holiday_status_id.id, - 'request_date_from': start_date, - 'request_date_to': end_date, - 'state': 'confirm', - }) + if holiday_status_id.type_of_work == 0: + calendar_leaves = self.env['resource.calendar.leaves'].search([("calendar_id", "=", "行政考勤工作日")]) + holidays_list = [] + shift_days_list = [] + # 提取节假日和调休日 + for leave in calendar_leaves: + if leave.holidays: + holidays_list.extend(leave.holidays.split(',')) + if leave.alternate_rest_day: + holidays_list.extend(leave.alternate_rest_day.split(',')) + if leave.shift_replacement_day: + shift_days_list.extend(leave.shift_replacement_day.split(',')) + + holidays_list = [self.remove_leading_zero(date) for date in holidays_list] + shift_days_list = [self.remove_leading_zero(date) for date in shift_days_list] + + days = 0 # 初始化工作日计数 + current_date = start_date + + while current_date <= end_date: + current_date_str = current_date.strftime('%m月%d日') + current_date_str = self.remove_leading_zero(current_date_str) + is_weekend = current_date.weekday() in [5, 6] + + if current_date_str in holidays_list: + # 如果是法定节假日,不计为工作日 + pass + elif current_date_str in shift_days_list: + # 如果是调休日,无论是否周末都算作工作日 + days += 1 + elif not is_weekend: + # 如果不是周末且不是节假日,算作工作日 + days += 1 + + current_date += timedelta(days=1) + else: + delta = end_date - start_date + days = delta.days + 1 + return days + + From 436e73a4f64056cc5ee1468713b52ce0c53eb1f7 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 24 Jul 2025 11:54:36 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_salary/models/inherit_hr_payslip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index fc9c45ead..dc675ba0f 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -18,7 +18,7 @@ class InheritHrPayslip(models.Model): date_of_entry = fields.Date(related='employee_id.entry_date', string="入职时间", store=True) base_salary = fields.Float(string='基本工资', compute='_compute_salary', store=True) bank_account_id = fields.Many2one(string='银行账号', related='employee_id.bank_account_id', store=True) - tax_payable = fields.Float(string='应补(退)税额', store=True) + tax_payable = fields.Float(string='应补(退)税额') actual_salary = fields.Float(string='实发工资', store=True, compute='_compute_actual_salary') three_one = fields.Float(string='三险一金', store=True, compute='_compute_salary') identification_id = fields.Char(string='证件号码', related='employee_id.identification_id', store=True) From cf263bc7949ad23085b1e96ee1a845cb22f70f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 24 Jul 2025 12:57:36 +0800 Subject: [PATCH 08/13] 1 --- yuthon_hr_attendance/controllers/applet_attendance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index c57a10121..a5131423f 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -206,7 +206,7 @@ class AppletAttendance(Controller): :return: """ _logger.info("-------触发打卡接口/yuthon/att/record---------") - res_user_id = request.env(user=SUPERUSER_ID)["res.users"].search([('id', '=', kw.get('user_id'))]) + res_user_id = request.env(user=SUPERUSER_ID)["res.users"].search([('login', '=', kw.get('user_id'))]) _logger.info(f"传过来的user_id{kw.get('user_id')},名称{res_user_id.name}") employee_id = request.env(user=SUPERUSER_ID)["hr.employee"].search([('name', '=', res_user_id.name)]) if res_user_id: From d98e9eb16e063fb036334f2e733ad294c507a57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 24 Jul 2025 13:02:57 +0800 Subject: [PATCH 09/13] 1 --- yuthon_hr_attendance/controllers/applet_attendance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index a5131423f..c47cd2807 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -206,8 +206,8 @@ class AppletAttendance(Controller): :return: """ _logger.info("-------触发打卡接口/yuthon/att/record---------") - res_user_id = request.env(user=SUPERUSER_ID)["res.users"].search([('login', '=', kw.get('user_id'))]) - _logger.info(f"传过来的user_id{kw.get('user_id')},名称{res_user_id.name}") + res_user_id = request.env(user=SUPERUSER_ID)["res.users"].search([('id', '=', kw.get('user_id'))]) + _logger.info(f"传过来的user_id:{kw.get('user_id')},名称{res_user_id.name}") employee_id = request.env(user=SUPERUSER_ID)["hr.employee"].search([('name', '=', res_user_id.name)]) if res_user_id: request.env(user=SUPERUSER_ID)["hr.attendance.detail"].create({ From 478d020f4042ef61b9f685ca0da2a0fe9f83150f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 24 Jul 2025 13:07:01 +0800 Subject: [PATCH 10/13] 1 --- attendance_iot/controllers/kaoqin_test.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/attendance_iot/controllers/kaoqin_test.py b/attendance_iot/controllers/kaoqin_test.py index ab2a59f8d..5fef97b99 100644 --- a/attendance_iot/controllers/kaoqin_test.py +++ b/attendance_iot/controllers/kaoqin_test.py @@ -55,12 +55,11 @@ class BusController(Controller): user_id = data.get('logs')[0].get('user_id') employee_id = request.env(user=SUPERUSER_ID)["hr.employee"].search([('mobile_phone', '=', user_id)]) recog_time_str = data.get('logs')[0].get("recog_time") - checkin_time = datetime.strptime(recog_time_str, "%Y-%m-%d %H:%M:%S") attendance_iot_id = request.env(user=SUPERUSER_ID)["attendance.iot"].search([('name', '=', data.get('sn'))]) if employee_id: request.env(user=SUPERUSER_ID)["hr.attendance.detail"].create({ 'employee_id': employee_id.id, # 员工 - 'checkin_time': checkin_time, # 打卡时间 + 'checkin_time': fields.Datetime.now(), # 打卡时间 'source': 'iot', # 打卡来源 'attendance_iot_id': attendance_iot_id.id, # 打卡设备 }) From b35676a4c8b845aeacba4e3e7c1e8887f4dd3be1 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 24 Jul 2025 14:18:17 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wizard/choose_property_wizard.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/yuthon_property_approval/wizard/choose_property_wizard.py b/yuthon_property_approval/wizard/choose_property_wizard.py index ef53deabb..007476c90 100644 --- a/yuthon_property_approval/wizard/choose_property_wizard.py +++ b/yuthon_property_approval/wizard/choose_property_wizard.py @@ -28,14 +28,18 @@ class ChoosePropertyWizard(models.Model): else: rec.is_mange = False manage_id = record.manage_information_ids[-1] if record.manage_information_ids else False + + admin_id = False + company_id = False + precinct_id = False if manage_id: - rec.admin_id = manage_id.admin_line_id.id - rec.company_id = manage_id.company_id.id - rec.precinct_id = manage_id.precinct_id.id - else: - rec.admin_id = False - rec.company_id = False - rec.precinct_id = False + admin_id = manage_id.admin_line_id.id if manage_id.admin_line_id else False + company_id = manage_id.company_id.id if manage_id.company_id else False + precinct_id = manage_id.precinct_id.id if manage_id.precinct_id else False + rec.admin_id = admin_id + rec.company_id = company_id + rec.precinct_id = precinct_id + self.lease_contract_id.lease_ids = lease_ids_to_add self.lease_contract_id.write({'name': ','.join(lease_name), 'use_address': ','.join(lease_name), From 5a76645847baf8fba4d3fe2ab9f189a0bc07ac23 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 24 Jul 2025 14:21:55 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_property_approval/wizard/choose_property_wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_property_approval/wizard/choose_property_wizard.py b/yuthon_property_approval/wizard/choose_property_wizard.py index 007476c90..1b41a5cb8 100644 --- a/yuthon_property_approval/wizard/choose_property_wizard.py +++ b/yuthon_property_approval/wizard/choose_property_wizard.py @@ -33,7 +33,7 @@ class ChoosePropertyWizard(models.Model): company_id = False precinct_id = False if manage_id: - admin_id = manage_id.admin_line_id.id if manage_id.admin_line_id else False + admin_id = manage_id.admin_id.id if manage_id.admin_id else False company_id = manage_id.company_id.id if manage_id.company_id else False precinct_id = manage_id.precinct_id.id if manage_id.precinct_id else False rec.admin_id = admin_id From 7daf6cfc6bfd273ada5b57511b23e486c7cc0aef Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 24 Jul 2025 15:30:26 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/inherit_hr_payslip_views.xml | 546 +++++++++--------- 1 file changed, 279 insertions(+), 267 deletions(-) diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index a757a7753..6573d5176 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -188,64 +188,65 @@ + hr.payslip.tree.validation.jtbb hr.payslip - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - +