From 8ae77b36dace7afa6167b848aa7cfaf441f28b1b 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: Tue, 21 Oct 2025 16:33:25 +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
---
.../wizard/choose_contract_wizard_views.xml | 2 +-
.../wizard/choose_property_wizard.py | 25 +------------------
2 files changed, 2 insertions(+), 25 deletions(-)
diff --git a/yuthon_property_approval/wizard/choose_contract_wizard_views.xml b/yuthon_property_approval/wizard/choose_contract_wizard_views.xml
index 1447c0bec..e1684ab40 100644
--- a/yuthon_property_approval/wizard/choose_contract_wizard_views.xml
+++ b/yuthon_property_approval/wizard/choose_contract_wizard_views.xml
@@ -10,7 +10,7 @@
-
+
diff --git a/yuthon_property_approval/wizard/choose_property_wizard.py b/yuthon_property_approval/wizard/choose_property_wizard.py
index c312e3316..08f1de130 100644
--- a/yuthon_property_approval/wizard/choose_property_wizard.py
+++ b/yuthon_property_approval/wizard/choose_property_wizard.py
@@ -5,6 +5,7 @@ class ChoosePropertyWizard(models.Model):
_name = 'choose.property.wizard'
lease_contract_id = fields.Many2one('property.lease.contract', string="合同")
+ property_type = fields.Selection(related='lease_contract_id.property_type', string="资产类型")
property_ids2 = fields.Many2many(
'yuthon.property',
'choose_property_wizard_property_ids2_rel',
@@ -17,30 +18,6 @@ class ChoosePropertyWizard(models.Model):
string="物业信息",
)
- contract_sort_name = fields.Char(
- string="合同类型名称",
- compute='_compute_contract_sort_name',
- store=True
- )
-
- @api.depends('lease_contract_id.contract_sort')
- def _compute_contract_sort_name(self):
- type_mapping = {
- 'property': '物业',
- 'guanggao': '广告位',
- 'guanzi': '管子间',
- 'room': '机房',
- 'base_station': '基站'
- }
- for rec in self:
- if rec.lease_contract_id and rec.lease_contract_id.contract_sort:
- rec.contract_sort_name = type_mapping.get(
- rec.lease_contract_id.contract_sort,
- ''
- )
- else:
- rec.contract_sort_name = ''
-
def confirm(self):
rec = self.lease_contract_id
lease_name = []