bfm加工订单隐藏字段 ,待发货明细中,接单日期、发货日期顺序改变,欠单如果没有发货不要显示发货时间 、更改逾期状态逻辑。
This commit is contained in:
@@ -74,6 +74,8 @@ class StockPicking(models.Model):
|
||||
|
||||
def send_to_bfm(self):
|
||||
skip_backorder = self.env.context.get('skip_backorder')
|
||||
cancel_backorder_ids = self.env.context.get('picking_ids_not_to_backorder')
|
||||
|
||||
# 下发发货到bfm
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
move_ids, move_line_ids = self.deal_move_ids(self.move_ids, self.move_line_ids)
|
||||
@@ -92,13 +94,13 @@ class StockPicking(models.Model):
|
||||
'state': self.state,
|
||||
'backorder_id': self.deal_send_backorder_id(self.backorder_id),
|
||||
'backorder_ids': self.deal_send_backorder_id(self.backorder_ids),
|
||||
'cancel_backorder_ids': skip_backorder,
|
||||
'cancel_backorder_ids': True if skip_backorder and cancel_backorder_ids else False, # 没有欠单判断
|
||||
'move_type': self.move_type,
|
||||
},
|
||||
}
|
||||
url1 = config['bfm_url_new'] + '/api/stock/deliver_goods'
|
||||
json_str = json.dumps(data)
|
||||
print('json_str', json_str)
|
||||
logging.info('json_str= %s', json_str)
|
||||
r = requests.post(url1, json=data, data=None)
|
||||
if r.status_code == 200:
|
||||
result = json.loads(r.json()['result'])
|
||||
|
||||
Reference in New Issue
Block a user