Rewrite autoname method

I would like to rewrite an autoname method and i have create a custom app and added some code inside and work fine but seems the original autoname will still be run, I don’t want them to be called. How can I completely run my code instead of the original one ?

my custom_app directory structure and right hand side is doc_events in

I found the answer :

before_insert is the magic key

1 Like