优化消息模版
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
'category': '工厂设备',
|
||||
'description': """
|
||||
""",
|
||||
'depends': ['hr_maintenance', 'sf_base', 'sf_message'],
|
||||
'depends': ['hr_maintenance', 'sf_base'],
|
||||
'data': [
|
||||
'security/group_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
|
||||
@@ -33,7 +33,7 @@ class SfMaintenanceEquipmentAGVLog(models.Model):
|
||||
|
||||
|
||||
class SfMaintenanceEquipment(models.Model):
|
||||
_inherit = ['maintenance.equipment', 'sf.message.template']
|
||||
_inherit = ['maintenance.equipment']
|
||||
_description = '设备'
|
||||
|
||||
crea_url = "/api/machine_tool/create"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
""",
|
||||
'category': 'sf',
|
||||
'website': 'https://www.sf.jikimo.com',
|
||||
'depends': ['sf_base', 'sf_maintenance', 'web_widget_model_viewer', 'sf_warehouse','sf_message'],
|
||||
'depends': ['sf_base', 'sf_maintenance', 'web_widget_model_viewer', 'sf_warehouse'],
|
||||
'data': [
|
||||
'data/stock_data.xml',
|
||||
'data/empty_racks_data.xml',
|
||||
|
||||
@@ -18,7 +18,7 @@ from odoo.addons.sf_mrs_connect.models.ftp_operate import FtpController
|
||||
|
||||
|
||||
class ResMrpWorkOrder(models.Model):
|
||||
_inherit = ['mrp.workorder', 'sf.message.template']
|
||||
_inherit = ['mrp.workorder']
|
||||
_order = 'sequence asc'
|
||||
|
||||
product_tmpl_name = fields.Char('坯料产品名称', related='production_bom_id.bom_line_ids.product_id.name')
|
||||
|
||||
@@ -9,8 +9,8 @@ from odoo.exceptions import ValidationError, UserError
|
||||
from odoo.modules import get_resource_path
|
||||
|
||||
|
||||
# from OCC.Extend.DataExchange import read_step_file
|
||||
# from OCC.Extend.DataExchange import write_stl_file
|
||||
from OCC.Extend.DataExchange import read_step_file
|
||||
from OCC.Extend.DataExchange import write_stl_file
|
||||
|
||||
|
||||
class ResProductMo(models.Model):
|
||||
|
||||
@@ -545,7 +545,7 @@ class ProductionLot(models.Model):
|
||||
|
||||
|
||||
class StockPicking(models.Model):
|
||||
_inherit = ['stock.picking', 'sf.message.template']
|
||||
_inherit = ['stock.picking']
|
||||
|
||||
surface_technics_parameters_id = fields.Many2one('sf.production.process.parameter', string="表面工艺可选参数")
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
""",
|
||||
'category': 'sf',
|
||||
'website': 'https://www.sf.jikimo.com',
|
||||
'depends': ['base', 'sf_base'],
|
||||
'depends': ['base', 'sf_plan'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/sf_message_template_view.xml',
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
from . import sf_message_template
|
||||
from . import sf_message_sale
|
||||
from . import sf_message_plan
|
||||
from . import sf_message_stock_picking
|
||||
from . import sf_message_cam_program
|
||||
from . import sf_message_functional_tool_assembly
|
||||
from . import sf_message_purchase
|
||||
from . import sf_message_workorder
|
||||
|
||||
6
sf_message/models/sf_message_cam_program.py
Normal file
6
sf_message/models/sf_message_cam_program.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class SFMessageCamProgram(models.Model):
|
||||
_name = 'sf.cam.work.order.program.knife.plan'
|
||||
_inherit = ['sf.cam.work.order.program.knife.plan', 'sf.message.template']
|
||||
6
sf_message/models/sf_message_functional_tool_assembly.py
Normal file
6
sf_message/models/sf_message_functional_tool_assembly.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class SFMessagefunctionalToolAssembly(models.Model):
|
||||
_name = 'sf.functional.tool.assembly'
|
||||
_inherit = ['sf.functional.tool.assembly', 'sf.message.template']
|
||||
6
sf_message/models/sf_message_plan.py
Normal file
6
sf_message/models/sf_message_plan.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class SFMessagePlan(models.Model):
|
||||
_name = 'sf.production.plan'
|
||||
_inherit = ['sf.production.plan', 'sf.message.template']
|
||||
6
sf_message/models/sf_message_purchase.py
Normal file
6
sf_message/models/sf_message_purchase.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class SFMessagePurchase(models.Model):
|
||||
_name = 'purchase.order'
|
||||
_inherit = ['purchase.order', 'sf.message.template']
|
||||
6
sf_message/models/sf_message_sale.py
Normal file
6
sf_message/models/sf_message_sale.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class SFMessageSale(models.Model):
|
||||
_name = 'sale.order'
|
||||
_inherit = ['sale.order', 'sf.message.template']
|
||||
6
sf_message/models/sf_message_stock_picking.py
Normal file
6
sf_message/models/sf_message_stock_picking.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class SFMessageStockPicking(models.Model):
|
||||
_name = 'stock.picking'
|
||||
_inherit = ['stock.picking', 'sf.message.template']
|
||||
@@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import models, fields, api
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
||||
class SfMessageTemplate(models.Model):
|
||||
@@ -47,3 +48,8 @@ class SfMessageTemplate(models.Model):
|
||||
if self.notification_department_id:
|
||||
self.notification_employee_ids = False
|
||||
|
||||
@abstractmethod
|
||||
def dispatch(self, args):
|
||||
"""
|
||||
强迫继承该类必走该抽象方法'
|
||||
"""
|
||||
|
||||
6
sf_message/models/sf_message_workorder.py
Normal file
6
sf_message/models/sf_message_workorder.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class SFMessageWork(models.Model):
|
||||
_name = 'mrp.workorder'
|
||||
_inherit = ['mrp.workorder', 'sf.message.template']
|
||||
@@ -11,7 +11,7 @@ from odoo.exceptions import UserError, ValidationError
|
||||
class sf_production_plan(models.Model):
|
||||
_name = 'sf.production.plan'
|
||||
_description = 'sf_production_plan'
|
||||
_inherit = ['mail.thread', 'sf.message.template']
|
||||
_inherit = ['mail.thread']
|
||||
# _order = 'state desc, write_date desc'
|
||||
|
||||
state = fields.Selection([
|
||||
|
||||
@@ -8,8 +8,8 @@ from datetime import datetime
|
||||
import requests
|
||||
from odoo import http
|
||||
from odoo.http import request
|
||||
# from OCC.Extend.DataExchange import read_step_file
|
||||
# from OCC.Extend.DataExchange import write_stl_file
|
||||
from OCC.Extend.DataExchange import read_step_file
|
||||
from OCC.Extend.DataExchange import write_stl_file
|
||||
from odoo import models, fields, api
|
||||
from odoo.modules import get_resource_path
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
|
||||
@@ -6,8 +6,8 @@ import os
|
||||
from datetime import datetime
|
||||
from stl import mesh
|
||||
# from OCC.Core.GProp import GProp_GProps
|
||||
# from OCC.Extend.DataExchange import read_step_file
|
||||
# from OCC.Extend.DataExchange import write_stl_file
|
||||
from OCC.Extend.DataExchange import read_step_file
|
||||
from OCC.Extend.DataExchange import write_stl_file
|
||||
from odoo.addons.sf_base.commons.common import Common
|
||||
from odoo import models, fields, api
|
||||
from odoo.modules import get_resource_path
|
||||
|
||||
@@ -11,7 +11,7 @@ READONLY_FIELD_STATES = {
|
||||
|
||||
|
||||
class ReSaleOrder(models.Model):
|
||||
_inherit = ['sale.order', 'sf.message.template']
|
||||
_inherit = 'sale.order'
|
||||
|
||||
mrp_production_count = fields.Integer(
|
||||
"Count of MO generated",
|
||||
@@ -183,7 +183,7 @@ class ProductTemplate(models.Model):
|
||||
|
||||
|
||||
class RePurchaseOrder(models.Model):
|
||||
_inherit = ['purchase.order','sf.message.template']
|
||||
_inherit = 'purchase.order'
|
||||
|
||||
mrp_production_count = fields.Integer(
|
||||
"Count of MO Source",
|
||||
|
||||
@@ -181,7 +181,7 @@ class MachineTableToolChangingApply(models.Model):
|
||||
|
||||
class CAMWorkOrderProgramKnifePlan(models.Model):
|
||||
_name = 'sf.cam.work.order.program.knife.plan'
|
||||
_inherit = ['mail.thread', 'sf.message.template']
|
||||
_inherit = ['mail.thread']
|
||||
_description = 'CAM工单程序用刀计划'
|
||||
|
||||
name = fields.Char('工单任务编号')
|
||||
@@ -349,7 +349,7 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
|
||||
|
||||
class FunctionalToolAssembly(models.Model):
|
||||
_name = 'sf.functional.tool.assembly'
|
||||
_inherit = ['mail.thread', 'barcodes.barcode_events_mixin', 'sf.message.template']
|
||||
_inherit = ['mail.thread', 'barcodes.barcode_events_mixin']
|
||||
_description = '功能刀具组装'
|
||||
_order = 'tool_loading_time desc, use_tool_time asc'
|
||||
|
||||
@@ -1143,7 +1143,7 @@ class FunctionalToolAssembly(models.Model):
|
||||
|
||||
class FunctionalToolDismantle(models.Model):
|
||||
_name = 'sf.functional.tool.dismantle'
|
||||
_inherit = ["barcodes.barcode_events_mixin", 'mail.thread', 'sf.message.template']
|
||||
_inherit = ["barcodes.barcode_events_mixin", 'mail.thread']
|
||||
_description = '功能刀具拆解'
|
||||
|
||||
def on_barcode_scanned(self, barcode):
|
||||
|
||||
Reference in New Issue
Block a user