@@ -428,7 +428,7 @@ class MeterArchivesLine(models.Model):
|
||||
)
|
||||
for meter_id in meter_ids:
|
||||
if meter_id.is_push == True:
|
||||
raise ValidationError(f"电表名为{meter_id.archives_id}任务已推送,请勿重复推送")
|
||||
raise UserError(f"电表名为{meter_id.archives_id}任务已推送,请勿重复推送")
|
||||
return {
|
||||
"name": "电水表任务",
|
||||
"type": "ir.actions.act_window",
|
||||
|
||||
@@ -356,7 +356,7 @@ class MeterWaterLine(models.Model):
|
||||
)
|
||||
for water_id in water_ids:
|
||||
if water_id.is_push == True:
|
||||
raise ValidationError(f"水表名为{water_id.archives_id}任务已推送,请勿重复推送")
|
||||
raise UserError(f"水表名为{water_id.archives_id}任务已推送,请勿重复推送")
|
||||
return {
|
||||
"name": "电水表任务",
|
||||
"type": "ir.actions.act_window",
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
<field name="epitope_values_id" string="表位置"/>
|
||||
<field name="last_meter" string="上次抄表日期"/>
|
||||
<field name="last_dosage" string="上次用量"/>
|
||||
<field name="is_push"/>
|
||||
<field name="number" column_invisible="1"/>
|
||||
<field name="sequence" column_invisible="1"/>
|
||||
<field name="meter_date_month" column_invisible="1"/>
|
||||
@@ -128,7 +129,6 @@
|
||||
<field name="archives_state" column_invisible="1"/>
|
||||
<field name="state" column_invisible="1"/>
|
||||
<field name="maximum_count" column_invisible="1"/>
|
||||
<field name="is_push" column_invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<field name="name">meter.water.line.tree</field>
|
||||
<field name="model">meter.water.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="水表任务" create="0" editable="bottom" js_class="custom_water_button" decoration-success="not current_read"
|
||||
<tree string="水表任务" create="0" editable="bottom" js_class="custom_water_button" decoration-success="not is_push"
|
||||
default_order="meter_date_month desc" limit="15">
|
||||
<header>
|
||||
<button name="push_task_push_wizard" type="object" string="推送" class="oe_highlight"/>
|
||||
@@ -119,6 +119,7 @@
|
||||
<field name="epitope_values_id" string="表位置"/>
|
||||
<field name="last_meter" string="上次抄表日期"/>
|
||||
<field name="last_dosage" string="上次用量"/>
|
||||
<field name="is_push"/>
|
||||
<field name="number" column_invisible="1"/>
|
||||
<field name="sequence" column_invisible="1"/>
|
||||
<field name="initial_value" column_invisible="1"/>
|
||||
|
||||
Reference in New Issue
Block a user