diff --git a/sf_manufacturing/controllers/controllers.py b/sf_manufacturing/controllers/controllers.py index 1568f7c7..4358b35d 100644 --- a/sf_manufacturing/controllers/controllers.py +++ b/sf_manufacturing/controllers/controllers.py @@ -430,7 +430,7 @@ class Manufacturing_Connect(http.Controller): if 'DeviceId' in ret: logging.info('DeviceId:%s' % ret['DeviceId']) if 'IsComplete' in ret: - if ret['IsComplete'] is True: + if ret['IsComplete'] is True or ret['IsComplete'] is False: for i in range(1, 5): logging.info('F-RfidCode:%s' % i) if f'RfidCode{i}' in ret: @@ -482,7 +482,7 @@ class Manufacturing_Connect(http.Controller): logging.info('DeviceId:%s' % ret['DeviceId']) delivery_Arr = [] if 'IsComplete' in ret: - if ret['IsComplete'] is True: + if ret['IsComplete'] is True or ret['IsComplete'] is False: for i in range(1, 5): logging.info('F-RfidCode:%s' % i) if f'RfidCode{i}' in ret: diff --git a/sf_manufacturing/data/empty_racks_data.xml b/sf_manufacturing/data/empty_racks_data.xml new file mode 100644 index 00000000..90102ec2 --- /dev/null +++ b/sf_manufacturing/data/empty_racks_data.xml @@ -0,0 +1,36 @@ + + + + + 运送空料架路线:C01-A01 + sf.workpiece.delivery + WCA%(year)s%(month)s%(day)s + 4 + + + + + 运送空料架路线:B01-B02 + sf.workpiece.delivery + WBB%(year)s%(month)s%(day)s + 4 + + + + + 运送空料架路线:B01-A01 + sf.workpiece.delivery + WBA%(year)s%(month)s%(day)s + 4 + + + + + 运送空料架路线:C01-B02 + sf.workpiece.delivery + WCB%(year)s%(month)s%(day)s + 4 + + + + \ No newline at end of file diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 9d64361e..70551c5e 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -1078,6 +1078,7 @@ class WorkPieceDelivery(models.Model): _name = "sf.workpiece.delivery" _description = '工件配送' + name = fields.Char('名称') delivery_num = fields.Char('工件配送编码') workorder_id = fields.Many2one('mrp.workorder', string='工单', readonly=True) production_id = fields.Many2one('mrp.production', string='制造订单号', readonly=True) @@ -1095,6 +1096,7 @@ class WorkPieceDelivery(models.Model): status = fields.Selection( [('待下发', '待下发'), ('待配送', '待配送'), ('已配送', '已配送')], string='状态', default='待下发') is_cnc_program_down = fields.Boolean('程序是否下发', default=False) + active = fields.Boolean(string="有效", default=True) # @api.model # def create(self, vals): diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index 16ea429a..d766629c 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -7,8 +7,8 @@ import os from odoo import models, fields, api, _ from odoo.exceptions import ValidationError from odoo.modules import get_resource_path -from OCC.Extend.DataExchange import read_step_file -from OCC.Extend.DataExchange import write_stl_file +# from OCC.Extend.DataExchange import read_step_file +# from OCC.Extend.DataExchange import write_stl_file class ResProductMo(models.Model): diff --git a/sf_manufacturing/views/mrp_production_addional_change.xml b/sf_manufacturing/views/mrp_production_addional_change.xml index 0e1695ef..c90122f7 100644 --- a/sf_manufacturing/views/mrp_production_addional_change.xml +++ b/sf_manufacturing/views/mrp_production_addional_change.xml @@ -79,12 +79,12 @@ - + diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml index 841b51ed..28b06aeb 100644 --- a/sf_manufacturing/views/mrp_workorder_view.xml +++ b/sf_manufacturing/views/mrp_workorder_view.xml @@ -183,6 +183,8 @@ attrs='{"invisible": [("routing_type","in",("获取CNC加工程序","切割"))]}'/> + sf.workpiece.delivery - - + + + + - + @@ -634,9 +636,71 @@ 工件配送 sf.workpiece.delivery - {'search_default_on_up':1} + tree,search [('type','in',['上产线','下产线'])] + + + + + 运送空料架 + sf.workpiece.delivery + + +
+
+ + + +
+
+
+ + + + 运送空料架 + sf.workpiece.delivery + +
+ +
+
+ + + + + + + +
+
+
+
+ + + + 运送空料架 + sf.workpiece.delivery + + + + + + + + + + + + 运送空料架 + sf.workpiece.delivery + + + tree,form + [('type','in',['运送空料架'])] + diff --git a/sf_plan/views/view.xml b/sf_plan/views/view.xml index 68772142..96e19c8e 100644 --- a/sf_plan/views/view.xml +++ b/sf_plan/views/view.xml @@ -306,6 +306,14 @@ action="sf_manufacturing.sf_workpiece_delivery_act" parent="mrp.menu_mrp_manufacturing" /> + + diff --git a/sf_sale/models/quick_easy_order.py b/sf_sale/models/quick_easy_order.py index 1ece6b86..ed52d9de 100644 --- a/sf_sale/models/quick_easy_order.py +++ b/sf_sale/models/quick_easy_order.py @@ -8,8 +8,8 @@ from datetime import datetime import requests from odoo import http from odoo.http import request -from OCC.Extend.DataExchange import read_step_file -from OCC.Extend.DataExchange import write_stl_file +# from OCC.Extend.DataExchange import read_step_file +# from OCC.Extend.DataExchange import write_stl_file from odoo import models, fields, api from odoo.modules import get_resource_path from odoo.exceptions import ValidationError, UserError diff --git a/sf_sale/models/quick_easy_order_old.py b/sf_sale/models/quick_easy_order_old.py index 724d4369..24bf5738 100644 --- a/sf_sale/models/quick_easy_order_old.py +++ b/sf_sale/models/quick_easy_order_old.py @@ -6,8 +6,8 @@ import os from datetime import datetime from stl import mesh # from OCC.Core.GProp import GProp_GProps -from OCC.Extend.DataExchange import read_step_file -from OCC.Extend.DataExchange import write_stl_file +# from OCC.Extend.DataExchange import read_step_file +# from OCC.Extend.DataExchange import write_stl_file from odoo.addons.sf_base.commons.common import Common from odoo import models, fields, api from odoo.modules import get_resource_path