You can easily cancel Purchases that are not yet confirmed using the Cancel button.
Confirmed purchases cannot be cancelled, but you can put them back to a state where they can be cancelled. However, as soon as a confirmed purchase starts to be processed it can no longer be cancelled. This may happen immediately when it is confirmed, or after a delay if one has been correctly Configured.
Once a purchase has started to be processed, to effectively cancel the purchase, you must cancel its Stock Moves and Invoices. Once you have done this you must handle the exceptions, ensuring that none of the moves or invoices are selected for recreation.
There may be times when you need to send a Purchase, or part of a purchase, back to the supplier. In Tryton this is represented by a purchase that has negative quantities.
One way of creating a supplier return is to select the purchases that you want to return and then use the Return Purchase wizard. This creates a draft return purchase for the whole of the selected purchase.
If only part of the purchase is being returned, then the return purchase can be altered as required. When it gets processed it will automatically create Credit Notes and Supplier Return Shipments where required.