Auto-repeat looks pretty awesome. The hidden / undocumented on_recurring() function would seem to create endless uses for auto-repeat. I want to try it out, but not sure what to do. Maybe someone here can help explain it to us all so we can use this amazing feature?
First…this is in auto_repeat.py:
#for any action that needs to take place after the recurring document creation
#on recurring method of that doctype is triggered
new_doc.run_method(‘on_recurring’, reference_doc = reference_doc, auto_repeat_doc = auto_repeat_doc)
Note that there is no mention or usage examples of this potentially amazing function in the docs (yet?)…
https://docs.erpnext.com/docs/v12/user/manual/en/automation/auto-repeat
https://docs.erpnext.com/docs/v13/user/manual/en/automation/auto-repeat
So for simple usage example set up…
if my reference_doc is a “to do” doctype, and I will prefix all my recurring / auto-repeat enabled “to do” records with “TMPL__Take out trash”
How I would remove “TMPL__” from the auto-repeat generated record, so that the record just says “Take out trash” ?
Where and how do we use on_recurring() function to accomplish this?