1、取消创建产品时,自动生成内部参考的值;2、优化功能刀具拆解单,修改由拆解单生成的移动历史单据编码生成规则;3、优化货位看板以及货位看板的货位变更功能;
This commit is contained in:
@@ -481,7 +481,7 @@ class ShelfLocation(models.Model):
|
||||
def action_location_status_enable(self):
|
||||
self.location_status = '空闲'
|
||||
|
||||
@api.depends('product_sn_id')
|
||||
@api.depends('product_sn_id', 'product_sn_ids')
|
||||
def _compute_product_id(self):
|
||||
"""
|
||||
根据产品序列号,获取产品
|
||||
@@ -494,7 +494,8 @@ class ShelfLocation(models.Model):
|
||||
record.sudo().product_num = 1
|
||||
except Exception as e:
|
||||
print('eeeeeee占用', e)
|
||||
|
||||
elif record.product_sn_ids:
|
||||
return True
|
||||
else:
|
||||
try:
|
||||
record.sudo().product_id = False
|
||||
@@ -543,6 +544,13 @@ class SfShelfLocationLot(models.Model):
|
||||
shelf_location_id = fields.Many2one('sf.shelf.location', string="货位")
|
||||
lot_id = fields.Many2one('stock.lot', string='批次号')
|
||||
qty = fields.Integer('数量')
|
||||
qty_num = fields.Integer('变更数量')
|
||||
|
||||
@api.onchange('qty_num')
|
||||
def _onchange_qty_num(self):
|
||||
for item in self:
|
||||
if item.qty_num > item.qty:
|
||||
raise ValidationError('变更数量不能比库存数量大!!!')
|
||||
|
||||
|
||||
class SfStockMoveLine(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user