!5200 添加功能

Merge pull request !5200 from 李鹏宇/zhou
This commit is contained in:
李鹏宇
2025-09-17 08:41:13 +00:00
committed by Gitee
3 changed files with 7 additions and 1 deletions
@@ -6,7 +6,7 @@
<field name="arch" type="xml">
<tree editable="bottom" string="租金列表" decoration-danger = "charge_status == 'unpaid'"
decoration-success="charge_status == 'fully_paid'" js_class="custom_rent_list_button" edit="false" delete="false">
<field name="property_id" options="{'no_create': True}"/>
<field name="property_id" options="{'no_create': True}" column_invisible="1"/>
<field name="lessee_id" options="{'no_create': True}"/>
<field name="admin_id" options="{'no_create': True}"/>
<field name="company_id" options="{'no_create': True}"/>
@@ -569,7 +569,12 @@ class PropertyRentList(models.Model):
_inherit = 'property.rent.list'
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
property_address = fields.Text(string="物业信息", compute='get_property_address')
@api.depends('contract_id')
def get_property_address(self):
for rec in self:
rec.property_address = rec.contract_id.property_name
def clear_the_data(self):
archives_ids = self.env["property.rent.list"].browse(
@@ -62,6 +62,7 @@
</header>
</xpath>
<xpath expr="//field[@name='property_id']" position="before">
<field name="property_address"/>
<field name="contract_id" string="合同编号" options="{'no_create': True}"/>
</xpath>
</field>