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.
I am aware of this setting but it doesn’t do what I’m looking for. The process I would like is as follows:
Using data import tool, import previous day’s goods in receipts to ERPnext as draft Purchase Orders
After confirming the import balance, submit the Purchase Orders within ERPnext. This should, behind the scenes, create and submit 100% Purchase Receipts for the relevant Purchase Order.
With no further user interaction after pressing “Submit” on the Purchase Order, the user should then be able to invoice off the goods or check the Goods Received Not Invoiced balance.
Might it be easier the completely ignore the Purchase Receipt step and have the Purchase Order submission create the relevant journal entries for GRNI?
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?