Searching for nested table functionality without nested tables?

Hello all,

I’m fairly new to frappe/erpnext and I’m attempting to evaluate it to upgrade the ERP for the small business I work for.

I’ve added my custom app and am adding custom doctypes per our company procedures and have come across a desired behavior I’m not quite sure how to implement.

We manufacture and supply metal building components so there are several production types we deal with as well as retail sales. ERPNext seems perfect for our retail and accounting operations however I am stuck on our custom manufactured orders.

We typically have items in batches (e.g. a set of roof or wall components) that have information such as panel style, color, batch name, total footage in the batch, and weight of the batch. Would even be awesome to have ERPNext calculate the lift point for the stack like our machine does just to have it on the loadout ticket. Each batch then has the associated piece quantity, length, and shear operation described.

For instance:

Batch 1
Roof
26Ga
PBR Panel
Polar White
Coil #: XXXXXXXXXXXX
– 54 @ 10 ft 0 in
Total Footage: #### ft ## in
Total Weight: ####.## lb
Lift Point: ## ft ## in

Batch 2
Wall
26Ga
PBR Panel
Charcoal Grey
Coil #: XXXXXXXXXXXX
– 4 @ 20 ft 10 in
– 4 @ 19 ft 10 in
– 4 @ 18 ft 10 in
– 4 @ 17 ft 10 in
– 4 @ 16 ft 10 in
– 4 @ 15 ft 10 in
– 4 @ 14 ft 10 in
– 4 @ 13 ft 10 in
Total Footage: #### ft ## in
Total Weight: ####.## lb
Lift Point: ## ft ## in

Batch 3
Soffit
26Ga
PBR Panel
Black
Coil #: XXXXXXXXXXXX
– 54 @ 3 ft 11-1/2 in
Total Footage: #### ft ## in
Total Weight: ####.## lb
Lift Point: ## ft ## in

I would like to batch these in this way as I can then easily take the data, run a script to convert to CSV, and upload into the machine for production with no human intervention. This also reduces human error when entering.

The issue is I cannot fathom a way to implement this without using “Nested” tables, which are both not supported by ERPNext and typically referred to as “bad design” however any order can have an arbitrary number of batches and an arbitrary number of piece/length entries, and child table functionality seems the most intuitive way to accomplish this.

Anyone have any ideas?

Thanks,
Jeremy

Not sure if this is helpful, but for our custom application, we created a few standard and child doctypes to emulate “nested” tables. Here’s how you might be able to do it for your use case, if I understand it correctly:

  1. Your primary doctype might be something like an order or a production job.
  2. You can create another standard doctype that represents each batch.
  3. You then create a child doctype (or multiselect doctype) that then links each batch to an order or job. One of the child doctype fields needs to link to the batch, giving you a 1:many relationship between your orders and batches.
  4. You create a 2nd child doctype that can store piece/length entries, and you can place a field that links to this child doctype on your batch doctype in (2) above, so on the batch screen you can see the piece/length details.

The major disadvantage of this setup is you can’t really see all the batches and their corresponding piece/length entries on your order/job screen in the standard Frappe UI; you’d have to click through the child table’s batch links to drill down to see each batch’s details. But you could have a custom HTML field that displayed it all together on your order/job form, if you want to do some scripting.