diff --git a/changelogs/unreleased/87305.json b/changelogs/unreleased/87305.json new file mode 100644 index 0000000000..1e3e19b9a2 --- /dev/null +++ b/changelogs/unreleased/87305.json @@ -0,0 +1,5 @@ +{ + "title": "StockMoveLine: use the right API to add a tracking number", + "type": "fix", + "packages": "stock" +} diff --git a/packages/apps/stock/src/api/tracking-number-api.js b/packages/apps/stock/src/api/tracking-number-api.js index fadf874bd7..ef0a189f0b 100644 --- a/packages/apps/stock/src/api/tracking-number-api.js +++ b/packages/apps/stock/src/api/tracking-number-api.js @@ -89,12 +89,14 @@ export async function updateStockMoveLineTrackingNumber({ trackingNumber, }) { return getActionApi().send({ - url: `/ws/aos/stock-move-line/${stockMoveLineId}`, - method: 'put', + url: `/ws/rest/com.axelor.apps.stock.db.StockMoveLine/${stockMoveLineId}`, + method: 'post', body: { - id: stockMoveLineId, - version: stockMoveLineVersion, - trackingNumber, + data: { + id: stockMoveLineId, + version: stockMoveLineVersion, + trackingNumber, + }, }, description: 'add tracking number on stock move line', matchers: {