From bfff4ac440e0d7be37839ddb8a3a40eefeb0b6dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Fri, 9 May 2025 13:43:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E6=8E=A5=E6=94=B6=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=B0=86=E4=B8=8D=E8=BF=BD=E6=BA=AF=E7=9A=84=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E7=9A=84=E5=AE=8C=E6=88=90=E6=95=B0=E9=87=8F=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=A1=AB=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/purchase_order.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sf_manufacturing/models/purchase_order.py b/sf_manufacturing/models/purchase_order.py index 9b682d83..f4a7be81 100644 --- a/sf_manufacturing/models/purchase_order.py +++ b/sf_manufacturing/models/purchase_order.py @@ -96,8 +96,12 @@ class PurchaseOrder(models.Model): # 'origin': record.name + ',' + replenish.origin, # }) # replenish.action_replenish() - - return super(PurchaseOrder, self).button_confirm() + res = super(PurchaseOrder, self).button_confirm() + for line in self.order_line: + # 将产品不追踪序列号的行项目设置qty_done + if line.move_ids[0].product_id.tracking == 'none': + line.move_ids[0].quantity_done = line.move_ids[0].product_qty + return res origin_sale_id = fields.Many2one('sale.order', string='销售订单号', store=True, compute='_compute_origin_sale_id')