From 8e726e1bf61a888a51fb3f4d1c9e0527ce8cbe4e Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Tue, 13 May 2025 15:01:54 +0800 Subject: [PATCH] =?UTF-8?q?sf-=E5=88=B6=E9=80=A0-=E5=B7=A5=E8=89=BA?= =?UTF-8?q?=E5=A4=96=E5=8D=8F=E7=9A=84=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=90=8E=EF=BC=8C=E5=A4=96=E5=8D=8F=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E6=8B=A8=E5=8D=95=E7=9A=84=E4=BD=9C=E4=B8=9A=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E7=9A=84=E9=A2=84=E7=95=99=E6=95=B0=E9=87=8F=E8=B7=9F?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=95=B0=E9=87=8F=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/stock.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py index 1b60e68a..1b7f4e42 100644 --- a/sf_manufacturing/models/stock.py +++ b/sf_manufacturing/models/stock.py @@ -930,6 +930,8 @@ class ReStockMove(models.Model): } def get_move_line(self, production_id, sorted_workorders): + # if not self.move_ids[0].product_id.single_manufacturing and self.move_ids[0].product_id.tracking == 'none': + qty = production_id.product_qty return { 'move_id': self.id, 'product_id': self.product_id.id, @@ -937,7 +939,7 @@ class ReStockMove(models.Model): 'location_id': self.picking_id.location_id.id, 'location_dest_id': self.picking_id.location_dest_id.id, 'picking_id': self.picking_id.id, - 'reserved_uom_qty': 1.0, + 'reserved_uom_qty': qty, 'lot_id': production_id.move_line_raw_ids.lot_id.id, 'company_id': self.env.company.id, # 'workorder_id': '' if not sorted_workorders else sorted_workorders.id,