Merge pull request !5804 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-10-18 16:20:40 +00:00
committed by Gitee
2 changed files with 6 additions and 4 deletions
@@ -51,7 +51,7 @@ class MeterArchivesLine(models.Model):
contract_name = fields.Char(string='合同名称')
lessee_name = fields.Char(string='承租方名称')
@api.onchange('contract_id', 'lessee_id')
@api.depends('archives_id', 'contract_id', 'lessee_id')
def onchange_contract_lessee(self):
if self.contract_id:
self.contract_name = self.contract_id.name
@@ -79,7 +79,7 @@ class MeterWaterLine(models.Model):
contract_name = fields.Char(string='合同名称')
lessee_name = fields.Char(string='承租方名称')
@api.onchange('contract_id', 'lessee_id')
@api.depends('water_id', 'contract_id', 'lessee_id')
def onchange_contract_lessee(self):
if self.contract_id:
self.contract_name = self.contract_id.name
@@ -27,6 +27,8 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='yuthon_property_ids']" position="after">
<field name="contract_id"/>
<field name="contract_name" column_invisible="1"/>
<field name="lessee_name" column_invisible="1"/>
</xpath>
</field>
</record>
@@ -55,8 +57,8 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='yuthon_property_ids']" position="after">
<field name="contract_id"/>
<field name="contract_name"/>
<field name="lessee_name"/>
<field name="contract_name" column_invisible="1"/>
<field name="lessee_name" column_invisible="1"/>
</xpath>
</field>
</record>