Accept Merge Request #1916: (feature/质检弹窗优化_1 -> develop)
Merge Request: Merge branch 'feature/质检弹窗优化' into feature/质检弹窗优化_1 Created By: @禹翔辉 Reviewed By: @马广威 Approved By: @马广威 Accepted By: @禹翔辉 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1916
This commit is contained in:
@@ -21,7 +21,7 @@ class StockPicking(models.Model):
|
||||
“警告:存在不合格产品XXXX n 件、YYYYY m件,继续调拨请点“确认”,否则请取消?”
|
||||
"""
|
||||
context = self.env.context
|
||||
if (not (isinstance(res, dict) and res.get('type') == 'ir.actions.act_window')
|
||||
if (not (not isinstance(res, bool) and res.get('type') == 'ir.actions.act_window')
|
||||
and not context.get('again_validate')
|
||||
and self.quality_check_ids.filtered(lambda qc: qc.quality_state == 'fail')):
|
||||
# 回滚事务,为二次确认/取消做准备
|
||||
@@ -36,8 +36,14 @@ class StockPicking(models.Model):
|
||||
else:
|
||||
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}件')
|
||||
if number == 0:
|
||||
number = sum(self.move_ids_without_package.filtered(
|
||||
lambda ml: ml.product_id == product_id).mapped('reserved_availability'))
|
||||
if number == 0:
|
||||
number = sum(self.move_ids_without_package.filtered(
|
||||
lambda ml: ml.product_id == product_id).mapped('product_uom_qty'))
|
||||
fail_check_text = (f'{fail_check_text}、{product_id.display_name} {number}件'
|
||||
if fail_check_text != '' else f'{product_id.display_name} {number}件')
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'picking.validate.check.wizard',
|
||||
|
||||
Reference in New Issue
Block a user