From 8e3ab103dd324baf2bb42a12e93e1fa29827df2e Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 7 Dec 2021 10:29:34 +0800 Subject: [PATCH] =?UTF-8?q?sale=20commit=20=E6=8F=90=E4=BA=A4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/sam/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hb_server/apps/sam/views.py b/hb_server/apps/sam/views.py index 1f7b0b3..8269505 100644 --- a/hb_server/apps/sam/views.py +++ b/hb_server/apps/sam/views.py @@ -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):