diff --git a/sf_bf_connect/models/http.py b/sf_bf_connect/models/http.py
index 8b07bdaf..aac8ba38 100644
--- a/sf_bf_connect/models/http.py
+++ b/sf_bf_connect/models/http.py
@@ -21,7 +21,6 @@ class Http(models.AbstractModel):
def _auth_method_sf_token(cls):
# 从headers.environ中获取对方传过来的token,timestamp,加密的校验字符串
datas = request.httprequest.headers.environ
- logging.info(datas)
if 'HTTP_TOKEN' in datas:
_logger.info('token:%s' % datas['HTTP_TOKEN'])
# 查询密钥
diff --git a/sf_manufacturing/controllers/controllers.py b/sf_manufacturing/controllers/controllers.py
index e19c89a8..cb2fe7ab 100644
--- a/sf_manufacturing/controllers/controllers.py
+++ b/sf_manufacturing/controllers/controllers.py
@@ -28,6 +28,7 @@ class Manufacturing_Connect(http.Controller):
res['Datas'].append({
'BillId': item.production_id.name,
'ProductionLine': item.production_id.production_line_id.id,
+ 'SortId': item.sequence,
'CraftName': item.name,
'Quantity': 1,
'MaterialId': item.product_id.default_code,
diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py
index d6ab48af..023bd26d 100644
--- a/sf_manufacturing/models/mrp_workorder.py
+++ b/sf_manufacturing/models/mrp_workorder.py
@@ -136,7 +136,16 @@ class ResMrpWorkOrder(models.Model):
is_delivery = fields.Boolean('是否配送完成', default=False)
rfid_code = fields.Char('RFID')
production_line_id = fields.Many2one('sf.production.line', related='production_id.production_line_id',
- string='生产线')
+ string='生产线', store=True)
+ production_line_state = fields.Selection(related='production_id.production_line_state',
+ string='上/下产线', store=True)
+
+ @api.onchange('rfid_code')
+ def compute_rfid(self):
+ workorder = self.env['mrp.workorder'].search([('production_id', '=', self.production_id)])
+ if workorder:
+ for item in workorder:
+ item.rfid_code = self.rfid_code
def get_plan_workorder(self, production_line):
tomorrow = (date.today() + timedelta(days=+1)).strftime("%Y-%m-%d")
diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml
index 2531b7f7..259d5f12 100644
--- a/sf_manufacturing/views/mrp_workorder_view.xml
+++ b/sf_manufacturing/views/mrp_workorder_view.xml
@@ -170,14 +170,15 @@
attrs='{"invisible": [("routing_type","in",("获取CNC加工程序","切割"))]}'/>
+
-
+