Child Table of a child table

I have a use case . A pallet can have many boxes, a box have many products.

Pallet: Doctype
Pallet Box: Child Doctype of Pallet
Box Product: Child Doctype of PalletBox

Inside a pallet document (record) I click edit button in boxes grid, and i can’t edit it.
Pallet box has a Table field (that points to Box Product) when I delete that field it allow me to click on edit and form opens.

Is there a way to view a child doctype inside a form of another child doctype?

@nev-21 I believe that you need the following:


  1. Pallet
  2. Pallet Box

Child Tables

  1. Pallet Pallet Box as a Child Table in Pallet doctype to link between both of the above doctypes
  2. Box Product as a Child Table in Pallet Box doctype to link the doctype with the products


  1. Create the Pallet Box entries and fill the table of Box Product for each entry with the products you want
  2. Create the Pallet entry and fill the table of Pallet Pallet Box with the entries you created in the first step

I hope that I was able to help.

1 Like

Thanks @kid1194

I did that already, but the problem is I can edit items (open sub-form by click on edit).

I post an issue, with a video:

@nev-21 Based on the JS trace that you posted on github, I can see that the error is about bulk edit. So try to edit Box doctype, edit products table, scroll to the bottom and check Allow Bulk Edit option then give it another try.

Thanks again @kid1194 for you help.

I tried it without success.

This is not supported.
Maintainers will tell you it is a bad design (which I wholeheartedly disagree with).
But they come up with even worse design to overcome this lack of feature; like having to duplicate stock entry line when consuming multiple different item batch. Or setup sibling lists in BOM to define Operations and Items, when it would be so much more user friendly to see Items required underneath each Operations…


Thanks for your reply @guimorin, I understand now.

I achive to connect to one-to-many doctypes ( withouth child table checkbox) using Link field, and connections, but the UX is bad because user has to make too much clicks to se the content of boxes and return to see what was the pallet he was seeing.

So I think I will not use frappe frontend (maybe the backend) this is a basic need for any system specially CRUD based ones. Appart from the fact that doctypes layouts have bugs and the lack of documentation of how to use them, and how to develop custom pages.

@nev-21 There is a way to do what you want and view the products of each box when you click on edit but you can’t modify the box products.

To do that you will need to create on doctype, besides the 3 you already have, to use as the child table for the Pallet doctype and you will also need a client script for this child table that gets the Box you have selected and list down the products in that box.

If that is OK with you, please let me know so I provide you with the child table doctype fields and the related client script.

1 Like

Any updates on this issue? @kid1194 I would be interested in this solution if possible

@kareemk I can’t remember what was my idea at that time. I think that the idea was using an html field inside the child doctype which can be used to display the table created using JavaScript…

The problem is that the html table will only display the data of some columns from the child table => child table so performing any action on that table will not be possible…

Had implemented this ~6 years ago - never got a strong use case to merge it: Comparing frappe:develop...rmehta:grand-children · frappe/frappe · GitHub

1 Like

Oh great! Let me try this out to see if it works. Seems like a very common usecase where a child table itself has child tables. In my situation it’s modeling a Project that has many Project Items that each has many Estimates.

1 Like

I just tried to merge it into the latest develop branch and I’m really struggling given how much the conflicting files have changed. Would there be any possibility of you reapplying this?

1 Like

Looking implement a similar feature. Any luck here @kareemk

Same here. @rmehta, any possibility to include this in a future merge?