查询源位置的条件=改为ilike
This commit is contained in:
@@ -366,10 +366,10 @@ class StockPicking(models.Model):
|
||||
# 设置外协出入单的名称
|
||||
def _get_name_Res(self, rescode):
|
||||
last_picking = self.sudo().search([('name', 'like', rescode)], order='create_date DESC', limit=1)
|
||||
logging.info('编号:' + last_picking.name)
|
||||
if not last_picking:
|
||||
num = "%04d" % 1
|
||||
else:
|
||||
logging.info('编号:' + last_picking.name)
|
||||
m = int(last_picking.name[-3:]) + 1
|
||||
num = "%04d" % m
|
||||
return '%s%s' % (rescode, num)
|
||||
@@ -419,7 +419,7 @@ class StockPicking(models.Model):
|
||||
location_id = self.env.ref(
|
||||
'sf_manufacturing.stock_location_locations_virtual_outcontract').id,
|
||||
location_dest_id = self.env['stock.location'].search(
|
||||
[('barcode', '=', 'WH-PREPRODUCTION')]).id,
|
||||
[('barcode', 'ilike', 'WH-PREPRODUCTION')]).id,
|
||||
outcontract_picking_type_in = self.env.ref(
|
||||
'sf_manufacturing.outcontract_picking_in').id,
|
||||
outcontract_picking_type_out = self.env.ref(
|
||||
|
||||
Reference in New Issue
Block a user