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})