1、优化货位
This commit is contained in:
@@ -826,15 +826,20 @@ class Sf_stock_move_line(models.Model):
|
||||
obj = self.env['sf.shelf.location'].search([('name', '=',
|
||||
self.destination_location_id.name)])
|
||||
if record.lot_id:
|
||||
shelf_location_obj = self.env['sf.shelf.location'].search(
|
||||
[('product_sn_id', '=', record.lot_id.id)])
|
||||
if shelf_location_obj:
|
||||
shelf_location_obj.product_sn_id = False
|
||||
if obj:
|
||||
obj.product_sn_id = record.lot_id.id
|
||||
else:
|
||||
if obj:
|
||||
obj.product_sn_id = record.lot_id.id
|
||||
if record.product_id.tracking == 'serial':
|
||||
shelf_location_obj = self.env['sf.shelf.location'].search(
|
||||
[('product_sn_id', '=', record.lot_id.id)])
|
||||
if shelf_location_obj:
|
||||
shelf_location_obj.product_sn_id = False
|
||||
if obj:
|
||||
obj.product_sn_id = record.lot_id.id
|
||||
else:
|
||||
if obj:
|
||||
obj.product_sn_id = record.lot_id.id
|
||||
elif record.product_id.tracking == 'lot':
|
||||
obj.product_sn_ids |= record.lot_id
|
||||
if not obj.product_id:
|
||||
obj.product_id = record.product_id.id
|
||||
else:
|
||||
if obj:
|
||||
obj.product_id = record.product_id.id
|
||||
|
||||
Reference in New Issue
Block a user