Merge branch 'feature/工单优化-1' into feature/工单优化-2
This commit is contained in:
@@ -1253,6 +1253,7 @@ class SfWorkOrderBarcodes(models.Model):
|
|||||||
_inherit = ["mrp.workorder", "barcodes.barcode_events_mixin"]
|
_inherit = ["mrp.workorder", "barcodes.barcode_events_mixin"]
|
||||||
|
|
||||||
def on_barcode_scanned(self, barcode):
|
def on_barcode_scanned(self, barcode):
|
||||||
|
logging.info('Rfid:%s' % barcode)
|
||||||
workorder = self.env['mrp.workorder'].browse(self.ids)
|
workorder = self.env['mrp.workorder'].browse(self.ids)
|
||||||
# workorder_preset = self.env['mrp.workorder'].search(
|
# workorder_preset = self.env['mrp.workorder'].search(
|
||||||
# [('routing_type', '=', '装夹预调'), ('rfid_code', '=', barcode)])
|
# [('routing_type', '=', '装夹预调'), ('rfid_code', '=', barcode)])
|
||||||
@@ -1296,7 +1297,7 @@ class SfWorkOrderBarcodes(models.Model):
|
|||||||
self.process_state = '待检测'
|
self.process_state = '待检测'
|
||||||
self.date_start = datetime.now()
|
self.date_start = datetime.now()
|
||||||
else:
|
else:
|
||||||
raise UserError('该托盘信息不存在!!!')
|
raise UserError('没有找到Rfid为【%s】的托盘信息!!!' % barcode)
|
||||||
# stock_move_line = self.env['stock.move.line'].search([('lot_name', '=', barcode)])
|
# stock_move_line = self.env['stock.move.line'].search([('lot_name', '=', barcode)])
|
||||||
# if stock_move_line.product_id.categ_type == '夹具':
|
# if stock_move_line.product_id.categ_type == '夹具':
|
||||||
# workorder.write({
|
# workorder.write({
|
||||||
|
|||||||
Reference in New Issue
Block a user