sale commit 提交bug

This commit is contained in:
caoqianming 2021-12-07 10:29:34 +08:00
parent 439566b4e5
commit 8e3ab103dd
1 changed files with 2 additions and 2 deletions

View File

@ -165,10 +165,10 @@ class SaleViewSet(CreateUpdateCustomMixin, ListModelMixin, RetrieveModelMixin, C
ip['iproduct'] = i
ips.append(FIFOItemProduct(**ip))
FIFOItemProduct.objects.bulk_create(ips)
# 更新成品库情况
IProduct.objects.filter(sale_iproduct__sale=obj).update(is_saled=True)
# 更新库存
update_inm(fifo)
# 更新成品库情况
ips.update(is_saled=True)
return Response()
class SaleProductViewSet(ListModelMixin, DestroyModelMixin, CreateModelMixin, GenericViewSet):