Odoo Help

0

How to cancel Purchase Order at time Confirm

By
Jagdish Panchal
on 9/21/13, 9:27 AM 2,173 views

Hi All,

On Confirm Button

When I have more than one PO line , i create new two new PO its working fine,

But i want delele or cancel existing PO when i click on Confirm button, How can i ?

I use wf_service.trg_validate(uid, 'purchase.order', ids[0], 'purchase_cancel', cr) but it give me error i alos try to unlink method it give me error.

thanks

0

Andreas Brueckl

--Andreas Brueckl--
5131
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 9/23/13, 6:28 AM

Before you can cancel a PO or SO you first have to cancel all related shippings.

In your case you have to

  • Search for stock.picking where purchase_id is the ID of your PO
  • Trigger Cancel of those pickings
  • Trigger Cancel of the PO

Thanks for the reply

Jagdish Panchal
on 9/23/13, 8:24 AM

Hi,

I have PO in Done State and Shipment is also DONE, How to delete it now?

Or anyway to cancel it?

Thanks in advance for help.

Chandni
on 2/27/17, 2:54 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 9/21/13, 9:27 AM
Seen: 2173 times
Last updated: 3/16/15, 8:10 AM