合并代码
This commit is contained in:
@@ -8,8 +8,7 @@ import qrcode
|
||||
|
||||
from io import BytesIO
|
||||
from odoo import api, fields, models
|
||||
import barcode
|
||||
from barcode.writer import ImageWriter
|
||||
|
||||
from pystrich.code128 import Code128Encoder
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
@@ -20,7 +19,7 @@ class CNCprocessing(models.Model):
|
||||
_inherit = 'cnc.processing'
|
||||
_description = "CNC加工"
|
||||
|
||||
workorder_id = fields.Many2one('mrp.workorder' ,string="工单")
|
||||
workorder_id = fields.Many2one('mrp.workorder', string="工单")
|
||||
|
||||
|
||||
class Tray(models.Model):
|
||||
@@ -86,21 +85,15 @@ class MrpWorkOrder(models.Model):
|
||||
_inherit = 'mrp.workorder'
|
||||
_description = '工单'
|
||||
|
||||
tray_id = fields.Many2one('sf.tray', string="托盘")
|
||||
tray_code = fields.Char(
|
||||
string='托盘编码',
|
||||
related='tray_id.code')
|
||||
tray_state = fields.Selection(
|
||||
string='托盘状态',
|
||||
related='tray_id.state')
|
||||
|
||||
tray_ids = fields.One2many('sf.tray', 'workorder_id', string='托盘')
|
||||
# def get_tray_info(self):
|
||||
# @api.onchange('X_axis', 'Y_axis', 'Z_axis')
|
||||
# def get_center_point(self):
|
||||
# return 'X:%s,Y:%s,Z:%s' % (self.X_axis, self.Y_axis, self.Z_axis)
|
||||
# 加工面
|
||||
surface = fields.Selection([("前面", "前面"), ("后面", "后面"), ("左面", "左面"), ("右面", "右面"),
|
||||
("上面", "上面")], required=True, default="顶面", string="加工面")
|
||||
("上面", "上面")], string="加工面1")
|
||||
|
||||
material_center_point = fields.Char(string='配料中心点')
|
||||
X1_axis = fields.Float(string='Lx1', default=0)
|
||||
Y1_axis = fields.Float(string='Ly1', default=0)
|
||||
@@ -178,7 +171,8 @@ class MrpWorkOrder(models.Model):
|
||||
|
||||
test_results = fields.Selection([("合格", "合格"), ("返工", "返工"), ("报废", "报废")], string="检测结果")
|
||||
|
||||
cnc_ids = fields.One2many("cnc.processing",'workorder_id', string="CNC加工")
|
||||
cnc_ids = fields.One2many("cnc.processing", 'workorder_id', string="CNC加工")
|
||||
|
||||
# @api.depends('tray_id')
|
||||
# def updateTrayState(self):
|
||||
#
|
||||
@@ -193,6 +187,11 @@ class MrpWorkOrder(models.Model):
|
||||
# 'state': "占用",
|
||||
# }
|
||||
# )
|
||||
def recreateManufacturing(self):
|
||||
return ""
|
||||
|
||||
def recreateWorkerOrder(self):
|
||||
return ""
|
||||
|
||||
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user