From 7f6f705e48a6c46805d8d74735abfe04afcc674b 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: Sat, 11 Oct 2025 12:04:55 +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 --- .../models/property_deposit_list.py | 1 - yuthon_property/models/property_rent_list.py | 1 - .../models/inherit_yuthon_property.py | 8 ++++++++ .../views/inherit_yuthon_property_views.xml | 20 ++++++++++++++++--- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/yuthon_property/models/property_deposit_list.py b/yuthon_property/models/property_deposit_list.py index 1ada12168..eecb7d047 100644 --- a/yuthon_property/models/property_deposit_list.py +++ b/yuthon_property/models/property_deposit_list.py @@ -8,7 +8,6 @@ class PropertyDepositList(models.Model): property_id = fields.Many2one('yuthon.property', string='物业') admin_id = fields.Many2one(related='property_id.admin_id', string="片区管理员", store=True) lessee_id = fields.Many2one('property.tenant.information', string='承租方') - company_id = fields.Many2one(related='property_id.company_id', string="公司") is_push = fields.Boolean(string='是否推送') diff --git a/yuthon_property/models/property_rent_list.py b/yuthon_property/models/property_rent_list.py index 92bce62d8..a6d5736aa 100644 --- a/yuthon_property/models/property_rent_list.py +++ b/yuthon_property/models/property_rent_list.py @@ -8,7 +8,6 @@ class PropertyRentList(models.Model): property_id = fields.Many2one('yuthon.property', string='物业') lessee_id = fields.Many2one('property.tenant.information', string='承租方', store=True) admin_id = fields.Many2one(related='property_id.admin_id', string="片区管理员", store=True) - company_id = fields.Many2one(related='property_id.company_id', string="公司", store=True) rent_month = fields.Float(string='当月租金') tax = fields.Float(string='税率') title_certificate = fields.Char(sting="产权证号") diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index 07bfa0f4c..1563edc38 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -720,6 +720,7 @@ 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') + company_id = fields.Many2one(related='contract_id.lessor_id', string="出租方公司", store=True) @api.depends('contract_id') def get_property_address(self): @@ -838,6 +839,7 @@ class PropertyDepositList(models.Model): posit_type = fields.Selection([('deposit', '押金'), ('performance_bonds', '经营履约保证金'), ('utility_bills', '水电费'), ('decorate', '装修')], string="保证金类型") original_amount = fields.Float(string="金额") + company_id = fields.Many2one(related='contract_id.lessor_id', string="出租方公司", store=True) def push_deposit(self): for rec in self: @@ -874,6 +876,8 @@ class PropertyManagementList(models.Model): _inherit = 'property.management.list' contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批") + company_id = fields.Many2one(related='contract_id.lessor_id', string="出租方公司", store=True) + tenure_type = fields.Selection(related='contract_id.tenure_type', string="权属类型", store=True) def push_management(self): for rec in self: @@ -911,6 +915,8 @@ class PropertyTariffList(models.Model): contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批") admin_id = fields.Many2one(related='contract_id.admin_id', string="片区管理员", store=True) property_name = fields.Char(related='contract_id.property_name', string="物业信息", store=True) + company_id = fields.Many2one(related='contract_id.lessor_id', string="出租方公司", store=True) + tenure_type = fields.Selection(related='contract_id.tenure_type', string="权属类型", store=True) def push_tariff(self): for rec in self: @@ -949,6 +955,8 @@ class PropertyWaterList(models.Model): contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批") admin_id = fields.Many2one(related='contract_id.admin_id', string="片区管理员", store=True) property_name = fields.Char(related='contract_id.property_name', string="物业信息") + company_id = fields.Many2one(related='contract_id.lessor_id', string="出租方公司", store=True) + tenure_type = fields.Selection(related='contract_id.tenure_type', string="权属类型", store=True) def push_water(self): for rec in self: diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml index f408abcfb..7aefe4f5e 100644 --- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml +++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml @@ -134,7 +134,9 @@ + + @@ -160,7 +162,11 @@ + + + + @@ -204,7 +210,11 @@ + + + + @@ -261,10 +271,14 @@ property.management.list - - - + + + + + + +