1、质检单类型为出厂检测报告时,隐藏通过状态下的不合格按钮;2、功能刀具组装检测BOM物料时过滤产品的追溯类型为不追溯的产品。

This commit is contained in:
yuxianghui
2025-06-17 11:47:26 +08:00
parent 397d4f29a1
commit 0eeebf437a
2 changed files with 2 additions and 1 deletions

View File

@@ -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')],