1、采购入库,选取目标货位去重校验优化;2、添加功能刀具自动计算当前目标货位的值;
This commit is contained in:
@@ -888,12 +888,11 @@ class SfStockMoveLine(models.Model):
|
||||
def _check_destination_location_id(self):
|
||||
for item in self:
|
||||
if item:
|
||||
i = 0
|
||||
barcode = item.destination_location_id.barcode
|
||||
for line in item.picking_id.move_line_ids_without_package:
|
||||
if barcode and barcode == line.destination_location_id.barcode:
|
||||
i += 1
|
||||
if i > 1:
|
||||
if line.destination_location_id:
|
||||
if (barcode and barcode == line.destination_location_id.barcode
|
||||
and item.product_id != line.product_id):
|
||||
raise ValidationError(
|
||||
'【%s】货位已经被占用,请重新选择!!!' % item.destination_location_id.barcode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user