it says I must first cancel the order, So I click cancel. Then it says I must "first cancel all receptions related to the purchase order". So, I went ahead and canceled the delivery, but it still gives me the same message.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
go into each order line in the purchase order and delete them, that will help you discover which line still has a reception attached to it. Then cancel it.
I don't understand. I can no longer edit the purchase order. What am I deleting?
You could go to warehouse/deliver/receive by order and cancel the incoming shipment that corresponds to the PO. Next step is to cancel the PO
I did cancel the shipment corresponding to the PO, but it still will not cancel the PO
Make sure you are cancelling the INCOMING SHIPMENT. In your question you typed that you cancelled the DELIVERY, which is related to the SALES ORDER, not the PURCHASE ORDER.
Yes. I did cancel the incoming shipment and not the delivery. Sorry about that confusion.
@ Lars. Thanks I got my problem solved with your help.
Hello Robert,
You need to cancel first all the invoices related to particular purchase orders. Also, cancel all the receipt stock pickings.
you can do like this. Here the self is particular purchase order.
picking_order = self.env["stock.picking"].search([
('partner_id', '=', self.partner_id.id),
('origin', '=', self.name)])
for picking in picking_order:
if picking.state != 'cancel':
picking.action_cancel()
if self.invoice_ids:
for invoice in self.invoice_ids:
invoice.button_draft()
invoice.button_cancel()
record.button_cancel()
Kind Regards,
I'm newbee on odoo. Could you let me know how to run your script? I'm using odoo v16.x (online). Thanks in advance.
You can manully delete them from data base.
check the model name goto the respective table
and delete the record
also delete other related records like receipt , delivery details
Just an indication for those like me who have the same problem but who do *not* have installed the warehouse module, you won't be able to see the menu "Warehouse".
Then to cancel the order proceed as follow :
- Purchases / Invoice Control / Incoming shipments
- cancel the appropriate line
- then go back to the order and you will be able to cancel it.
Kind regards
How can I cancel the purchase order that has receive product? I mean shipment has "done".
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up