采购入库bug
This commit is contained in:
parent
1ab3b4eb7a
commit
b6d97a1be1
|
@ -16,7 +16,7 @@ def update_by_fifodetail(sender, instance, created, **kwargs):
|
|||
defaults={'material':material, 'warehouse':warehouse, 'count':0})
|
||||
o1.count = o1.count + instance.count
|
||||
o1.save()
|
||||
o2 = MaterialBatch.objects.get_or_create(material=material, warehouse=warehouse, batch=instance.batch,\
|
||||
o2, _ = MaterialBatch.objects.get_or_create(material=material, warehouse=warehouse, batch=instance.batch,\
|
||||
defaults={'material':material, 'warehouse':warehouse, 'count':0, 'batch':instance.batch})
|
||||
o2.save()
|
||||
material.count = material.count + 1
|
||||
|
|
Loading…
Reference in New Issue