From 78edee3103c1c79308ef80a6ac343c6f97979370 Mon Sep 17 00:00:00 2001 From: lme-axelor <102581501+lme-axelor@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:47:58 +0100 Subject: [PATCH] fix: API path used for adding tracking number (#811) * RM#87305 --- changelogs/unreleased/87305.json | 5 +++++ packages/apps/stock/src/api/tracking-number-api.js | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 changelogs/unreleased/87305.json diff --git a/changelogs/unreleased/87305.json b/changelogs/unreleased/87305.json new file mode 100644 index 000000000..1e3e19b9a --- /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 fadf874bd..ef0a189f0 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: {