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 = []