From 948893334104857e6a038a9d5772507e5a38f117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Thu, 28 May 2026 16:29:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=EF=BC=8C=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_issue/models/issue_library.py | 8 +- yuthon_property_approval/__manifest__.py | 4 +- .../models/property_open_rent.py | 7 ++ .../property_open_rent_print_report.xml | 24 +++++ .../property_open_rent_print_templates.xml | 94 +++++++++++++++++++ .../views/property_open_rent_views.xml | 6 ++ 6 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 yuthon_property_approval/report/property_open_rent_print_report.xml create mode 100644 yuthon_property_approval/report/property_open_rent_print_templates.xml diff --git a/yuthon_issue/models/issue_library.py b/yuthon_issue/models/issue_library.py index fd1eedd7f..3b3e1c4b0 100644 --- a/yuthon_issue/models/issue_library.py +++ b/yuthon_issue/models/issue_library.py @@ -141,12 +141,18 @@ class IssueLibrary(models.Model): records = self.env['issue.library'].browse(active_ids) count = 0 for record in records: - # 只清理party_char的HTML标签 + # 清理party_char的HTML标签 if record.party_char: clean_value = re.sub(r'<[^>]+>', '', record.party_char) if clean_value != record.party_char: record.party_char = clean_value count += 1 + # 清理class_char的HTML标签 + if record.class_char: + clean_value = re.sub(r'<[^>]+>', '', record.class_char) + if clean_value != record.class_char: + record.class_char = clean_value + count += 1 return { 'type': 'ir.actions.client', 'tag': 'display_notification', diff --git a/yuthon_property_approval/__manifest__.py b/yuthon_property_approval/__manifest__.py index 30db0c254..60447fd0d 100644 --- a/yuthon_property_approval/__manifest__.py +++ b/yuthon_property_approval/__manifest__.py @@ -115,7 +115,9 @@ 'report/property_lease_contract_print_report.xml', 'report/property_lease_contract_print_templates.xml', 'report/property_supervising_approval_print_report.xml', - 'report/property_supervising_approval_print_templates.xml' + 'report/property_supervising_approval_print_templates.xml', + 'report/property_open_rent_print_report.xml', + 'report/property_open_rent_print_templates.xml' ], diff --git a/yuthon_property_approval/models/property_open_rent.py b/yuthon_property_approval/models/property_open_rent.py index e3f2ddb04..79977e40d 100644 --- a/yuthon_property_approval/models/property_open_rent.py +++ b/yuthon_property_approval/models/property_open_rent.py @@ -271,6 +271,13 @@ class PropertyOpenRent(models.Model): name_title = fields.Char(default=_get_default_name_title) self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])]) + + def action_print_property_open_rent(self): + """打印公开招租审批""" + self.ensure_one() + report_ref = self.env.ref('yuthon_property_approval.action_property_open_rent_print_report') + return report_ref.sudo().report_action(self) + # # # class PropertyOpenRentLine(models.Model): diff --git a/yuthon_property_approval/report/property_open_rent_print_report.xml b/yuthon_property_approval/report/property_open_rent_print_report.xml new file mode 100644 index 000000000..a0286050b --- /dev/null +++ b/yuthon_property_approval/report/property_open_rent_print_report.xml @@ -0,0 +1,24 @@ + + + + + + Open Rent Small Top Margin + A4 + 5 + Portrait + + + + 公开招租审批 + + property.open.rent + qweb-pdf + yuthon_property_approval.property_open_rent_print_template + yuthon_property_approval.property_open_rent_print_template + '公开招租审批%s_%s_%s' % (object.display_name or object.code or '', object.user_id.name or '', ((object.log_ids.filtered(lambda l: l.name == '归档')[-1].lase_click_date or object.log_ids.filtered(lambda l: l.name == '归档')[-1].date_create).strftime('%Y-%m-%d') if object.log_ids.filtered(lambda l: l.name == '归档') else '')) + + report + + + \ No newline at end of file diff --git a/yuthon_property_approval/report/property_open_rent_print_templates.xml b/yuthon_property_approval/report/property_open_rent_print_templates.xml new file mode 100644 index 000000000..5b20ae9d4 --- /dev/null +++ b/yuthon_property_approval/report/property_open_rent_print_templates.xml @@ -0,0 +1,94 @@ + + + + \ No newline at end of file diff --git a/yuthon_property_approval/views/property_open_rent_views.xml b/yuthon_property_approval/views/property_open_rent_views.xml index aaa579e81..d24a83edd 100644 --- a/yuthon_property_approval/views/property_open_rent_views.xml +++ b/yuthon_property_approval/views/property_open_rent_views.xml @@ -16,6 +16,12 @@ property.open.rent
+
+