From 7b23f31bc732f0c61ff324e8c335c0535e5c0356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Thu, 18 Dec 2025 15:21:20 +0800 Subject: [PATCH 01/14] =?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 --- .../models/yuthon_official_incoming_normal.py | 4 ++-- .../views/yuthon_dates_task_views.xml | 20 ++++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/yuthon_official/models/yuthon_official_incoming_normal.py b/yuthon_official/models/yuthon_official_incoming_normal.py index 7a303b096..9850cd85e 100644 --- a/yuthon_official/models/yuthon_official_incoming_normal.py +++ b/yuthon_official/models/yuthon_official_incoming_normal.py @@ -23,8 +23,8 @@ class YuthonOfficialIncomingNormal(models.Model): secret_level = fields.Selection([('normal', '一般'), ('urgent', '秘密'), ('secret', '机密'), ('so_secret', '绝密')], string="密级") time_date = fields.Datetime(string="日期", default=fields.Datetime.now) 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="拟办部门") - company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司") + department_id = fields.Many2one(related='users_id.employee_ids.department_id', string="拟办部门") + company_id = fields.Many2one(related='users_id.employee_ids.company_id', string="公司") department_data = fields.Html(string="拟办意见") red_suit = fields.Char(string="套红") official_statu = fields.Selection([('done', '办结'), ('approval', '审核')], string="公文环节") diff --git a/yuthon_will_task/views/yuthon_dates_task_views.xml b/yuthon_will_task/views/yuthon_dates_task_views.xml index 34e84375a..44ba22079 100644 --- a/yuthon_will_task/views/yuthon_dates_task_views.xml +++ b/yuthon_will_task/views/yuthon_dates_task_views.xml @@ -4,7 +4,10 @@ yuthon.dates.task.tree yuthon.dates.task - + @@ -12,9 +15,24 @@ + + yuthon.dates.task.search + yuthon.dates.task + + + + + + + + + 日程任务 yuthon.dates.task tree + + + {'search_default_task_state':1} From 5f9bf884e91d03b945eb67fd85bdaed6bfc3fba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Thu, 18 Dec 2025 15:29:01 +0800 Subject: [PATCH 02/14] =?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_will_task/models/yuthon_will_task.py | 2 +- yuthon_will_task/views/yuthon_dates_task_views.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py index 13a6dd314..edecf7f17 100644 --- a/yuthon_will_task/models/yuthon_will_task.py +++ b/yuthon_will_task/models/yuthon_will_task.py @@ -248,7 +248,7 @@ class YuthonWillTask(models.Model): reminder_employees = self.employee_ids | self.employee_ids2 if not reminder_employees: return - old_tasks = self.env['yuthon.dates.task'].search([('yuthon_will_task_id', '=', self.id)]) + old_tasks = self.env['yuthon.dates.task'].search([('yuthon_will_task_id', '=', self.id), ('task_state', '=', 'to_do')]) if old_tasks: old_tasks.unlink() start_hour = float(self.request_hour_from) diff --git a/yuthon_will_task/views/yuthon_dates_task_views.xml b/yuthon_will_task/views/yuthon_dates_task_views.xml index 44ba22079..fe55a105a 100644 --- a/yuthon_will_task/views/yuthon_dates_task_views.xml +++ b/yuthon_will_task/views/yuthon_dates_task_views.xml @@ -21,10 +21,10 @@ + + + - - - From 302a30e2c8389fb171021bf51fa28139d109d229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Thu, 18 Dec 2025 15:47:25 +0800 Subject: [PATCH 03/14] =?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_holiday/models/inherit_hr_leave.py | 14 +++++--------- yuthon_holiday/views/hr_leave_batch.xml | 2 +- yuthon_will_task/views/yuthon_dates_task_views.xml | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index 1be16707a..b1d54cfda 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -229,6 +229,7 @@ class HrLeave(models.Model): else: hours = 0.0 holiday.number_of_hours = hours + holiday.leave_hours = hours if holiday.holiday_status_id.type_of_work == "0": if holiday.request_hour_from and holiday.request_hour_to: start_hour = float(holiday.request_hour_from) @@ -236,13 +237,17 @@ class HrLeave(models.Model): if start_hour < 12 and end_hour > 12: hour = end_hour - start_hour - 1 holiday.number_of_hours = hour + holiday.leave_hours = hour elif start_hour == 9 and end_hour == 12: holiday.number_of_hours = 4 + holiday.leave_hours = 4 else: hour = end_hour - start_hour holiday.number_of_hours = hour + holiday.leave_hours = hour else: holiday.number_of_hours = 0 + holiday.leave_hours = 0 # 按天请假 days = holiday.batch_id._compute_duration_day(holiday.holiday_status_id, holiday.request_date_from , holiday.request_date_to) @@ -686,7 +691,6 @@ class HolidaysRequestBatch(models.Model): total_days = 0 first_hour_leave = self.hour_leave_ids[0] if self.hour_leave_ids else None holiday_status_names = [] - # 处理leave_ids:收集假期类型、日期和天数 for leave in self.leave_ids: # 收集假期类型名称(去重) if leave.holiday_status_id and leave.holiday_status_id.name: @@ -700,10 +704,8 @@ class HolidaysRequestBatch(models.Model): if leave.request_date_to: all_dates.append(leave.request_date_to) - # 累加天数 total_days += leave.number_of_days_display if hasattr(leave, 'number_of_days_display') else 0 - # 处理hour_leave_ids:收集日期 for line in self.hour_leave_ids: if line.request_date_from: all_dates.append(line.request_date_from) @@ -721,17 +723,11 @@ class HolidaysRequestBatch(models.Model): # 生成名称:员工名 + 假期类型 + 日期范围 + 天数/小时 if self.employee_id: name_parts = [f"{self.employee_id.name}的"] - - # 拼接假期类型 if holiday_status_names: name_parts.append(','.join(holiday_status_names)) - - # 拼接日期范围 if self.start_date and self.end_date: date_part = f"{self.start_date.strftime('%Y-%m-%d')}~{self.end_date.strftime('%Y-%m-%d')}" name_parts.append(date_part) - - # 拼接整请假天数 if self.leave_ids: name_parts.append(f"共计{int(total_days)}天") diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml index 569761cc2..64ebe943e 100644 --- a/yuthon_holiday/views/hr_leave_batch.xml +++ b/yuthon_holiday/views/hr_leave_batch.xml @@ -70,6 +70,7 @@ 'default_employee_id': employee_id, }" string=" " style="width: 150%;"> + @@ -116,7 +117,6 @@ - diff --git a/yuthon_will_task/views/yuthon_dates_task_views.xml b/yuthon_will_task/views/yuthon_dates_task_views.xml index fe55a105a..7a3c17076 100644 --- a/yuthon_will_task/views/yuthon_dates_task_views.xml +++ b/yuthon_will_task/views/yuthon_dates_task_views.xml @@ -6,7 +6,7 @@ From 138c1de8a45c8d55d91c68bb9a2eb36ae282636c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Thu, 18 Dec 2025 15:59:44 +0800 Subject: [PATCH 04/14] =?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_holiday/models/inherit_hr_leave.py | 34 ------------------- yuthon_holiday/views/hr_leave_batch.xml | 1 - .../views/yuthon_will_task_views.xml | 2 +- 3 files changed, 1 insertion(+), 36 deletions(-) diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index b1d54cfda..429e9b969 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -118,32 +118,6 @@ class HrLeave(models.Model): hour_batch_id = fields.Many2one(string='批量', comodel_name='hr.leave.batch', ondelete='cascade') leave_documents_ids = fields.Many2many(related='holiday_status_id.leave_documents_id', string="假期详情说明", readonly=True) details = fields.Text(string="假期流程说明") - request_hour_from_real = fields.Selection([ - ('0', '0:00'), ('0.5', '0:30'), - ('1', '01:00'), ('1.5', '01:30'), - ('2', '02:00'), ('2.5', '02:30'), - ('3', '03:00'), ('3.5', '03:30'), - ('4', '04:00'), ('4.5', '04:30'), - ('5', '05:00'), ('5.5', '05:30'), - ('6', '06:00'), ('6.5', '06:30'), - ('7', '07:00'), ('7.5', '07:30'), - ('8', '08:00'), ('8.5', '08:30'), - ('9', '09:00'), ('9.5', '09:30'), - ('10', '10:00'), ('10.5', '10:30'), - ('11', '11:00'), ('11.5', '11:30'), - ('12', '12:00'), ('12.5', '12:30'), - ('13', '13:00'), ('13.5', '13:30'), - ('14', '14:00'), ('14.5', '14:30'), - ('15', '15:00'), ('15.5', '15:30'), - ('16', '16:00'), ('16.5', '16:30'), - ('17', '17:00'), ('17.5', '17:30'), - ('18', '18:00'), ('18.5', '18:30'), - ('19', '19:00'), ('19.5', '19:30'), - ('20', '20:00'), ('20.5', '20:30'), - ('21', '21:00'), ('21.5', '21:30'), - ('22', '22:00'), ('22.5', '22:30'), - ('23', '23:00'), ('23.5', '23:30')], - string='实际开始时间', compute='_compute_request_hour_from_real') # custom_document_ids = fields.Many2many( # string='文件', # comodel_name='ir.attachment', @@ -209,14 +183,6 @@ class HrLeave(models.Model): for leave in leave_ids: leave.state = 'draft' - @api.depends('request_hour_from') - def _compute_request_hour_from_real(self): - for record in self: - if record.request_hour_from == '9': - record.request_hour_from_real = '8' - else: - record.request_hour_from_real = record.request_hour_from - @api.depends('date_from', 'date_to', 'resource_calendar_id', 'holiday_status_id.request_unit') def _compute_duration(self): super()._compute_duration() diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml index 64ebe943e..e9d0609e3 100644 --- a/yuthon_holiday/views/hr_leave_batch.xml +++ b/yuthon_holiday/views/hr_leave_batch.xml @@ -230,7 +230,6 @@ - diff --git a/yuthon_will_task/views/yuthon_will_task_views.xml b/yuthon_will_task/views/yuthon_will_task_views.xml index 102ef78d0..c8940b950 100644 --- a/yuthon_will_task/views/yuthon_will_task_views.xml +++ b/yuthon_will_task/views/yuthon_will_task_views.xml @@ -255,7 +255,7 @@ 领导日程 yuthon.will.task tree,calendar,form - [('user_role_ids.name', 'in', ['董事长', '分管领导', '总经理', '部门副经理', '副总经理'])] + [('user_role_ids.name', 'in', ['董事长', '分管领导', '总经理', '部门副经理', '副总经理', '司机'])] {'search_default_next_seven_days': 1} From f9807cd879529c314bd5af0361cb183d6a8a18d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Thu, 18 Dec 2025 16:17:40 +0800 Subject: [PATCH 05/14] =?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/models/property_lease_contract.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 5f2df437d..9717f24aa 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -1636,7 +1636,6 @@ class PropertyLeaseContract(models.Model): electricity_list = [] water_list = [] title_address = [] - fee_list = [] for record in rec.lease_ids: if record.address_id and record.address_id.title_address: lease_name.append(record.address_id.name) @@ -1963,7 +1962,6 @@ class PropertyLeaseContract(models.Model): def _onchange_name(self): if self.property_name: self.address_for_delivery = self.property_name - self.use_address = self.property_name @api.onchange("admin_id") def _onchange_admin_id(self): From 91257fbd8e5a98e09b0d85385a1c418b6fe48660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Thu, 18 Dec 2025 16:54:46 +0800 Subject: [PATCH 06/14] =?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 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/yuthon_property_approval/wizard/choose_property_wizard.py b/yuthon_property_approval/wizard/choose_property_wizard.py index 3cdb74ad1..bd24128f6 100644 --- a/yuthon_property_approval/wizard/choose_property_wizard.py +++ b/yuthon_property_approval/wizard/choose_property_wizard.py @@ -24,6 +24,7 @@ class ChoosePropertyWizard(models.Model): lease_ids_to_add = [] title_deed = [] title_address = [] + financial_address_list = [] for record in self.property_ids: lease_name.append(record.name if record.name is not None else "") title_addr_name = record.title_address.name if (record.title_address and record.title_address.name) else "" @@ -50,12 +51,18 @@ class ChoosePropertyWizard(models.Model): rec.admin_id = admin_id rec.company_id = company_id rec.precinct_id = precinct_id + fin_addr = record.financial_address if record.financial_address else "" + if fin_addr: # 仅添加非空地址 + financial_address_list.append(fin_addr) existing_names = [] for lease in self.lease_contract_id.lease_ids: if lease.address_id: name_val = lease.address_id.name existing_names.append(name_val if name_val is not None else "无") + fin_addr_exist = lease.address_id.financial_address if lease.address_id.financial_address else "" + if fin_addr_exist: + financial_address_list.append(fin_addr_exist) title_name = [] for lease in self.lease_contract_id.lease_ids: @@ -63,9 +70,9 @@ class ChoosePropertyWizard(models.Model): addr_name = lease.address_id.title_address.name if (lease.address_id.title_address and lease.address_id.title_address.name) else "" title_name.append(str(addr_name)) - # 过滤空字符串,避免拼接时出现空内容 all_names = [name for name in list(set(existing_names + lease_name)) if name] title_address_combined = [addr for addr in list(set(title_address + title_name)) if addr] + use_address_combined = [addr for addr in list(set(financial_address_list)) if addr] existing_lease_ids = [(4, lease.id) for lease in self.lease_contract_id.lease_ids] @@ -77,7 +84,7 @@ class ChoosePropertyWizard(models.Model): 'title_address': ','.join(title_address_combined), 'lessor_id': self.lease_contract_id.lease_ids[0].address_id.company_id.id if self.lease_contract_id.lease_ids else False, - 'use_address': ','.join(all_names), + 'use_address': ','.join(use_address_combined), 'address_for_delivery': ','.join(all_names), 'total_area': sum([lease.property_area for lease in rec.lease_ids]) }) From 6807ea63783ba8ed8b0d1236020164fd62fa364a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Thu, 18 Dec 2025 17:03:28 +0800 Subject: [PATCH 07/14] =?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_hr_employee/views/yuthon_hr_employee_views.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml index c7584139e..bac66ee1e 100644 --- a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml +++ b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml @@ -574,7 +574,7 @@ - + @@ -659,7 +659,6 @@ 会员列表 hr.employee [('is_membership', '=', True), ('is_company', '=', True)] - {'header_search_default_user_state': 1} tree,kanban,form,search
- 时间 - 至 + + →
@@ -174,9 +174,9 @@