I am trying to customise ERPnext to replace our accounts software, Microsoft Dynamics GP. Our process is to only import goods to GP as they are received through our custom warehouse management software, which works with GP as it has no concept of a purchase receipt (it goes straight from Purchase Order to Invoice).
ERPnext has the unnecessary (to us) step of creating a purchase receipt after a PO has been raised, and I would like to eliminate this by automatically creating and submitting a PR whenever a PO is submitted. I have looked through the forum for existing tasks, and found How to trigger something when save or submit is clicked in a doctype but can’t see how to adapt this for my needs. I tried making a custom function following the suggestion and adding it to hooks.py, and it was picked up but didn’t do anything.
For us the Purchase Order in ERPnext is the verified document. The confirmation of receipt happens on a different system so we will only ever be importing confirmed purchase receipts. It is literally impossible for the accounting system to even see anything that is not a confirmed purchase receipt. This is how our current accounting system works.
That said, I would rather go through the existing ERPnext process ( PO → PR → PI) than have to circumvent anything if possible by using automation.
However it’s not updating the posting_date or posting_time of the Purchase Receipt which will cause problems with the Goods Received Not Billed report. Any thoughts on why this isn’t working and how to fix it?