From ea6a09f1807a68db213ee79ae0bd2fb72ed9d941 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: Mon, 13 Oct 2025 20:30:28 +0800 Subject: [PATCH] =?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 --- soong_workflow/templates/soong_workflow_templates.xml | 2 +- yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml | 4 ++-- yuthon_property_approval/models/inherit_yuthon_property.py | 4 ++++ .../views/inherit_yuthon_property_views.xml | 2 +- yuthon_property_approval/wizard/property_rental_wizard.py | 1 + yuthon_trade/models/yuthon_contract_addition.py | 2 -- yuthon_trade/views/yuthon_contract_addition_views.xml | 1 - 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/soong_workflow/templates/soong_workflow_templates.xml b/soong_workflow/templates/soong_workflow_templates.xml index 24e7e4f46..b577ba0dc 100644 --- a/soong_workflow/templates/soong_workflow_templates.xml +++ b/soong_workflow/templates/soong_workflow_templates.xml @@ -43,8 +43,8 @@ + - diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml index 56dbdfce2..8aa3ef5d9 100644 --- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml +++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml @@ -115,10 +115,10 @@ - + - + diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index cb26e44e6..821cd1b13 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -862,7 +862,11 @@ class PropertyRentList(models.Model): rec.unlink() def push_rent(self): + current_user = self.env.user + is_admin = current_user.has_group('base.group_system') or current_user.has_group('base.group_admin') for rec in self: + if not is_admin and rec.admin_id.id != current_user.id: + raise UserError(f"您只能推送自己记录") management_type = self.env['yuthon.management.type'].search([('name', '=', '租金')], limit=1) if not management_type: management_type = self.env['yuthon.management.type'].create({'name': '租金'}) diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml index 4c834948a..04c91958f 100644 --- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml +++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml @@ -334,7 +334,7 @@ 管理费列表 property.management.list tree,search - [('is_push', '=', False), '|', ('area', '!=', 0), '|', ('contract_id.property_type', '=', 'guanggao'), ('contract_id.property_type', '=', 'guanzi')] + [('is_push', '=', False), '|', ('area', '!=', 0), '|', ('contract_id.contract_sort', '=', 'guanggao'), ('contract_id.contract_sort', '=', 'guanzi')] {'search_default_group_admin_id': True, 'search_default_group_due_date': True} diff --git a/yuthon_property_approval/wizard/property_rental_wizard.py b/yuthon_property_approval/wizard/property_rental_wizard.py index 098bd3df7..b63a6a9b4 100644 --- a/yuthon_property_approval/wizard/property_rental_wizard.py +++ b/yuthon_property_approval/wizard/property_rental_wizard.py @@ -170,6 +170,7 @@ class PropertyRentalWizard(models.Model): records = self.env['property.lease.contract'].search([ ('actual_start_time', '<', next_month_first_day), ('actual_end_time', '>=', first_day), + ('contract_code', '=', '租(2025)001') ]) for record in records: diff --git a/yuthon_trade/models/yuthon_contract_addition.py b/yuthon_trade/models/yuthon_contract_addition.py index 4c77250c6..f8feff2ef 100644 --- a/yuthon_trade/models/yuthon_contract_addition.py +++ b/yuthon_trade/models/yuthon_contract_addition.py @@ -20,7 +20,6 @@ class YuthonContractAddition(models.Model): issues_result = fields.Html(string="会议结果") related_issues_id = fields.Many2one('issue.library', string="关联议题") reason = fields.Text(string="正文") - workflow_id = fields.Many2one('soong.workflow.record', string="流程") document_ids = fields.Many2many('ir.attachment', string="附件") active = fields.Boolean('Active', default=True, tracking=True) @@ -40,7 +39,6 @@ class YuthonContractAddition(models.Model): self.env['issue.library.approval.line'].create({ 'issue_library_id': issue_id.id, 'workflow_name': self.name, - 'approval_type': self.workflow_id.name, 'res_model': self._name, 'res_id': self.id, 'code': self.code, diff --git a/yuthon_trade/views/yuthon_contract_addition_views.xml b/yuthon_trade/views/yuthon_contract_addition_views.xml index 7855c6718..3351629c5 100644 --- a/yuthon_trade/views/yuthon_contract_addition_views.xml +++ b/yuthon_trade/views/yuthon_contract_addition_views.xml @@ -45,7 +45,6 @@ -