Pull PO item details in SO

I have added a custom field of type Link in Sales Order. The field is linked to Purchase Order table.

Is it possible using custom client scripting to pull the items and item quantity from the Purchase Order item details when a Purchase Order is selected by user?



You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Its not to easy, but here are the schematics - you will have to look up the fieldnames

wn.model.with_doc("Purchase Order", cur_frm.doc.purchase_order, function() {
   $.each(wn.model.get("Purchase Order Item", {"parent":doc.purchase_order}, function(i, po_item) { 
      d = wn.model.add_child(cur_frm.doc, "Sales Order Item", "items");
      d.item_code = po_item.item_code;
      d.description = po_item.description;
      ..
      ..
      
   });
   cur_frm.refresh();
})

Its better if you raise a GitHub Issue for this.

On Monday, January 27, 2014 1:56:24 PM UTC+5:30, lxnow wrote:
I have added a custom field of type Link in Sales Order. The field is linked to Purchase Order table.

Is it possible using custom client scripting to pull the items and item quantity from the Purchase Order item details when a Purchase Order is selected by user?



You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.