增加报告相关结构
This commit is contained in:
@@ -185,6 +185,30 @@ class QualityCheck(models.Model):
|
|||||||
pass
|
pass
|
||||||
# self.ensure_one()
|
# self.ensure_one()
|
||||||
|
|
||||||
|
def do_preview(self):
|
||||||
|
"""
|
||||||
|
预览出厂检验报告
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
def do_publish(self):
|
||||||
|
"""
|
||||||
|
发布出厂检验报告
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
def do_cancel_publish(self):
|
||||||
|
"""
|
||||||
|
取消发布出厂检验报告
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
def do_re_publish(self):
|
||||||
|
"""
|
||||||
|
重新发布出厂检验报告
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
@depends('product_id')
|
@depends('product_id')
|
||||||
def _compute_material_name(self):
|
def _compute_material_name(self):
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
</page>
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//header//button[@name='do_pass'][1]" position="attributes">
|
<xpath expr="//header//button[@name='do_pass'][1]" position="attributes">
|
||||||
|
<attribute name="attrs">{'invisible': [('is_out_check', '=', True)]}</attribute>
|
||||||
<attribute name="string">合格</attribute>
|
<attribute name="string">合格</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//header//button[@name='do_pass'][2]" position="attributes">
|
<xpath expr="//header//button[@name='do_pass'][2]" position="attributes">
|
||||||
@@ -59,12 +60,21 @@
|
|||||||
<attribute name="string">合格</attribute>
|
<attribute name="string">合格</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//header//button[@name='do_fail'][1]" position="attributes">
|
<xpath expr="//header//button[@name='do_fail'][1]" position="attributes">
|
||||||
|
<attribute name="attrs">{'invisible': [('is_out_check', '=', True)]}</attribute>
|
||||||
<attribute name="string">不合格</attribute>
|
<attribute name="string">不合格</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//header//button[@name='do_fail'][2]" position="attributes">
|
<xpath expr="//header//button[@name='do_fail'][2]" position="attributes">
|
||||||
<attribute name="attrs">{'invisible': ['|',('quality_state', '!=', 'pass'),('work_state','in', ('done', 'rework'))]}</attribute>
|
<attribute name="attrs">{'invisible': ['|',('quality_state', '!=', 'pass'),('work_state','in', ('done', 'rework'))]}</attribute>
|
||||||
<attribute name="string">不合格</attribute>
|
<attribute name="string">不合格</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
|
<xpath expr="//header" position="inside">
|
||||||
|
<field name="is_out_check" invisible="1"/>
|
||||||
|
<button name="do_preview" string="预览" type="object" class="btn-primary" attrs="{'invisible': [('is_out_check', '=', False)]}"/>
|
||||||
|
<button name="do_publish" string="发布" type="object" class="btn-primary" attrs="{'invisible': [('is_out_check', '=', False)]}"/>
|
||||||
|
<button name="do_cancel_publish" string="取消发布" type="object" class="btn-primary" attrs="{'invisible': [('is_out_check', '=', False)]}"/>
|
||||||
|
<button name="do_re_publish" string="重新发布" type="object" class="btn-primary" attrs="{'invisible': [('is_out_check', '=', False)]}"/>
|
||||||
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user