合并代码
This commit is contained in:
@@ -7,7 +7,7 @@ import math
|
||||
|
||||
|
||||
from io import BytesIO
|
||||
from odoo import api, fields, models
|
||||
from odoo import api, fields, models,SUPERUSER_ID
|
||||
from pystrich.code128 import Code128Encoder
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ class MrpWorkOrder(models.Model):
|
||||
_inherit = 'mrp.workorder'
|
||||
_description = '工单'
|
||||
|
||||
cnc_id = fields.Many2many('ir.attachment', 'cnc_attachment', string="cnc程序获取")
|
||||
|
||||
tray_ids = fields.One2many('sf.tray', 'workorder_id', string='托盘')
|
||||
# def get_tray_info(self):
|
||||
# @api.onchange('X_axis', 'Y_axis', 'Z_axis')
|
||||
@@ -191,11 +191,21 @@ class MrpWorkOrder(models.Model):
|
||||
# }
|
||||
# )
|
||||
def recreateManufacturing(self):
|
||||
|
||||
|
||||
# productions = self.env['mrp.production'].with_user(SUPERUSER_ID).sudo().with_company(self.company_id).create(self.production_id)
|
||||
# print(productions)
|
||||
return ""
|
||||
|
||||
def recreateWorkerOrder(self):
|
||||
self.env['stock.move'].sudo().create(self.production_id._get_moves_raw_values())
|
||||
self.env['stock.move'].sudo().create(self.production_id._get_moves_finished_values())
|
||||
self.production_id._create_workorder()
|
||||
return ""
|
||||
|
||||
cnc_id = fields.Many2many('ir.attachment', 'cnc_attachment', string="cnc程序获取")
|
||||
def fetchCNC(self):
|
||||
return ""
|
||||
|
||||
'''
|
||||
制造订单绑定托盘信息
|
||||
|
||||
Reference in New Issue
Block a user