diff --git a/sf_manufacturing/models/sale_order.py b/sf_manufacturing/models/sale_order.py index 225f6fe5..c8cc129d 100644 --- a/sf_manufacturing/models/sale_order.py +++ b/sf_manufacturing/models/sale_order.py @@ -163,7 +163,7 @@ class SaleOrder(models.Model): 'purchase', product_seria, product) - if purchase_embryo == -3: + if purchase_embryo and purchase_embryo == -3: raise UserError('该订单模型的材料型号暂未设置获取方式和供应商,请先配置再进行分配') else: # 产品配置bom