diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index b189ee4fd..5e4b2f40d 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -996,7 +996,8 @@ class PropertyRentList(models.Model): contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批") tenure_type = fields.Selection(related='contract_id.tenure_type', string="权属类型", store=True) property_address = fields.Text(string="物业信息", compute='get_property_address') - contract_sort = fields.Selection([('property', '物业'), ('guanggao', '广告位'),('parking', '停车场'), ('guanzi', '管子间'), ('room', '机房'), ('base_station','基站'), ('other', '其他')], string="资产类型", default='property') + contract_sort = fields.Selection(related='contract_id.contract_sort', string="资产类型", store=True) # 数据问题 + contract_sort1 = fields.Selection([('property', '物业'), ('guanggao', '广告位'),('parking', '停车场'), ('guanzi', '管子间'), ('room', '机房'), ('base_station','基站'), ('other', '其他')], string="资产类型", default='property') company_id = fields.Many2one(related='contract_id.lessor_id', string="出租方公司", store=True) is_company = fields.Boolean(string='是否是本公司', compute='_compute_is_company', store=False) diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml index 6b4118040..acb082536 100644 --- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml +++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml @@ -123,7 +123,7 @@ - + diff --git a/yuthon_property_approval/wizard/property_rental_wizard.py b/yuthon_property_approval/wizard/property_rental_wizard.py index a1ff57717..72536f32b 100644 --- a/yuthon_property_approval/wizard/property_rental_wizard.py +++ b/yuthon_property_approval/wizard/property_rental_wizard.py @@ -148,7 +148,7 @@ class PropertyRentalWizard(models.Model): "contract_id": record.id, "area":area_value, "type": type, - "contract_sort": record.contract_sort, + "contract_sort1": record.contract_sort, 'property_ids': [(6, 0, [lease_id.address_id.id for lease_id in record.lease_ids if lease_id.address_id])], 'original_amount':original_amount, 'message_standard_id': record.lease_ids[0].message_standard_id.id, @@ -160,7 +160,7 @@ class PropertyRentalWizard(models.Model): "contract_id": record.id, "area": area_value, "type": type, - "contract_sort": record.contract_sort, + "contract_sort1": record.contract_sort, 'property_ids': [(6, 0, [lease_id.address_id.id for lease_id in record.lease_ids if lease_id.address_id])], 'original_amount': original_amount, 'message_standard_id': record.lease_ids[0].message_standard_id.id,