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