From 432a0125966a7edc2cff5f95dfe35785922bb13a Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Fri, 17 May 2024 11:47:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96=EF=BC=8C?= =?UTF-8?q?=E7=89=A9=E6=B5=81=E4=B8=8B=E5=8D=95=E5=A2=9E=E8=A1=A5=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_bf_connect/models/jd_eclp.py | 2 +- sf_dlm/views/product_template_view.xml | 2 +- sf_plan/models/custom_plan.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sf_bf_connect/models/jd_eclp.py b/sf_bf_connect/models/jd_eclp.py index d755c7be..6d6a0e38 100644 --- a/sf_bf_connect/models/jd_eclp.py +++ b/sf_bf_connect/models/jd_eclp.py @@ -56,7 +56,7 @@ class JdEclp(models.Model): """ res = super(JdEclp, self).button_validate() if self.check_out == 'OUT': - if self.logistics_way != '自提': + if self.logistics_way != '自提' and self.logistics_way: if self.logistics_status != '2': raise ValidationError('非自提订单,必须先下物流单,并获取物流面单后才可出库!') return res diff --git a/sf_dlm/views/product_template_view.xml b/sf_dlm/views/product_template_view.xml index c62ae8cd..bbff27e9 100644 --- a/sf_dlm/views/product_template_view.xml +++ b/sf_dlm/views/product_template_view.xml @@ -55,7 +55,7 @@ - stock.group_stock_user,product.group_stock_packaging,sf_base.group_sale_salemanager,sf_base.group_sale_director,sf_base.group_purchase,sf_base.group_purchase_director + stock.group_stock_user,product.group_stock_packaging,sf_base.group_sale_salemanager,sf_base.group_sale_director,sf_base.group_purchase,sf_base.group_purchase_director,sf_base.group_plan_dispatch diff --git a/sf_plan/models/custom_plan.py b/sf_plan/models/custom_plan.py index 73f8c5c7..fd1e231a 100644 --- a/sf_plan/models/custom_plan.py +++ b/sf_plan/models/custom_plan.py @@ -230,8 +230,8 @@ class sf_production_plan(models.Model): record.env['mrp.production'].sudo().browse(i).schedule_state = '已排' # record.production_id.date_planned_start = record.date_planned_start # record.production_id.date_planned_finished = record.date_planned_finished - record.production_id.production_line_id = record.production_line_id.id - record.production_id.workorder_ids.filtered( + record.sudo().production_id.production_line_id = record.production_line_id.id + record.sudo().production_id.workorder_ids.filtered( lambda b: b.routing_type == "装夹预调").workpiece_delivery_ids.write( {'production_line_id': record.production_line_id.id, 'plan_start_processing_time': record.date_planned_start})