diff --git a/sf_base/models/common.py b/sf_base/models/common.py index 814dabb7..a6aaf0f8 100644 --- a/sf_base/models/common.py +++ b/sf_base/models/common.py @@ -127,19 +127,6 @@ class MrsProcessingOrder(models.Model): index=True, string='加工工艺') production_process_id = fields.Many2one('sf.production.process', string="表面工艺") - -# class Tray(models.Model): -# _name = 'sf.tray' -# _description = '托盘' -# -# code = fields.Char('编码', copy=False) -# name = fields.Char('名称') -# state = fields.Selection( -# [("空闲", "空闲"), ("占用", "占用"), ("报损", "报损")], -# default="空闲", string="状态") -# active = fields.Boolean('有效', default=True) - - class SupplierSort(models.Model): _name = 'sf.supplier.sort' _description = '供应商排序' diff --git a/sf_base/views/common_view.xml b/sf_base/views/common_view.xml index f0ff3a07..b079beda 100644 --- a/sf_base/views/common_view.xml +++ b/sf_base/views/common_view.xml @@ -361,26 +361,5 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sf_maintenance/models/sf_maintenance.py b/sf_maintenance/models/sf_maintenance.py index 10a3ce26..2b15ebad 100644 --- a/sf_maintenance/models/sf_maintenance.py +++ b/sf_maintenance/models/sf_maintenance.py @@ -14,7 +14,7 @@ class SfMaintenanceEquipmentCategory(models.Model): _inherit = 'maintenance.equipment.category' _description = '设备类别' - equipment_type = fields.Selection([('机床', '机床')], string='类型', default='机床') + equipment_type = fields.Selection([('机床', '机床'), ('机械臂', '机械臂'), ('AGV小车', 'AGV小车'), ('检测设备', '检测设备')], string='类型', default='机床') class SfMaintenanceEquipment(models.Model): diff --git a/sf_manufacturing/__manifest__.py b/sf_manufacturing/__manifest__.py index b7fa686a..37b5fd79 100644 --- a/sf_manufacturing/__manifest__.py +++ b/sf_manufacturing/__manifest__.py @@ -16,14 +16,12 @@ 'security/group_security.xml', 'security/ir.model.access.csv', 'views/mrp_production_addional_change.xml', - # 'report/tray_report.xml', # 'views/mrp_maintenance_views.xml', 'views/mrp_routing_workcenter_view.xml', 'views/mrp_workcenter_views.xml', 'views/mrp_workorder_view.xml', 'views/production_line_view.xml', 'views/tool_other_features_view.xml', - # 'views/tray_view.xml', 'views/model_type_view.xml', # 'views/kanban_change.xml' diff --git a/sf_manufacturing/models/__init__.py b/sf_manufacturing/models/__init__.py index 96accf78..c560211b 100644 --- a/sf_manufacturing/models/__init__.py +++ b/sf_manufacturing/models/__init__.py @@ -1,4 +1,3 @@ -from . import tray from . import model_type from . import product_template from . import mrp_production diff --git a/sf_manufacturing/models/tray.py b/sf_manufacturing/models/tray.py deleted file mode 100644 index de1a639b..00000000 --- a/sf_manufacturing/models/tray.py +++ /dev/null @@ -1,60 +0,0 @@ -# # -*- coding: utf-8 -*- -# # Part of SmartGo. See LICENSE file for full copyright and licensing details. -# import base64 -# from io import BytesIO -# from odoo import api, fields, models -# #from pystrich.code128 import Code128Encoder -# -# -# class Tray(models.Model): -# _inherit = 'sf.tray' -# _description = '托盘' -# qr_image = fields.Binary(string="托盘二维码", compute='compute_qr_image') -# production_id = fields.Many2one('mrp.production', string='制造订单', -# related='workorder_id.production_id' -# ) -# workorder_id = fields.Many2one('mrp.workorder', string="工单" -# ) -# -# @api.onchange('production_id') -# def updateTrayState(self): -# if self.workorder_id != False and self.create_date != False: -# -# self.state = '占用' -# else: -# self.state = '空闲' -# -# #解绑托盘 -# def unclamp(self): -# self.workorder_id = False -# self.production_id = False -# self.state = '空闲' -# -# @api.depends('code') -# def compute_qr_image(self): -# for item in self: -# if not item.code: -# item.qr_image = False -# continue -# # 根据code动态生成二维码图片 -# # qr = qrcode.QRCode( -# # version=1, -# # error_correction=qrcode.constants.ERROR_CORRECT_L, -# # box_size=10, -# # border=4, -# # ) -# # qr.add_data(item.code) -# # qr.make(fit=True) -# # img = qr.make_image() -# # 生成条形码文件 -# # bar = barcode.get("ean13", "123456789102", writer=ImageWriter()) -# # a = bar.get_fullcode() -# # b = bar.save('occ') -# # 生成条形码图片 -# partner_encoder = Code128Encoder(item.code) -# # 转换bytes流 -# temp = BytesIO() -# partner_encoder.save(temp) -# # img.save(temp, format='PNG') -# qr_image = base64.b64encode(temp.getvalue()) -# item.qr_image = qr_image diff --git a/sf_manufacturing/report/tray_report.xml b/sf_manufacturing/report/tray_report.xml deleted file mode 100644 index a096ad63..00000000 --- a/sf_manufacturing/report/tray_report.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - Dymo Label Sheet - - custom - 100 - 60 - Landscape - 0 - 0 - 0 - 0 - - 96 - - - - - 打印条形码 - sf.tray - qweb-pdf - sf_manufacturing.sf_tray_template - sf_manufacturing.sf_tray_template - - report - - - - - - - - - 打印产品信息 - mrp.workorder - qweb-pdf - sf_manufacturing.sf_tray_template1 - sf_manufacturing.sf_tray_template1 - - report - - - - - - - diff --git a/sf_manufacturing/views/tray_view.xml b/sf_manufacturing/views/tray_view.xml deleted file mode 100644 index 33b8db9a..00000000 --- a/sf_manufacturing/views/tray_view.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file