Accept Merge Request #1093: (release/release_1.8 -> master)
Merge Request: 功能刀具、工件状态优化 Created By: @马广威 Accepted By: @马广威 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1093?initial=true
This commit is contained in:
@@ -555,9 +555,9 @@
|
|||||||
<field name="model">sf.tool.inventory</field>
|
<field name="model">sf.tool.inventory</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="功能刀具清单" create="1" edit="1" delete="0" editable="bottom">
|
<tree string="功能刀具清单" create="1" edit="1" delete="0" editable="bottom">
|
||||||
<field name="name"/>
|
<field name="name" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="functional_cutting_tool_model_id"/>
|
<field name="functional_cutting_tool_model_id"/>
|
||||||
<field name="tool_groups_id"/>
|
<field name="tool_groups_id" required="1" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="work_material"/>
|
<field name="work_material"/>
|
||||||
<field name="life_span"/>
|
<field name="life_span"/>
|
||||||
<field name="prefix" optional="hide"/>
|
<field name="prefix" optional="hide"/>
|
||||||
|
|||||||
@@ -460,6 +460,7 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
if f'RfidCode{i}' in ret:
|
if f'RfidCode{i}' in ret:
|
||||||
rfid_code = ret[f'RfidCode{i}']
|
rfid_code = ret[f'RfidCode{i}']
|
||||||
logging.info('RfidCode:%s' % rfid_code)
|
logging.info('RfidCode:%s' % rfid_code)
|
||||||
|
if rfid_code is not None:
|
||||||
domain = [
|
domain = [
|
||||||
('rfid_code', '=', rfid_code),
|
('rfid_code', '=', rfid_code),
|
||||||
('routing_type', '=', 'CNC加工')
|
('routing_type', '=', 'CNC加工')
|
||||||
@@ -471,7 +472,8 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
logging.info(
|
logging.info(
|
||||||
'制造订单产线状态:%s' % order.production_id.production_line_state)
|
'制造订单产线状态:%s' % order.production_id.production_line_state)
|
||||||
order.production_id.write({'production_line_state': '已上产线'})
|
order.production_id.write({'production_line_state': '已上产线'})
|
||||||
workpiece_delivery = request.env['sf.workpiece.delivery'].sudo().search([
|
workpiece_delivery = request.env['sf.workpiece.delivery'].sudo().search(
|
||||||
|
[
|
||||||
('rfid_code', '=', rfid_code), ('type', '=', '上产线'),
|
('rfid_code', '=', rfid_code), ('type', '=', '上产线'),
|
||||||
('production_id', '=', order.production_id.id)])
|
('production_id', '=', order.production_id.id)])
|
||||||
if workpiece_delivery.status == '待下发':
|
if workpiece_delivery.status == '待下发':
|
||||||
@@ -515,6 +517,7 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
if f'RfidCode{i}' in ret:
|
if f'RfidCode{i}' in ret:
|
||||||
rfid_code = ret[f'RfidCode{i}']
|
rfid_code = ret[f'RfidCode{i}']
|
||||||
logging.info('RfidCode:%s' % rfid_code)
|
logging.info('RfidCode:%s' % rfid_code)
|
||||||
|
if rfid_code is not None:
|
||||||
domain = [
|
domain = [
|
||||||
('rfid_code', '=', rfid_code),
|
('rfid_code', '=', rfid_code),
|
||||||
('routing_type', '=', 'CNC加工')
|
('routing_type', '=', 'CNC加工')
|
||||||
@@ -526,7 +529,8 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
logging.info(
|
logging.info(
|
||||||
'制造订单产线状态:%s' % order.production_id.production_line_state)
|
'制造订单产线状态:%s' % order.production_id.production_line_state)
|
||||||
order.production_id.write({'production_line_state': '已下产线'})
|
order.production_id.write({'production_line_state': '已下产线'})
|
||||||
workpiece_delivery = request.env['sf.workpiece.delivery'].sudo().search([
|
workpiece_delivery = request.env['sf.workpiece.delivery'].sudo().search(
|
||||||
|
[
|
||||||
('rfid_code', '=', rfid_code), ('type', '=', '下产线'),
|
('rfid_code', '=', rfid_code), ('type', '=', '下产线'),
|
||||||
('production_id', '=', order.production_id.id)])
|
('production_id', '=', order.production_id.id)])
|
||||||
delivery_Arr.append(workpiece_delivery.id)
|
delivery_Arr.append(workpiece_delivery.id)
|
||||||
|
|||||||
@@ -1028,7 +1028,7 @@ class ProductProduct(models.Model):
|
|||||||
'product_id': self.id,
|
'product_id': self.id,
|
||||||
'lot_id': lot_id.id,
|
'lot_id': lot_id.id,
|
||||||
'move_id': stock_move_id.id,
|
'move_id': stock_move_id.id,
|
||||||
'destination_location_id': shelf_location_id.id,
|
'destination_location_id': shelf_location_id.id if shelf_location_id else False,
|
||||||
'install_tool_time': fields.Datetime.now(),
|
'install_tool_time': fields.Datetime.now(),
|
||||||
'qty_done': 1.0,
|
'qty_done': 1.0,
|
||||||
'state': 'done',
|
'state': 'done',
|
||||||
|
|||||||
Reference in New Issue
Block a user