处理质检单控制方式为非数量时,调拨单验证时存在不合格质检单的提示信息数量问题
This commit is contained in:
@@ -18,13 +18,13 @@ class StockPicking(models.Model):
|
||||
fail_check_text = ''
|
||||
for product_id in product_list:
|
||||
check_ids = quality_check_ids.filtered(lambda qc: qc.product_id == product_id)
|
||||
number = sum(check_ids.mapped('qty_line'))
|
||||
if number != 0:
|
||||
fail_check_text = (f'{fail_check_text}、{product_id.name} {number}件'
|
||||
if fail_check_text != '' else f'{product_id.name} {number}件')
|
||||
if all(check_id.measure_on == 'move_line' for check_id in check_ids):
|
||||
number = sum(check_ids.mapped('qty_line'))
|
||||
else:
|
||||
fail_check_text = (f'{fail_check_text}、{product_id.name}'
|
||||
if fail_check_text != '' else f'{product_id.name}')
|
||||
number = sum(self.move_ids_without_package.filtered(
|
||||
lambda ml: ml.product_id == product_id).mapped('quantity_done'))
|
||||
fail_check_text = (f'{fail_check_text}、{product_id.name} {number}件'
|
||||
if fail_check_text != '' else f'{product_id.name} {number}件')
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'picking.validate.check.wizard',
|
||||
|
||||
Reference in New Issue
Block a user