1.工单新增rfid字段

2.修改中控对接的工单接口
3.快速订单材料,型号,客户修改为可选择
This commit is contained in:
jinling.yang
2024-02-21 14:52:14 +08:00
parent 9a4477de8b
commit 1e006b0bd7
6 changed files with 10 additions and 5 deletions

View File

@@ -20,9 +20,9 @@ class Manufacturing_Connect(http.Controller):
res = {'Succeed': True, 'Datas': []}
datas = request.httprequest.data
ret = json.loads(datas)
logging.info('RfidCode:%s' % ret)
logging.info('RfidCode:%s' % ret['RfidCode'])
workorder = request.env['mrp.workorder'].sudo().search(
[('production_id.name', '=', 'WH/MO/00071'), ('routing_type', '=', '装夹')])
[('rfid_code', '=', ret['RfidCode']), ('routing_type', '=', '装夹预调')])
if workorder:
for item in workorder:
res['Datas'].append({

View File

@@ -133,6 +133,7 @@ class ResMrpWorkOrder(models.Model):
preset_program_information = fields.Char(string="预调程序信息")
workpiece_delivery_ids = fields.One2many('sf.workpiece.delivery', 'workorder_id', '工件配送')
is_delivery = fields.Boolean('是否配送完成', default=False)
rfid_code = fields.Char('RFID')
@api.onchange('is_ok')
def _onchange_inspection_user_id(self):

View File

@@ -176,6 +176,8 @@
attrs='{"invisible": [("routing_type","!=","装夹预调")]}'/>
<field name="functional_fixture_type_id" force_save="1"
attrs='{"invisible": [("routing_type","!=","装夹预调")]}'/>
<field name="rfid_code"
attrs='{"invisible": [("routing_type","!=","装夹预调")]}'/>
</group>
<group attrs='{"invisible": [("routing_type","=","获取CNC加工程序")]}'>
<div>