From 7c7486c8f610d33d50dc4ddeed99e36e594268ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Wed, 4 Mar 2026 14:57:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E4=BA=A4=E7=A1=AE=E8=AE=A4=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_property_approval/models/property_confirm.py | 7 +++++++ yuthon_property_approval/views/property_confirm_views.xml | 8 +++----- .../wizard/choose_confirm_property_wizard.py | 4 +++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/yuthon_property_approval/models/property_confirm.py b/yuthon_property_approval/models/property_confirm.py index f45e9ba97..654749396 100644 --- a/yuthon_property_approval/models/property_confirm.py +++ b/yuthon_property_approval/models/property_confirm.py @@ -30,6 +30,13 @@ class PropertyConfirm(models.Model): name_title = fields.Char(default=_get_default_name_title) + @api.onchange('property_name') + def _onchange_property_name(self): + if self.property_name: + self.name = '成交确认书 ' + self.property_name + else: + self.name = '成交确认书' + def choose_property_button(self): return { "type": "ir.actions.act_window", diff --git a/yuthon_property_approval/views/property_confirm_views.xml b/yuthon_property_approval/views/property_confirm_views.xml index ce93f8c0c..710141d4b 100644 --- a/yuthon_property_approval/views/property_confirm_views.xml +++ b/yuthon_property_approval/views/property_confirm_views.xml @@ -24,9 +24,6 @@ - - -

@@ -36,17 +33,18 @@
+ + - diff --git a/yuthon_property_approval/wizard/choose_confirm_property_wizard.py b/yuthon_property_approval/wizard/choose_confirm_property_wizard.py index 47ed60be4..2a716b30a 100644 --- a/yuthon_property_approval/wizard/choose_confirm_property_wizard.py +++ b/yuthon_property_approval/wizard/choose_confirm_property_wizard.py @@ -28,4 +28,6 @@ class ChooseConfirmPropertyWizard(models.TransientModel): rec.lease_ids = lease_ids_to_add all_names = list(set(existing_names + names)) - rec.property_name = ','.join(all_names) + property_name_str = ','.join(all_names) + rec.property_name = property_name_str + rec.name = '成交确认书 ' + property_name_str if property_name_str else '成交确认书'