添加功能
This commit is contained in:
@@ -608,7 +608,7 @@ class YuthonPropertyEnergy(models.Model):
|
||||
_name = 'yuthon.property.energy'
|
||||
_description = '电表'
|
||||
|
||||
property_meter_archives_id = fields.Many2one('property.meter.archives', string="电表库")
|
||||
property_meter_archives_id = fields.Many2one('property.meter.archives', string="电表编号")
|
||||
rate = fields.Integer(related='property_meter_archives_id.gauge_magnification', string="倍率", store=True)
|
||||
standard_id = fields.Many2one(related='property_meter_archives_id.standards_id', string="标准", store=True)
|
||||
installation_date = fields.Date(related='property_meter_archives_id.start_time', string="安装日期")
|
||||
|
||||
@@ -49,7 +49,7 @@ class MeterArchivesLine(models.Model):
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="合同")
|
||||
lessee_id = fields.Many2one(related="contract_id.lessee_id", string="承租方")
|
||||
contract_name = fields.Char(string='合同名称', store=True, index=True, compute="_compute_name")
|
||||
contract_name = fields.Char(string='合同编号', store=True, index=True, compute="_compute_name")
|
||||
lessee_name = fields.Char(string='承租方名称', store=True, index=True, compute="_compute_name")
|
||||
|
||||
@api.depends('yuthon_property_ids', 'archives_id', 'contract_id', 'lessee_id')
|
||||
@@ -79,7 +79,7 @@ class MeterWaterLine(models.Model):
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="合同")
|
||||
lessee_id = fields.Many2one(related="contract_id.lessee_id", string="承租方")
|
||||
contract_name = fields.Char(string='合同名称', store=True, index=True, compute="_compute_name")
|
||||
contract_name = fields.Char(string='合同编号', store=True, index=True, compute="_compute_name")
|
||||
lessee_name = fields.Char(string='承租方名称', store=True, index=True, compute="_compute_name")
|
||||
|
||||
@api.depends('yuthon_property_ids', 'water_id', 'contract_id', 'lessee_id')
|
||||
|
||||
@@ -1958,7 +1958,7 @@ class PropertyElectricFeeLine(models.Model):
|
||||
_description = '物业电费明细行'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
property_meter_archives_id = fields.Many2one('property.meter.archives', string="电表库")
|
||||
property_meter_archives_id = fields.Many2one('property.meter.archives', string="电表编号")
|
||||
rate = fields.Integer(related='property_meter_archives_id.gauge_magnification', string="倍率", store=True)
|
||||
standard_id = fields.Many2one(related='property_meter_archives_id.standards_id', string="标准", store=True)
|
||||
installation_date = fields.Date(related='property_meter_archives_id.start_time', string="安装日期")
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
('lessee_name', 'like', self),
|
||||
('contract_name', 'like', self)
|
||||
]"/>
|
||||
<field name="unit_number"/>
|
||||
<field name="contract_name"/>
|
||||
<field name="lessee_name"/>
|
||||
</xpath>
|
||||
@@ -72,6 +73,7 @@
|
||||
string="综合搜索"
|
||||
filter_domain="['|', '|', '|', ('water_id.name', 'ilike', self), ('unit_number', 'ilike', self),
|
||||
('lessee_name', 'ilike', self),('contract_name', 'ilike', self)]"/>
|
||||
<field name="unit_number"/>
|
||||
<field name="contract_name"/>
|
||||
<field name="lessee_name"/>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user