diff --git a/sf_machine_connect/views/WorkCenterBarcodes.xml b/sf_machine_connect/views/WorkCenterBarcodes.xml
index 90058b59..a1a5a5ea 100644
--- a/sf_machine_connect/views/WorkCenterBarcodes.xml
+++ b/sf_machine_connect/views/WorkCenterBarcodes.xml
@@ -12,6 +12,7 @@
+
diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py
index ccb7ed5c..e00aa1d3 100644
--- a/sf_manufacturing/models/mrp_workorder.py
+++ b/sf_manufacturing/models/mrp_workorder.py
@@ -141,8 +141,8 @@ class ResMrpWorkOrder(models.Model):
# 是否绑定托盘
is_trayed = fields.Boolean(string='是否绑定托盘', default=False)
-
tag_type = fields.Selection([("重新加工", "重新加工")], string="标签", tracking=True)
+
technology_design_id = fields.Many2one('sf.technology.design')
def _compute_default_construction_period_status(self):
diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py
index 031672b8..fb42da12 100644
--- a/sf_manufacturing/models/stock.py
+++ b/sf_manufacturing/models/stock.py
@@ -286,6 +286,8 @@ class StockRule(models.Model):
mrp_production = self.env['mrp.production'].sudo().search([('name', '=', production.origin)], limit=1)
if mrp_production:
sale_order = self.env['sale.order'].sudo().search([('name', '=', mrp_production.origin)])
+ else:
+ mrp_production = production
if sale_order:
# sale_order.write({'schedule_status': 'to schedule'})
self.env['sf.production.plan'].sudo().with_company(company_id).create({
@@ -293,7 +295,7 @@ class StockRule(models.Model):
'order_deadline': sale_order.deadline_of_delivery,
'production_id': production.id,
'date_planned_start': production.date_planned_start,
- 'origin': production.origin,
+ 'origin': mrp_production.origin,
'product_qty': production.product_qty,
'product_id': production.product_id.id,
'state': 'draft',
diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml
index 53134cc4..c989faff 100644
--- a/sf_manufacturing/views/mrp_workorder_view.xml
+++ b/sf_manufacturing/views/mrp_workorder_view.xml
@@ -32,6 +32,7 @@
+
+
diff --git a/sf_plan/models/custom_plan.py b/sf_plan/models/custom_plan.py
index e357f93e..f0214c9a 100644
--- a/sf_plan/models/custom_plan.py
+++ b/sf_plan/models/custom_plan.py
@@ -259,10 +259,10 @@ class sf_production_plan(models.Model):
# sale_obj = self.env['sale.order'].search([('name', '=', record.origin)])
# if 'S' in sale_obj.name:
# sale_obj.schedule_status = 'to process'
- mrp_production_ids = record.production_id._get_children().ids
- print('mrp_production_ids', mrp_production_ids)
- for i in mrp_production_ids:
- record.env['mrp.production'].sudo().browse(i).schedule_state = '已排'
+ # mrp_production_ids = record.production_id._get_children().ids
+ # print('mrp_production_ids', mrp_production_ids)
+ # for i in mrp_production_ids:
+ # 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.sudo().production_id.production_line_id = record.production_line_id.id