How to Link Table inside Child Doctype Table

Hi everyone.

I have some fields in Item doctype that I added which are table type.
I need to get the values in that table into “Sales Order Item” table.

If I create the new field as a table in Sales Order Item, it needs a link to doctype which will not get the values from the item request.

I tried linking the field as a table inside Sales Order Item but got error when trying to view or edit the item from the sales order:

Uncaught TypeError: Cannot read property 'allow_bulk_edit' of undefined

this is a very very important step in our implementation and any help would be really appreciated.

depends on how you would like to use the custom info(table) in sales order item, if you need it fetched from item master and print it or as a column in report you can use a text or html field together with custom script to auto fill this field when item code changed, if after fetching from item master user got to edit, standard frappe framework doesn’t support grand child. you got implement custom table row add/edit/delete via html?
or if your table only have one link field then my custom multi select control can be used

Thank you for your reply.

I just need to show the information that the user inputted in the Item master, as this information is important for the production approval process before approving the sales order.

any idea about the script you mentioned?

so the final requirement can be summarized as following

  1. fetch from item master’s child table records, formatted it as read only in a custom html field

  2. add this html field to the custom print format.

if my understanding is correct, please kindly provide the child doctype definition in item doctype, preferably with doctype screenshot and item master sample data.

thanks.

Correct!

What i need is to add field in ‘Sales Order Item’ that will have the information in the ‘Item’ master, this information is saved in a field type table named stones

Thanks for your help

I tried to use the below in the fetch from in an HTML field:

{{ frappe.db.get_value("Item", doc.item_code, "stone") }}

but it did not give any value

@szufisher sorry for tagging you but can you help with this one?

Or anyone else can help please?