From a6979b213bac33ec54cea90a1a847ce0b707e613 Mon Sep 17 00:00:00 2001 From: guanhuan Date: Mon, 9 Dec 2024 09:35:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E5=8A=A8=E5=88=9B=E5=BB=BA=E7=9A=84?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=8D=95=E7=94=9F=E6=88=90=E7=9A=84=E5=86=85?= =?UTF-8?q?=E9=83=A8=E8=B0=83=E6=8B=A8=E5=8D=95=E6=B2=A1=E6=9C=89=E6=BA=90?= =?UTF-8?q?=E5=8D=95=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/stock.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py index 0c01a57c..ea8ca7c6 100644 --- a/sf_manufacturing/models/stock.py +++ b/sf_manufacturing/models/stock.py @@ -980,7 +980,8 @@ class ReStockMove(models.Model): production = self.env['mrp.production'].search([('name', '=', self[0].origin)], limit=1, order='id asc') productions = self.env['mrp.production'].search( [('origin', '=', production.origin), ('product_id', '=', production.product_id.id)]) - res['origin'] = ','.join(productions.mapped('name')) + if productions.mapped('name'): + res['origin'] = ','.join(productions.mapped('name')) res['retrospect_ref'] = production.product_id.name return res