diff --git a/sf_base/__manifest__.py b/sf_base/__manifest__.py index 77165cde..800d07c0 100644 --- a/sf_base/__manifest__.py +++ b/sf_base/__manifest__.py @@ -14,9 +14,14 @@ 'data': [ 'security/group_security.xml', 'security/ir.model.access.csv', + 'data/product_data.xml', + 'data/process_data.xml', + 'views/product_template_view.xml', + 'views/sale_order_view.xml', 'views/mrs_base_view.xml', 'views/mrs_common_view.xml', - "views/menu_view.xml" + 'views/menu_view.xml', + 'views/mrp_routing_workcenter_view.xml', ], 'demo': [ diff --git a/sf_bpm_api/data/process_data.xml b/sf_base/data/process_data.xml similarity index 52% rename from sf_bpm_api/data/process_data.xml rename to sf_base/data/process_data.xml index 1447fc13..4bc9cf25 100644 --- a/sf_bpm_api/data/process_data.xml +++ b/sf_base/data/process_data.xml @@ -1,79 +1,52 @@ - - - - Assembly Line 1 - false - - - - - - 1 - false - - + 获取自动编码程序 automatic coding manual - - 60 - false + True 装夹 clamping manual - - 60 - false + True 前置三元定位检测 - pre-ternary positioning detection + pre-ternary manual - - 60 - false + True CNC加工 CNC machining manual - - 60 - false + True 后置三元质量检测 - post ternary quality inspection + post ternary manual - - 60 - false + True 解除装夹 remove the clamping manual - - 60 - false + True - - \ No newline at end of file diff --git a/sf_bpm_api/data/product_data.xml b/sf_base/data/product_data.xml similarity index 100% rename from sf_bpm_api/data/product_data.xml rename to sf_base/data/product_data.xml diff --git a/sf_base/models/__init__.py b/sf_base/models/__init__.py index 27b447be..1b906dd5 100644 --- a/sf_base/models/__init__.py +++ b/sf_base/models/__init__.py @@ -1,2 +1,5 @@ from. import sf_base from. import sf_common +from . import sale_order +from . import product_template +from . import process diff --git a/sf_base/models/process.py b/sf_base/models/process.py new file mode 100644 index 00000000..05b7791c --- /dev/null +++ b/sf_base/models/process.py @@ -0,0 +1,20 @@ +from odoo import fields, models, api + + +class ModelType(models.Model): + _name = 'sf.model.type' + _description = '模型类型' + + name = fields.Char('名称') + routing_tmpl_id = fields.One2many('mrp.routing.workcenter', 'model_type_id', '工序模板') + + +class ResMrpRoutingWorkcenter(models.Model): + _inherit = 'mrp.routing.workcenter' + + code = fields.Char('唯一编码') + is_repeat = fields.Boolean('重复', default=False) + workcenter_id = fields.Many2many('mrp.workcenter', required=False) + bom_id = fields.Many2one('mrp.bom', required=False) + sort = fields.Integer('排序') + model_type_id = fields.Many2one('sf.model.type') diff --git a/sf_bpm_api/models/product_template.py b/sf_base/models/product_template.py similarity index 80% rename from sf_bpm_api/models/product_template.py rename to sf_base/models/product_template.py index 0c1d4b12..7535ae92 100644 --- a/sf_bpm_api/models/product_template.py +++ b/sf_base/models/product_template.py @@ -6,21 +6,21 @@ class ResProductTemplate(models.Model): _inherit = 'product.template' # 模型的长,宽,高,体积,精度,材料 - model_long = fields.Float('长[mm]', digits=(16, 3)) - model_width = fields.Float('宽[mm]', digits=(16, 3)) - model_height = fields.Float('高[mm]', digits=(16, 3)) - model_volume = fields.Float('体积[mm³]', digits=(16, 3)) + model_long = fields.Float('模型长[mm]', digits=(16, 3)) + model_width = fields.Float('模型宽[mm]', digits=(16, 3)) + model_height = fields.Float('模型高[mm]', digits=(16, 3)) + model_volume = fields.Float('模型体积[mm³]', digits=(16, 3)) model_precision = fields.Float('精度要求', digits=(16, 3)) - model_materials_id = fields.Many2one('mrs.production.materials', string='材料') - model_materials_type_id = fields.Many2one('mrs.materials.model', string='型号') - model_type_id = fields.Many2one('sf.model.type', string='类型') - processing_panel = fields.Char('加工面板') + model_materials_id = fields.Many2one('mrs.production.materials', string='模型材料') + model_materials_type_id = fields.Many2one('mrs.materials.model', string='模型材料型号') + model_type_id = fields.Many2one('sf.model.type', string='模型类型') + processing_panel = fields.Char('模型加工面板') # 胚料的长,宽,高 - embryo_long = fields.Float('长[mm]', digits=(16, 3)) - embryo_width = fields.Float('宽[mm]', digits=(16, 3)) - embryo_height = fields.Float('高[mm]', digits=(16, 3)) - embryo_materials_id = fields.Many2one('mrs.production.materials', string='材料') - embryo_materials_type_id = fields.Many2one('mrs.materials.model', string='型号') + embryo_long = fields.Float('胚料长[mm]', digits=(16, 3)) + embryo_width = fields.Float('胚料宽[mm]', digits=(16, 3)) + embryo_height = fields.Float('胚料高[mm]', digits=(16, 3)) + embryo_materials_id = fields.Many2one('mrs.production.materials', string='胚料材料') + embryo_materials_type_id = fields.Many2one('mrs.materials.model', string='胚料材料型号') # 业务平台分配工厂后在智能工厂先创建销售订单再创建该产品 @@ -89,12 +89,7 @@ class ResMrpBom(models.Model): return self.env['mrp.bom.line'].create(vals) -class ModelType(models.Model): - _name = 'sf.model.type' - _description = '模型类型' - - name = fields.Char('名称') - code = fields.Char('编码') + diff --git a/sf_bpm_api/models/sale_order.py b/sf_base/models/sale_order.py similarity index 100% rename from sf_bpm_api/models/sale_order.py rename to sf_base/models/sale_order.py diff --git a/sf_base/security/ir.model.access.csv b/sf_base/security/ir.model.access.csv index 5b4aa249..e94d9ea6 100644 --- a/sf_base/security/ir.model.access.csv +++ b/sf_base/security/ir.model.access.csv @@ -13,7 +13,7 @@ access_mrs_production_materials,mrs_production_materials,model_mrs_production_ma access_mrs_materials_model,mrs_materials_model,model_mrs_materials_model,base.group_user,1,1,1,1 access_mrs_processing_technology,mrs_processing_technology,model_mrs_processing_technology,base.group_user,1,1,1,1 access_sf_tray,sf_tray,model_sf_tray,base.group_user,1,1,1,1 - +access_sf_model_type,sf_model_type,model_sf_model_type,base.group_user,1,1,1,1 diff --git a/sf_base/views/menu_view.xml b/sf_base/views/menu_view.xml index 42c9602c..4babedb1 100644 --- a/sf_base/views/menu_view.xml +++ b/sf_base/views/menu_view.xml @@ -142,13 +142,13 @@ action="action_mrs_machine_control_system"/> - - - - - - - + diff --git a/sf_base/views/mrp_routing_workcenter_view.xml b/sf_base/views/mrp_routing_workcenter_view.xml new file mode 100644 index 00000000..3712561e --- /dev/null +++ b/sf_base/views/mrp_routing_workcenter_view.xml @@ -0,0 +1,15 @@ + + + + + mrp.routing.workcenter.form.inherit.sf + mrp.routing.workcenter + + + + + + + + + \ No newline at end of file diff --git a/sf_base/views/mrs_base_view.xml b/sf_base/views/mrs_base_view.xml index 1d6aeaf3..10c6a6b6 100644 --- a/sf_base/views/mrs_base_view.xml +++ b/sf_base/views/mrs_base_view.xml @@ -355,11 +355,11 @@
-
- + - + @@ -406,7 +407,7 @@ - + @@ -489,4 +490,65 @@

+ + #------------------模型类型------------------ + + + search.sf.model.type + sf.model.type + + + + + + + + + tree.sf.model.type + sf.model.type + + + + + + + + + form.sf.model.type + sf.model.type + + + + + + + + + + + + + + + + + + + + + + + 模型类型 + ir.actions.act_window + sf.model.type + tree,form + +

+ [模型类型] 还没有哦!点左上角的[创建]按钮,沙发归你了! +

+

+

+
+
\ No newline at end of file diff --git a/sf_base/views/product_template_view.xml b/sf_base/views/product_template_view.xml new file mode 100644 index 00000000..3a8c0955 --- /dev/null +++ b/sf_base/views/product_template_view.xml @@ -0,0 +1,50 @@ + + + + + product.template.form.inherit.sf + product.template + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + product.category.form.inherit.sf + product.category + + + + + + + + + \ No newline at end of file diff --git a/sf_bpm_api/views/sale_order_view.xml b/sf_base/views/sale_order_view.xml similarity index 100% rename from sf_bpm_api/views/sale_order_view.xml rename to sf_base/views/sale_order_view.xml diff --git a/sf_bf_connect/views/sale_process_order_view.xml b/sf_bf_connect/views/sale_process_order_view.xml index 898ade1b..188a2767 100644 --- a/sf_bf_connect/views/sale_process_order_view.xml +++ b/sf_bf_connect/views/sale_process_order_view.xml @@ -1,18 +1,18 @@ - - - sale.order - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sf_bpm_api/__manifest__.py b/sf_bpm_api/__manifest__.py index 51ff2a57..0447a76b 100644 --- a/sf_bpm_api/__manifest__.py +++ b/sf_bpm_api/__manifest__.py @@ -14,10 +14,6 @@ 'data': [ 'security/group_security.xml', 'security/ir.model.access.csv', - 'data/product_data.xml', - 'data/process_data.xml', - 'views/product_template_view.xml', - 'views/sale_order_view.xml' ], 'demo': [ ], diff --git a/sf_bpm_api/models/__init__.py b/sf_bpm_api/models/__init__.py index 0dc63d28..0d9a2937 100644 --- a/sf_bpm_api/models/__init__.py +++ b/sf_bpm_api/models/__init__.py @@ -1,7 +1,5 @@ -from . import sale_order -from . import product_template from . import http from . import models -from . import process + diff --git a/sf_bpm_api/models/process.py b/sf_bpm_api/models/process.py deleted file mode 100644 index 056b824d..00000000 --- a/sf_bpm_api/models/process.py +++ /dev/null @@ -1,11 +0,0 @@ -from odoo import fields, models, api - - -class ResMrpRoutingWorkcenter(models.Model): - _inherit = 'mrp.routing.workcenter' - - code = fields.Char('唯一编码') - is_repeat = fields.Boolean('重复',default=False) - sort = fields.Integer('排序') - - diff --git a/sf_bpm_api/security/ir.model.access.csv b/sf_bpm_api/security/ir.model.access.csv index c36d0d05..08145a00 100644 --- a/sf_bpm_api/security/ir.model.access.csv +++ b/sf_bpm_api/security/ir.model.access.csv @@ -1,2 +1,2 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_sf_model_type,sf_model_type,model_sf_model_type,base.group_user,1,1,1,1 + diff --git a/sf_bpm_api/views/product_template_view.xml b/sf_bpm_api/views/product_template_view.xml deleted file mode 100644 index fea34c5c..00000000 --- a/sf_bpm_api/views/product_template_view.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - product.template.form.inherit.sf - product.template - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - product.category.form.inherit.sf - product.category - - - - - - - - - \ No newline at end of file