Display similar products in sales order


First hats off to an awesome system.
We would like to show linked products in the sales order item table, so that the sales agent can choose one of the linked products if the chosen one is not in stock.

We have a parts shop and some parts can be used instead of others, I was looking into creating sub item groups for each linked products group, but don’t know how to display in the sales order item table so that it is shown and clickable.

Thank you for your help.

@mrmo welcome to the forum! This feature is not available out of the box.

Hi @rmehta,

Thank you for your fast response.
I will try to create one and share with your once done.


1 Like

Hi @rmehta,

As promised here are the steps I followed to show similar products, but got stuck at the nr. 7 to fetch data into the “sales order item” popup so after choosing the item it can fill the field with the similar product names, please have a look below and if you have any suggestions, would be great to hear from you, in the mean time I will try further and update if I am successful.

1- create custom fields in “item” doctype for example: “same1” “same2” etc.
2- download item import data.
3- in your csv editor (I use OpenOffice for Unicode purposes) and add the name of items that are similar in their respected fields.
4- upload the updated item list via the import tool.
5- Now all the similar items show in the item detail page of the item in stock module, but not yet in the sales order item popup page.
6- create custom field in the “Sales order item” doctype with the same label as in the item doctype “same1” etc.

Below I got stuck:
7- create custom script in “sales order item” to fetch data from “item” fields into their respected fields. What I typed was "cur_frm.add_fetch(‘Item’,‘same1’,‘same1’), but nothing show when I choose the item in the sales order.

Any help would be great thanks,

Should be cur_frm.add_fetch("item_code", "same1", "same1")

1 Like