修改变量名
This commit is contained in:
@@ -285,11 +285,11 @@ class SFSaleOrderCancelLine(models.TransientModel):
|
|||||||
f = 0
|
f = 0
|
||||||
for move in picking.move_ids:
|
for move in picking.move_ids:
|
||||||
f += 1
|
f += 1
|
||||||
flag = False
|
is_changed = False
|
||||||
if picking.state not in ['draft', 'cancel', 'waiting']:
|
if picking.state not in ['draft', 'cancel', 'waiting']:
|
||||||
flag = True
|
is_changed = True
|
||||||
if picking.picking_type_id.name == '客供料入库' and picking.state not in ['cancel', 'assigned']:
|
if picking.picking_type_id.name == '客供料入库' and picking.state not in ['cancel', 'assigned']:
|
||||||
flag = False
|
is_changed = False
|
||||||
vals = {
|
vals = {
|
||||||
'wizard_id': wizard_id,
|
'wizard_id': wizard_id,
|
||||||
'sequence': sequence,
|
'sequence': sequence,
|
||||||
@@ -301,7 +301,7 @@ class SFSaleOrderCancelLine(models.TransientModel):
|
|||||||
'product_name': move.product_id.name if move.product_id else '',
|
'product_name': move.product_id.name if move.product_id else '',
|
||||||
'quantity': move.product_uom_qty,
|
'quantity': move.product_uom_qty,
|
||||||
'doc_state': map_dict.get(picking.state, picking.state),
|
'doc_state': map_dict.get(picking.state, picking.state),
|
||||||
'cancel_reason': '已有异动' if flag else ''
|
'cancel_reason': '已有异动' if is_changed else ''
|
||||||
}
|
}
|
||||||
lines.append(self.create(vals))
|
lines.append(self.create(vals))
|
||||||
sequence += 1
|
sequence += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user