Autonaming is fixed for table doctypes in V13

Hello,

we are currently finalizing the migration from V12 to V13 of ERPNext and I recognized a behavior change which makes me some headaches.

We have several custom doctypes which contain tables. Those table entries are referenced in other tables by the users. Here is an example screenshot from our test system:

In the first table we create child doctypes, which then can be referenced in the second table (now only showing the hashcode). To distinguish the items, we used a custom format for autoname. This works with V12 but with V13 there was a change how autoname works with table items. set_new_name() now simply calls make_autoname() for table doctypes:

elif getattr(doc.meta, "istable", False):
	doc.name = make_autoname("hash", doc.doctype) 

Here is the corresponding commit:
https://github.com/frappe/frappe/commit/21419645f83d4d5e94a83d9197100a5bf6633b18

Can someone tell me the reason for this change? And also do you have any ideas on how to solve the issue? I only know that I could display additional informations in the drop down menu, but this doesn’t help me when looking at the table, also adding a new field with the generated name would partially help, but also takes up space in the table.

EDIT: Oh, i just tested if i remove istable from the doctype. Now autonaming works like before, but can someone tell me if this will cause other issues?

Regards Kevin

Yes, for me its a problem too. Thats why i asked in Child table auto name is not working ( version-13 ). · Issue #13940 · frappe/frappe · GitHub if this was meant to be.

Ohh, thanks for the issue. I didn’t found it when searching for a solution for this problem.
I posted here as i was wondering if we do something in a way it isn’t supposed to be done. But looking at the issue it seems i’m not the only user with this problem.

My first quick temporary solution would be overriding the method frappe_model_naming.make_autoname and returning None in case of the corrosponding doctype.

Since this has been tagged as a bug, i hope this will be resolved. But you may also run into the following issue, if you try to access fields from your child table doctype: validate_link for child table dosn't work · Issue #14969 · frappe/frappe · GitHub