From 33adc646e201b21f3b228eea2fe809ace20fc191 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Wed, 19 Oct 2022 15:46:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=B7=A5=E5=8E=82-=E5=88=B6?= =?UTF-8?q?=E9=80=A0=E6=A8=A1=E5=9D=97=E5=9F=BA=E7=A1=80=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=98=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_base/models/sf_common.py | 13 ++- sf_base/security/ir.model.access.csv | 2 + sf_base/views/menu_view.xml | 18 ++-- sf_base/views/mrs_common_view.xml | 126 ++++++++++++--------------- 4 files changed, 75 insertions(+), 84 deletions(-) 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