修复”制造订单完工后对应的成品入库单还是等待状态-应该是就绪状态“
This commit is contained in:
@@ -161,6 +161,9 @@ class JdEclp(models.Model):
|
||||
url2 = config['bfm_url'] + '/api/get/jd/no'
|
||||
response = requests.post(url2, json=json2, data=None)
|
||||
# _logger.info('调用成功2', response.json()['result']['wbNo'])
|
||||
tem_ret = response.json().get('result')
|
||||
if not tem_ret:
|
||||
raise ValidationError('京东物流返回异常,请联系管理员')
|
||||
self.carrier_tracking_ref = response.json()['result'].get('wbNo')
|
||||
if not self.carrier_tracking_ref:
|
||||
raise ValidationError('物流下单未成功,请联系管理员')
|
||||
|
||||
@@ -633,7 +633,7 @@ class MrpProduction(models.Model):
|
||||
logging.info('qty_produced:%s' % production.qty_produced)
|
||||
production.write({
|
||||
'date_finished': fields.Datetime.now(),
|
||||
'product_qty': production.product_qty if production.qty_produced < 1.0 else production.qty_produced,
|
||||
'product_qty': production.qty_produced,
|
||||
'priority': '0',
|
||||
'is_locked': True,
|
||||
'state': 'done',
|
||||
|
||||
@@ -1016,7 +1016,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
move_raw_id.quantity_done = move_raw_id.product_uom_qty
|
||||
record.process_state = '已完工'
|
||||
record.production_id.process_state = '已完工'
|
||||
if record.routing_type in ['解除装夹', '表面工艺']:
|
||||
if record.routing_type in ['表面工艺']:
|
||||
raw_move = self.env['stock.move'].sudo().search(
|
||||
[('origin', '=', record.production_id.name),
|
||||
('procure_method', 'in', ['make_to_order', 'make_to_stock']),
|
||||
|
||||
Reference in New Issue
Block a user