初次提交,智能工厂基础数据
This commit is contained in:
73
sf_mrs_sync/models/sf_sync_common.py
Normal file
73
sf_mrs_sync/models/sf_sync_common.py
Normal file
@@ -0,0 +1,73 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import logging
|
||||
import math
|
||||
import requests
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from datetime import timedelta, datetime
|
||||
|
||||
from odoo import models, fields, api
|
||||
from odoo.exceptions import ValidationError
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class MrsProductionMaterials(models.Model):
|
||||
_inherit = "mrs.production.materials"
|
||||
_description = "材料"
|
||||
url = '/api/production_materials/list'
|
||||
|
||||
def sync_production_materials(self):
|
||||
str = '定时同步材料资源库'
|
||||
print(str)
|
||||
return str
|
||||
|
||||
|
||||
class MrsMaterialModel(models.Model):
|
||||
_inherit = 'mrs.materials.model'
|
||||
_description = '材料型号'
|
||||
|
||||
|
||||
class MrsProductionProcess(models.Model):
|
||||
_inherit = 'mrs.production.process'
|
||||
_description = '表面工艺'
|
||||
|
||||
|
||||
class MrsProcessingTechnology(models.Model):
|
||||
_inherit = 'mrs.processing.technology'
|
||||
_description = '加工工艺'
|
||||
|
||||
|
||||
class MachineBrandTags(models.Model):
|
||||
_inherit = 'mrs.machine.brand.tags'
|
||||
_description = '标签'
|
||||
|
||||
|
||||
class MachineControlSystem(models.Model):
|
||||
_inherit = 'mrs.machine_tool.type.control_system'
|
||||
_description = '控制系统'
|
||||
|
||||
|
||||
class MachineBrand(models.Model):
|
||||
_inherit = 'mrs.machine.brand'
|
||||
_description = '品牌'
|
||||
|
||||
|
||||
class MachineTool(models.Model):
|
||||
_inherit = 'mrs.machine_tool'
|
||||
_description = '机床'
|
||||
|
||||
|
||||
class MachineToolType(models.Model):
|
||||
_inherit = 'mrs.machine_tool.type'
|
||||
_description = '机床型号'
|
||||
|
||||
|
||||
class CuttingTool(models.Model):
|
||||
_inherit = 'mrs.cutting_tool.category'
|
||||
_description = '刀具类别'
|
||||
|
||||
|
||||
class CuttingToolType(models.Model):
|
||||
_inherit = 'mrs.cutting_tool.type'
|
||||
_description = '刀具型号'
|
||||
Reference in New Issue
Block a user