Link purchase order

Why you need a custom po field? Update existing po field in pr item doctype, on save pr by reviewer. Need to do it using hook or in a custom script.

i still didn’t make ur suggestion i will make it the screen shoots from my system i was try before ask the issue here

is there is any way to other solution far from write custom script because i have a little experience about paython

once you get the PO No is keyed in by Reviewer, you can write a custom script in JavaScript, using validate function and update PO No field in Purchase Receipt Item.
validate function is run before Save, on click Save button.

ok what about PO item field

it is important to update PO item status to close the receipted items and make pending items still to receive

so we have to update both of them PO & PO item in PR item doctype

I think, once the PO is linked with PR, PO item status is updated on submission of PR.

Good day @schilgod

I see this is a thread that is a few years old, but I am facing the same problem. there are a few
more threads that is suggesting as you do , but I do not find the PO-field in the Stock-Entry
Item table. Having said that, I am working on …

ERPNext: v12.26.0 (version-12)

Frappe Framework: v12.23.0 (version-12)

Not sure if there has been a change since the version that was out in 2018 ?

In the Stock-Entry doctype there is a PO field that only becomes available when the select
“send to subcontractor” ( not sure why this type of limitation is imposed?

In the Stock-Entry_Detail doc-type there is only … PO-supplied_item

Am I missing something or has there been a change since the version on 2018 (I gues it was
perhaps V10 or V11 ?
Thanks

This issue still exists on version 13

ERPNext: v13.35.3 (version-13)

Frappe Framework: v13.35.2 (version-13)

Once a PR is created, It cannot be linked to an existing PO. Hence the right way to do it will be to create a PR from the PO–> Create → PR.

But I think it is absolutely necessary that this option is available because people can create a PR directly without checking PO list. Scenarios where this can be applicable are:

  1. There are a lot a deliveries and the PR is created directly without checking PO due to lack of time.
  2. This can be a procedure in the company where the PO and PR is linked later in the day.
  3. Sometimes a supplier can send some items from multiple POs in one delivery note and hence the PR should be linked to multiple POs.