Cancellations and returns
What happens in Odoo when an order moves to a cancelling or returning status.
Cancelling is just another status
The connector does not act on Salla's "order cancelled" event. Cancellations and returns work through the Status tab: you put the statuses you treat as a cancellation into the cancelling lists. If you do not, nothing happens in Odoo when an order is cancelled.
The order of what happens
When the order reaches a cancelling status, and according to the lists you filled:
- Cancel the invoice — a credit note, or the invoice back to draft.
- Send the credit note to ZATCA if you are on 19.3 or later.
- Pay the credit note.
- Cancel the sales order.
- Cancel the delivery order.
- Return the quantity to stock.
Credit note or draft
The choice is Cancel Invoice Type on the Accounting tab. A credit note is the accounting-correct route once an invoice is posted; setting it back to draft does not work if the accounting period is locked.
Partial returns are not handled
Returning a single line from an order is not something the connector handles automatically. Partial returns are handled by hand in Odoo.
If there was no sales order
If an order reaches a cancelling status without ever having had a sales order created, the connector creates it first and then cancels it, so the document trail in Odoo stays complete.