To_rename column and how often renaming happens

Hi Guys

I’ve been exporting some transactions from the ERPNext database and noticed that the name column in the “tabGL Entry” table is not fixed.
This has caused us to see duplicates because of assuming that name was sort of an “id” column.
I noticed that there is a to_rename field and that it gets changed to false and the name changed periodically.
I haven’t been able to deduce the frequency but it seems to be on the hour?
Can someone explain or confirm this behavior?



Hi Guys, any comments on this.

Is there a way to increase the frequency of the rename process running?

We’re also finding the some transactions are not getting renamed for long periods of time, our oldest is from the 24th of March with a to_rename still set to 1. Could someone shed some light on this?

This seems to be part of the puzzle

But a search for who calls it turns up no clues, for example

frappe@ubuntu:~/frappe-bench$ find . -name ‘*.py’ | xargs grep rename_temporarily_named_docs
./apps/erpnext/erpnext/accounts/doctype/gl_entry/ rename_temporarily_named_docs(doctype)
./apps/erpnext/erpnext/accounts/doctype/gl_entry/ rename_temporarily_named_docs(doctype):

Thanks John, We’ve had to work around the problem by using creation as a unique id, when the renaming occurs the modified and creation times are not affected. The creation time is specific enough (to the microsecond) to make a pseudo unique id.