diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index 48a74b1af..b94aafb93 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="资产类型") + 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 9d5196a56..9136a3b4c 100644 --- a/yuthon_property_approval/wizard/property_rental_wizard.py +++ b/yuthon_property_approval/wizard/property_rental_wizard.py @@ -53,7 +53,7 @@ class PropertyRentalWizard(models.Model): "contract_id": record.id, "due_date": start_date, 'multiplier': multiplier, - "contract_sort": record.contract_sort, + "contract_sort1": record.contract_sort, 'acc_type': acc_type, "lessee_id": record.lessee_id.id, "property_id": property_id, @@ -66,7 +66,7 @@ class PropertyRentalWizard(models.Model): "contract_id": record.id, "due_date": start_date, 'multiplier': multiplier, - "contract_sort": record.contract_sort, + "contract_sort1": record.contract_sort, "lessee_id": record.lessee_id.id, 'acc_type': acc_type, "property_id": property_id,