1、质检单类型为出厂检测报告时,隐藏通过状态下的不合格按钮;2、功能刀具组装检测BOM物料时过滤产品的追溯类型为不追溯的产品。
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
<attribute name="string">不合格</attribute>
|
||||
</xpath>
|
||||
<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')),'&',('quality_state', '=', 'pass'), ('test_type', '=', '出厂检验报告')]}</attribute>
|
||||
<attribute name="string">不合格</attribute>
|
||||
</xpath>
|
||||
|
||||
|
||||
@@ -818,6 +818,7 @@ class FunctionalToolAssembly(models.Model):
|
||||
|
||||
def _get_old_tool_material_lot(self, material_ids):
|
||||
""" 根据先进先出原则选择物料批次 """
|
||||
material_ids = material_ids.filtered(lambda m: m.tracking != 'none')
|
||||
location_id = self.env['stock.location'].search([('name', '=', '刀具房')])
|
||||
stock_quant = self.env['stock.quant'].sudo().search(
|
||||
[('location_id', '=', location_id.id), ('product_id', 'in', material_ids.ids), ('quantity', '>', '0')],
|
||||
|
||||
Reference in New Issue
Block a user