j’aissai de créer un « SaleOrder » avec l’api rest et je reçois cette erreur
voici l’erreur rest
{
« status »: -1,
« data »: {
« title »: « Modification concurrente détectée »,
« message »: « L’enregistrement a été mis à jour ou supprimé par une autre transaction : [SaleOrder{id:2}] »
}
}
voici le code de la requête
curl --location --request PUT ‹ http://172.16.0.57:8080/ws/rest/com.axelor.apps.sale.db.SaleOrder ›
–header ‹ Accept: application/json ›
–header ‹ Content-Type: application/json ›
–header ‹ Cookie: JSESSIONID=7B06EB5C4D695C6B1ACDC51A51875EB3 ›
–data-raw ‹ {
« status »: 0,
« data »:
{
« carrierPartner »: null,
« expectedRealisationDate »: null,
« periodicityTypeSelect »: 2,
« mainInvoicingAddressStr »: « »,
« deliveryCondition »: null,
« deliveryAddress »: null,
« nextInvoicingEndPeriodDate »: null,
« salemanUser »: {
« code »: « admin »,
« fullName »: « Admin »,
« id »: 1,
« $version »: 3
},
« id »: 2,
« opportunity »: null,
« updatedOn »: « 2021-06-01T06:19:17.723Z »,
« companyCostTotal »: « 0.00 »,
« version »: 5,
« attrs »: « {} »,
« isToPrintLineSubTotal »: false,
« externalReference »: null,
« invoicedFirstDate »: null,
« template »: false,
« currentContractPeriodEndDate »: null,
« confirmationDateTime »: « 2021-06-02T06:19:04.745Z »,
« saleOrderSeq »: « 010 »,
« stockLocation »: null,
« advancePaymentList »: [],
« createdByInterco »: false,
« numberOfPeriods »: 1,
« contractPeriodInMonths »: 0,
« createdOn »: « 2021-06-03T06:19:01.483Z »,
« timetableList »: [],
« saleOrderScheduleLineList »: [],
« cancelReasonStr »: null,
« isIspmRequired »: false,
« currency »: {
« code »: « AUD »,
« name »: « Australian Dollar »,
« id »: 8,
« $version »: 0
},
« contactPartner »: null,
« cancelReason »: null,
« deliveryDate »: null,
« totalCostPrice »: « 12.00 »,
« tradingName »: null,
« blockedOnCustCreditExceed »: false,
« subscriptionComment »: null,
« stockMoveList »: [],
« hideDiscount »: false,
« team »: null,
« companyBankDetails »: null,
« statusSelect »: 4,
« standardDelay »: 0,
« importId »: null,
« specificNotes »: « »,
« manualUnblock »: false,
« internalNote »: null,
« saleOrderLineTaxList »: [],
« orderNumber »: null,
« isNeedingConformityCertificate »: false,
« companyExTaxTotal »: « 16.00 »,
« advanceTotal »: « 0.00 »,
« taxTotal »: « 0.00 »,
« project »: null,
« totalGrossMargin »: « 4.00 »,
« noticePeriodInDays »: 0,
« productionNote »: null,
« hasSubLineDefaultValue »: false,
« freightCarrierMode »: null,
« selected »: false,
« isTacitAgreement »: false,
« inTaxTotal »: « 16.00 »,
« orderBeingEdited »: false,
« updatedBy »: {
« code »: « admin »,
« fullName »: « Admin »,
« id »: 1,
« $version »: 3
},
« markup »: « 33.00 »,
« contractStartDate »: null,
« subscriptionText »: null,
« nextInvoicingDate »: null,
« creationDate »: « 2021-06-03 »,
« mainInvoicingAddress »: null,
« saleOrderLineList »: [
{
« fullName »: « 009-Anger »,
« id »: 2,
« $version »: 2
}
],
« templateUser »: null,
« clientPartner »: {
« fullName »: « T000001 - Sirine TRABELSI »,
« id »: 1,
« $version »: 23
},
« electronicSignature »: null,
« incoterm »: null,
« saleOrderTypeSelect »: 1,
« endOfValidityDate »: null,
« orderDate »: null,
« amountToBeSpreadOverTheTimetable »: « 16.00 »,
« importOrigin »: null,
« nextInvPeriodStartDate »: null,
« description »: null,
« forwarderPartner »: null,
« inAti »: false,
« batchSet »: [],
« priceList »: null,
« duration »: null,
« marginRate »: « 25.00 »,
« printingSettings »: null,
« directOrderLocation »: false,
« company »: {
« code »: « 14651146152465 »,
« name »: « Portainer »,
« id »: 1,
« $version »: 2
},
« deliveryAddressStr »: « »,
« shipmentDate »: null,
« accountedRevenue »: « 16.00 »,
« nextInvoicingStartPeriodDate »: null,
« paymentCondition »: null,
« paymentMode »: null,
« specificPackage »: null,
« contractEndDate »: null,
« fullName »: « 009-Sirine »,
« exTaxTotal »: « 16.00 »,
« shipmentMode »: null,
« versionNumber »: 1,
« amountInvoiced »: « 0.00 »,
« confirmedByUser »: {
« code »: « admin »,
« fullName »: « Admin »,
« id »: 1,
« $version »: 3
},
« createdBy »: {
« code »: « admin »,
« fullName »: « Admin »,
« id »: 1,
« $version »: 3
},
« deliveryState »: 1,
« interco »: false
}
} ›
Meric pur tt aides