Compare commits

...

6 Commits

Author SHA1 Message Date
马广威
9e56aeda67 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
2024-06-24 21:38:15 +08:00
jinling.yang
828b4b0f6b 修复功能刀具清单列表 2024-06-24 16:55:42 +08:00
jinling.yang
ec30a07394 修复创建移动历史记录 2024-06-24 14:54:33 +08:00
jinling.yang
e453508f17 修改功能刀具清单查询列表:部分字段不可更改 2024-06-24 14:18:42 +08:00
jinling.yang
de6014d1dd 修复工件上下产线接口:当RFID不为空时,更改制造订单上下产线状态 2024-06-21 17:39:15 +08:00
马广威
ecf265fee7 Accept Merge Request #1084: (release/release1.7 -> master)
Merge Request: 迭代库存、制造逻辑

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1084?initial=true
2024-06-19 20:24:20 +08:00
3 changed files with 44 additions and 40 deletions

View File

@@ -555,9 +555,9 @@
<field name="model">sf.tool.inventory</field>
<field name="arch" type="xml">
<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="tool_groups_id"/>
<field name="tool_groups_id" required="1" attrs="{'readonly': [('id', '!=', False)]}"/>
<field name="work_material"/>
<field name="life_span"/>
<field name="prefix" optional="hide"/>

View File

@@ -460,6 +460,7 @@ class Manufacturing_Connect(http.Controller):
if f'RfidCode{i}' in ret:
rfid_code = ret[f'RfidCode{i}']
logging.info('RfidCode:%s' % rfid_code)
if rfid_code is not None:
domain = [
('rfid_code', '=', rfid_code),
('routing_type', '=', 'CNC加工')
@@ -471,7 +472,8 @@ class Manufacturing_Connect(http.Controller):
logging.info(
'制造订单产线状态:%s' % order.production_id.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', '=', '上产线'),
('production_id', '=', order.production_id.id)])
if workpiece_delivery.status == '待下发':
@@ -515,6 +517,7 @@ class Manufacturing_Connect(http.Controller):
if f'RfidCode{i}' in ret:
rfid_code = ret[f'RfidCode{i}']
logging.info('RfidCode:%s' % rfid_code)
if rfid_code is not None:
domain = [
('rfid_code', '=', rfid_code),
('routing_type', '=', 'CNC加工')
@@ -526,7 +529,8 @@ class Manufacturing_Connect(http.Controller):
logging.info(
'制造订单产线状态:%s' % order.production_id.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', '=', '下产线'),
('production_id', '=', order.production_id.id)])
delivery_Arr.append(workpiece_delivery.id)

View File

@@ -1028,7 +1028,7 @@ class ProductProduct(models.Model):
'product_id': self.id,
'lot_id': lot_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(),
'qty_done': 1.0,
'state': 'done',