From 926cb2937e9e136e7f58380331a646a54e80dd34 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: Sat, 4 Oct 2025 17:05:28 +0800 Subject: [PATCH 1/5] =?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/__manifest__.py | 1 + .../models/inherit_yuthon_property.py | 3 ++- yuthon_property_approval/security/property_group.xml | 8 ++++++++ .../views/inherit_yuthon_property_views.xml | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 yuthon_property_approval/security/property_group.xml diff --git a/yuthon_property_approval/__manifest__.py b/yuthon_property_approval/__manifest__.py index f814dc5a3..c05f6e73d 100644 --- a/yuthon_property_approval/__manifest__.py +++ b/yuthon_property_approval/__manifest__.py @@ -11,6 +11,7 @@ 'data/sale_renting_code_data.xml', 'data/property_contract_time.xml', 'security/ir.model.access.csv', + 'security/property_group.xml', 'report/lease_contract_report.xml', 'report/lease_contract_templates.xml', 'report/property_accounting_templates.xml', diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index 2b331ae2a..cf179a613 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -390,7 +390,8 @@ class PropertyAccountsReceivable(models.Model): management_area = fields.Float(related='contract_id.total_area', string='面积') title_deed = fields.Char(string="产权证号", compute='_compute_title_deed') lessee_id = fields.Many2one(related='contract_id.lessee_id', string='承租方', store=True) - company_id = fields.Many2one(related='contract_id.lessor_id', string="公司", store=True) + company_id = fields.Many2one(related='contract_id.lessor_id', string="公司(数据库关联错误)", store=True) + company_id1 = fields.Many2one(related='contract_id.admin_id.company_id', string="公司", store=True) contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批") admin_id = fields.Many2one(related='contract_id.admin_id', string="片区管理员", store=True) tenure_type = fields.Selection(related='contract_id.tenure_type', string="权属类型", store=True) diff --git a/yuthon_property_approval/security/property_group.xml b/yuthon_property_approval/security/property_group.xml new file mode 100644 index 000000000..6111c4990 --- /dev/null +++ b/yuthon_property_approval/security/property_group.xml @@ -0,0 +1,8 @@ + + + + 应收账单多公司 + + [('company_id1', 'in', company_ids)] + + diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml index 3f11ce1e1..90e310c8b 100644 --- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml +++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml @@ -299,6 +299,7 @@ + From 581d47ea9f26f8226fa0b904beac84d016f1c080 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: Sat, 4 Oct 2025 17:16:39 +0800 Subject: [PATCH 2/5] =?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/inherit_yuthon_property.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index cf179a613..ba2aa8b86 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -390,8 +390,8 @@ class PropertyAccountsReceivable(models.Model): management_area = fields.Float(related='contract_id.total_area', string='面积') title_deed = fields.Char(string="产权证号", compute='_compute_title_deed') lessee_id = fields.Many2one(related='contract_id.lessee_id', string='承租方', store=True) - company_id = fields.Many2one(related='contract_id.lessor_id', string="公司(数据库关联错误)", store=True) - company_id1 = fields.Many2one(related='contract_id.admin_id.company_id', string="公司", store=True) + company_id = fields.Many2one(related='contract_id.lessor_id', string="出租方公司", store=True) + company_id1 = fields.Many2one(related='contract_id.admin_id.company_id', string="管理员公司", store=True) contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批") admin_id = fields.Many2one(related='contract_id.admin_id', string="片区管理员", store=True) tenure_type = fields.Selection(related='contract_id.tenure_type', string="权属类型", store=True) From 30d22d44f02d6cd7188b505f866f532533038d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E6=9C=AA=E5=A4=AE?= <2996985766@qq.com> Date: Thu, 9 Oct 2025 21:23:15 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/quick_filter/quick_filter.js | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.js b/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.js index d41858434..c10adb2dc 100644 --- a/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.js +++ b/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.js @@ -1,12 +1,11 @@ /** @odoo-module **/ -import { Component, useState, onWillStart } from "@odoo/owl"; +import { Component, onWillStart } from "@odoo/owl"; import { useService } from "@web/core/utils/hooks"; export class QuickFilter extends Component { setup() { super.setup(); this.orm = useService("orm"); - this.state = useState({ filters: [] }); this.activeFilterIds = this.env.searchModel.headerSearchInfo.quickFilter[this.props.groupId]?.filters || []; onWillStart(async () => { await this.loadFilters(); @@ -17,8 +16,13 @@ export class QuickFilter extends Component { * 返回过滤器列表 */ get filters() { - // 这里直接返回 state,避免在 getter 里做异步 - return this.state.filters; + // 通过ID查询过滤器列表 + const filters = this.env.searchModel.headerSearchInfo.headerQuickFilter[this.props.id].filters || []; + filters.forEach((filter, fdx) => { + filter.isChecked = this.activeFilterIds.includes(filter.inputId); + filter.index = fdx + 1; + }); + return filters; } async loadFilters() { @@ -27,12 +31,11 @@ export class QuickFilter extends Component { const filters = searchModel.headerSearchInfo.headerQuickFilter[this.props.id]?.filters || []; for (let [idx, filter] of filters.entries()) { const domain = this.safeParseDomain(filter.domain); - const count = await this.orm.searchCount(resModel, domain); - filter.count = count; - filter.isChecked = this.activeFilterIds.includes(filter.inputId); - filter.index = idx + 1; + if (filter.show_number) { + const count = await this.orm.searchCount(resModel, domain); + filter.count = count; + } } - this.state.filters = filters; } /** * 设置活动的过滤器 @@ -63,6 +66,8 @@ export class QuickFilter extends Component { this.env.searchModel.removeQuickFilter(this.props.groupId, value); } } + console.log("当前活动的过滤器ID:", this.activeFilterIds); + } /** From 0f3387aff8372d80ec53591970d84df06379eefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E6=9C=AA=E5=A4=AE?= <2996985766@qq.com> Date: Thu, 9 Oct 2025 21:23:48 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=88=A0=E9=99=A4console.log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../header_search/components/quick_filter/quick_filter.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.js b/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.js index c10adb2dc..e19836058 100644 --- a/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.js +++ b/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.js @@ -66,8 +66,6 @@ export class QuickFilter extends Component { this.env.searchModel.removeQuickFilter(this.props.groupId, value); } } - console.log("当前活动的过滤器ID:", this.activeFilterIds); - } /** From 8404f75f140e47b86293303ef17da9627f7b0a99 Mon Sep 17 00:00:00 2001 From: pengyuthon Date: Fri, 10 Oct 2025 09:38:53 +0800 Subject: [PATCH 5/5] 1 --- yuthon_hr_attendance/models/hr_attendance.py | 1 + yuthon_hr_attendance/views/hr_attendance_views.xml | 3 ++- yuthon_hr_attendance/wizard/attendance_correct_wizard.py | 2 ++ yuthon_hr_attendance/wizard/attendance_correct_wizard.xml | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index b61211249..e25a25d9d 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -59,6 +59,7 @@ class HrAttendance(models.Model): is_month = fields.Boolean(string="是否为本月数据", compute='_compute_month_status', store=True) is_last_month = fields.Boolean(string="是否为上月数据", compute='_compute_month_status', store=True) is_holiday = fields.Boolean(string="是否是假期") + correct_result = fields.Text(string="修正原因") def create_attendance_data_holiday(self): """ diff --git a/yuthon_hr_attendance/views/hr_attendance_views.xml b/yuthon_hr_attendance/views/hr_attendance_views.xml index 7eafacc95..9ecaac926 100644 --- a/yuthon_hr_attendance/views/hr_attendance_views.xml +++ b/yuthon_hr_attendance/views/hr_attendance_views.xml @@ -41,7 +41,8 @@ - + + diff --git a/yuthon_hr_attendance/wizard/attendance_correct_wizard.py b/yuthon_hr_attendance/wizard/attendance_correct_wizard.py index 72e411e63..d0c4944d6 100644 --- a/yuthon_hr_attendance/wizard/attendance_correct_wizard.py +++ b/yuthon_hr_attendance/wizard/attendance_correct_wizard.py @@ -13,11 +13,13 @@ class AttendanceCorrectWizard(models.TransientModel): _description = "考勤修正弹窗" attendance_id = fields.Many2one('hr.attendance', string="考勤记录") + correct_result = fields.Text(string="修正原因") def confirm(self): for record in self: # 准备更新的值 values = { + 'correct_result': self.correct_result, 'is_approval': True, 'is_abnormal': False, 'is_no_card': False, diff --git a/yuthon_hr_attendance/wizard/attendance_correct_wizard.xml b/yuthon_hr_attendance/wizard/attendance_correct_wizard.xml index 8edd72165..b70a49eaf 100644 --- a/yuthon_hr_attendance/wizard/attendance_correct_wizard.xml +++ b/yuthon_hr_attendance/wizard/attendance_correct_wizard.xml @@ -6,6 +6,9 @@
你确定要修正吗?
+ + +