shelf.location.kanban
+
sf.shelf.location
+
+
+
+
+
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- shelf.location.search
- sf.shelf.location
-
-
-
-
-
-
-
-
-
-
+
+
+ shelf.location.search
+ sf.shelf.location
+
+
+
+
+
+
+
+
+
+
-
- 货架货位
- ir.actions.act_window
- sf.shelf.location
- kanban,form
- [('location_type', '=', '货位')]
-
+
+ 货架货位
+ ir.actions.act_window
+ sf.shelf.location
+ kanban,form
+ [('location_type', '=', '货位'),('check_state','=','enable')]
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
- 货架货位
- ir.actions.act_window
- sf.shelf.location
- tree,form
-
+
+ 货架货位
+ ir.actions.act_window
+ sf.shelf.location
+ tree,form
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
+
-
+
diff --git a/sf_warehouse/views/view.xml b/sf_warehouse/views/view.xml
index 87a82651..e4a2ea85 100644
--- a/sf_warehouse/views/view.xml
+++ b/sf_warehouse/views/view.xml
@@ -1,16 +1,7 @@
-
-
-
-
-
-
-
-
-
-
+
stock.location.form.sf.inherit
@@ -184,6 +175,18 @@
+
+ stock.location.tree.sf.inherit
+ stock.location
+
+
+
+
+
+
+
+
stock.warehouse.form.sf.inherit
@@ -203,6 +206,18 @@
+
+ stock.warehouse.tree.sf.inherit
+ stock.warehouse
+
+
+
+
+
+
+
+
@@ -223,6 +238,18 @@
+
+ stock.route.tree.sf.inherit
+ stock.route
+
+
+
+
+
+
+
+
stock.rule.form.sf.inherit
@@ -242,6 +269,18 @@
+
+ stock.rule.tree.sf.inherit
+ stock.rule
+
+
+
+
+
+
+
+
stock.picking.type.form.sf.inherit
@@ -261,8 +300,20 @@
+
+ stock.picking.type.tree.sf.inherit
+ stock.picking.type
+
+
+
+
+
+
+
-
+
+
product.category.form.sf.inherit
product.category
@@ -280,5 +331,168 @@
+
+
+ product.category.tree.sf.inherit
+ product.category
+
+
+
+
+
+
+
+
+
+
+ uom.category.form.sf.inherit
+ uom.category
+
+
+
+
+
+
+
+
+
+
+ uom.category.tree.sf.inherit
+ uom.category
+
+
+
+
+
+
+
+
+
+
+ barcode.nomenclature.form.sf.inherit
+ barcode.nomenclature
+
+
+
+
+
+
+
+
+
+
+ barcode.nomenclature.tree.sf.inherit
+ barcode.nomenclature
+
+
+
+
+
+
+
+
+
+
+
+ stock.putaway.rule.tree.sf.inherit
+ stock.putaway.rule
+
+
+
+
+
+
+
+
+
+
+
+
+ stock.warehouse.orderpoint.tree.sf.inherit
+ stock.warehouse.orderpoint
+
+
+
+
+
+
+
+
+
+
+
+
+
+ stock.quant.tree.sf.inherit
+ stock.quant
+
+
+
+
+
+
+
+
+
+
+
+
+ stock.scrap.form.sf.inherit
+ stock.scrap
+
+
+
+
+
+
+
+
+
+
+ stock.scrap.tree.sf.inherit
+ stock.scrap
+
+
+
+
+
+
+
+
+
From bd01ad7bbf9aae73e79c53ac192c60898bd1f3c9 Mon Sep 17 00:00:00 2001
From: mgw <1392924357@qq.com>
Date: Fri, 8 Dec 2023 17:25:40 +0800
Subject: [PATCH 05/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90?=
=?UTF-8?q?=E4=BE=9D=E8=B5=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_quality/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sf_quality/__manifest__.py b/sf_quality/__manifest__.py
index c41e1a24..7f50a93d 100644
--- a/sf_quality/__manifest__.py
+++ b/sf_quality/__manifest__.py
@@ -13,7 +13,7 @@
'author': 'jikimo',
'website': 'https://sf.cs.jikimo.com',
# 此处依赖sf_manufacturing是因为我要重写其中的一个字段operation_id的string,故需要sf_manufacturing先安装
- 'depends': ['quality_control'],
+ 'depends': ['quality_control', 'sf_maintenance'],
'data': [
'security/ir.model.access.csv',
'views/view.xml'
From f8426ae4c3a896951617bbf370afca20bc702ed6 Mon Sep 17 00:00:00 2001
From: yuxianghui <3437689193@qq.com>
Date: Fri, 8 Dec 2023 17:29:32 +0800
Subject: [PATCH 06/11] =?UTF-8?q?1=E3=80=81=E9=87=8D=E6=9E=84CAM=E5=B7=A5?=
=?UTF-8?q?=E5=8D=95=E7=A8=8B=E5=BA=8F=E7=94=A8=E5=88=80=E8=AE=A1=E5=88=92?=
=?UTF-8?q?=E6=A8=A1=E5=9E=8B=EF=BC=9B2=E3=80=81=E6=9C=BA=E5=BA=8A?=
=?UTF-8?q?=E6=8D=A2=E5=88=80=E7=94=B3=E8=AF=B7=E6=A8=A1=E5=9E=8B=E7=9A=84?=
=?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=8D=A2=E5=88=80=E3=80=81=E8=BD=AC=E7=A7=BB?=
=?UTF-8?q?=E6=8C=89=E9=94=AE=E5=A2=9E=E5=8A=A0=E6=98=BE=E7=A4=BA=E6=9D=A1?=
=?UTF-8?q?=E4=BB=B6=EF=BC=8C=E5=85=B3=E9=97=AD=E6=8D=A2=E5=88=80=E7=94=B3?=
=?UTF-8?q?=E8=AF=B7=E5=BC=B9=E7=AA=97=E5=92=8C=E5=8A=9F=E8=83=BD=E5=88=80?=
=?UTF-8?q?=E5=85=B7=E7=BB=84=E8=A3=85=E5=BC=B9=E7=AA=97=E7=9A=84=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E5=88=80=E5=85=B7=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B5?=
=?UTF-8?q?=E5=88=9B=E5=BB=BA=E8=AE=B0=E5=BD=95=E7=9A=84=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_tool_management/__init__.py | 17 +++
sf_tool_management/data/tool_data.xml | 8 ++
sf_tool_management/models/__init__.py | 1 +
sf_tool_management/models/base.py | 61 +++++----
sf_tool_management/views/tool_base_views.xml | 124 ++++++++++---------
sf_tool_management/wizard/wizard_view.xml | 6 +-
6 files changed, 130 insertions(+), 87 deletions(-)
create mode 100644 sf_tool_management/data/tool_data.xml
diff --git a/sf_tool_management/__init__.py b/sf_tool_management/__init__.py
index c9ba0265..bb4c0be1 100644
--- a/sf_tool_management/__init__.py
+++ b/sf_tool_management/__init__.py
@@ -1,3 +1,20 @@
# -*-coding:utf-8-*-
from . import models
from . import wizard
+
+# from odoo import api, SUPERUSER_ID
+# import logging
+# _logger = logging.getLogger(__name__)
+#
+#
+# def _sf_tool_management_post_install(cr, registry):
+# # 这里执行你想要在安装模块时执行的操作,包括调用和执行模型的方法
+# env = api.Environment(cr, SUPERUSER_ID, {})
+#
+# # 获取需要执行方法的模型
+# model_obj = env['sf.machine.table.tool.changing.apply']
+# logging.info('post_install方法执行了')
+# print('post_install方法执行了')
+#
+# # 调用模型方法
+# model_obj.create_tool_change_application()
diff --git a/sf_tool_management/data/tool_data.xml b/sf_tool_management/data/tool_data.xml
new file mode 100644
index 00000000..714d03ee
--- /dev/null
+++ b/sf_tool_management/data/tool_data.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sf_tool_management/models/__init__.py b/sf_tool_management/models/__init__.py
index 88279b79..c942dcac 100644
--- a/sf_tool_management/models/__init__.py
+++ b/sf_tool_management/models/__init__.py
@@ -1,3 +1,4 @@
from . import base
from . import tool_material_search
from . import maintenance_equipment
+
diff --git a/sf_tool_management/models/base.py b/sf_tool_management/models/base.py
index cb057cb5..71cb41f5 100644
--- a/sf_tool_management/models/base.py
+++ b/sf_tool_management/models/base.py
@@ -476,6 +476,9 @@ class MachineTableToolChangingApply(models.Model):
self.env['sf.machine.table.tool.changing.apply'].search(
[('name', '=', self.name.id)]).write({'status': '0'})
+ def create_tool_change_application(self):
+ print("调用了create_tool_change_application()")
+
class CAMWorkOrderProgramKnifePlan(models.Model):
_name = 'sf.cam.work.order.program.knife.plan'
@@ -484,39 +487,49 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
name = fields.Char(string='工单任务编号', readonly=False)
cam_procedure_code = fields.Char(string='CAM程序编号', readonly=False)
cam_cutter_spacing_code = fields.Char(string='CAM刀位号', readonly=False)
+ tool_position_interface_type = fields.Selection(
+ [('BT刀柄式', 'BT刀柄式'), ('SK刀柄式', 'SK刀柄式'), ('HSK刀柄式', 'HSK刀柄式'),
+ ('CAT刀柄式', 'CAT刀柄式'), ('ISO刀盘式', 'ISO刀盘式'), ('DIN刀盘式', 'DIN刀盘式'),
+ ('直装固定式', '直装固定式')], string='刀位接口型号')
+ production_line_id = fields.Many2one('sf.production.line', string='生产线', readonly=False,
+ group_expand='_read_group_names')
+ machine_table_name_id = fields.Many2one('maintenance.equipment', string='机床名称', readonly=False,
+ domain="[('production_line_id', '=', production_line_id)]")
+ machine_table_name = fields.Char(string='机台号', readonly=True, related='machine_table_name_id.name')
+ cutter_spacing_code_id = fields.Many2one('maintenance.equipment.tool', string='刀位号', required=True,
+ domain="[('equipment_id', '=', machine_table_name_id)]")
+ whether_standard_knife = fields.Boolean(string='是否标准刀', default=True)
+ need_knife_time = fields.Datetime(string='用刀时间', readonly=False)
+ applicant = fields.Char(string='申请人', readonly=True)
+ applicant_time = fields.Datetime(string='申请时间', readonly=True)
+ reason_for_applying = fields.Char(string='申请原因', readonly=False)
+
barcode_id = fields.Many2one('stock.lot', string='功能刀具序列号',
domain=[('product_id.name', '=', '功能刀具')])
- functional_tool_name_id = fields.Many2one('product.product', string='功能刀具名称',
- domain=[('name', '=', '功能刀具')])
+ functional_tool_name = fields.Char(string='功能刀具名称', required=True)
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=False)
- machine_table_name_id = fields.Many2one('maintenance.equipment', string='机床名称', readonly=False,
- group_expand='_read_group_machine_table_name_ids')
+ diameter = fields.Integer(string='刀具直径(mm)', readonly=False)
+ tool_included_angle = fields.Float(string='刀尖R角(mm)', readonly=False)
+ tool_loading_length = fields.Float(string='装刀长(mm)', readonly=False)
+ extension_length = fields.Float(string='伸出长(mm)')
+ effective_length = fields.Float(string='有效长(mm)')
+ new_former = fields.Selection([('0', '新'), ('1', '旧')], string='新/旧', readonly=False, default='0')
+ coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')], default='3',
+ string='粗/中/精', readonly=False)
+ L_D = fields.Float(string='L/D值', readonly=False)
+ clearance_length = fields.Float(string='避空长(mm)', readonly=False)
+ required_cutting_time = fields.Integer(string='需切削时长', readonly=False)
- @api.model
- def _read_group_machine_table_name_ids(self, categories, domain, order):
- machine_table_name_ids = categories._search([], order=order, access_rights_uid=SUPERUSER_ID)
- return categories.browse(machine_table_name_ids)
-
- machine_tool_cutter_spacing_code = fields.Char(string='机床刀位号', readonly=False)
- diameter = fields.Char(string='直径(程式)(mm)', readonly=False)
- tool_loading_length = fields.Char(string='装刀长(mm)', readonly=False)
- clearance_length = fields.Char(string='避空长(mm)', readonly=False)
- tool_included_angle = fields.Char(string='刀尖角(R角)', readonly=False)
- L_D = fields.Char(string='L/D', readonly=False)
- coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=False,
- default='2')
- required_cutting_time = fields.Char(string='需切削时长', readonly=False)
- whether_standard_tool = fields.Selection([('1', '是'), ('0', '否')], string='是否标准刀', readonly=False,
- default='1')
- need_knife_time = fields.Datetime(string='需要用刀时间', readonly=False)
plan_execute_status = fields.Selection([('0', '待下发'), ('1', '执行中'), ('2', '已完成')],
string='计划执行状态', default='0', readonly=False)
- applicant = fields.Char(string='申请人', readonly=True)
- reason_for_applying = fields.Char(string='申请原因', readonly=False)
- remark = fields.Char(string='备注说明', readonly=False)
sf_functional_tool_assembly_id = fields.Many2one('sf.functional.tool.assembly', '功能刀具组装', readonly=True)
+ @api.model
+ def _read_group_names(self, categories, domain, order):
+ names = categories._search([], order=order, access_rights_uid=SUPERUSER_ID)
+ return categories.browse(names)
+
def apply_for_tooling(self):
"""
申请装刀
diff --git a/sf_tool_management/views/tool_base_views.xml b/sf_tool_management/views/tool_base_views.xml
index eb0cd379..3227b185 100644
--- a/sf_tool_management/views/tool_base_views.xml
+++ b/sf_tool_management/views/tool_base_views.xml
@@ -347,11 +347,13 @@
-
-
@@ -531,7 +533,7 @@
'default_replacement_extension_length': extension_length,
'default_replacement_effective_length': effective_length,
}"
- attrs="{'invisible': [('status', '!=', '0')]}"
+ attrs="{'invisible': ['|',('status', '!=', '0'), ('functional_tool_name_id', '=', False)]}"
class="btn-primary"
/>
@@ -605,7 +607,7 @@
'default_replacement_extension_length': extension_length,
'default_replacement_effective_length': effective_length,
}"
- attrs="{'invisible': [('status', '!=', '0')]}"
+ attrs="{'invisible': ['|',('status', '!=', '0'), ('functional_tool_name_id', '=', False)]}"
class="btn-primary"
/>
+ attrs="{'invisible': ['|',('status', '!=', '0'),('functional_tool_name_id', '=', False)]}"/>