diff --git a/sf_base/models/sf_common.py b/sf_base/models/sf_common.py index 95dd6595..0d86e593 100644 --- a/sf_base/models/sf_common.py +++ b/sf_base/models/sf_common.py @@ -68,6 +68,13 @@ class MrsProcessingOrder(models.Model): production_process_id = fields.Many2one('mrs.production.process', string="表面工艺") -class ProductTemplate(models.Model): - _inherit = 'product.template' - _description = '产品' +class Tray(models.Model): + _name = 'sf.tray' + _description = '托盘' + + code = fields.Char('编码') + name = fields.Char('名称') + state = fields.Selection( + [("空闲", "空闲"), ("占用", "占用"), ("报损", "报损")], + default=" ", string="状态") + active = fields.Boolean('有效', default=True) diff --git a/sf_base/security/ir.model.access.csv b/sf_base/security/ir.model.access.csv index b1493707..5b4aa249 100644 --- a/sf_base/security/ir.model.access.csv +++ b/sf_base/security/ir.model.access.csv @@ -12,6 +12,8 @@ access_mrs_production_process,mrs_production_process,model_mrs_production_proces access_mrs_production_materials,mrs_production_materials,model_mrs_production_materials,base.group_user,1,1,1,1 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 + diff --git a/sf_base/views/menu_view.xml b/sf_base/views/menu_view.xml index 66550d05..42c9602c 100644 --- a/sf_base/views/menu_view.xml +++ b/sf_base/views/menu_view.xml @@ -23,6 +23,14 @@ action="action_mrs_machine_tool" /> + + + - - - - - - - - - - - - - - - - - + #------------------托盘------------------ + + sf.tray.search + sf.tray + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + sf.tray.tree + sf.tray + + + + + + + + + + sf.tray.form + sf.tray + +
+ + + + + + + + + +
+
+
+ + 托盘 + ir.actions.act_window + sf.tray + tree,form + +

+ 创建托盘吧 +

+
+
\ No newline at end of file