I build a custom app but it seems to not reflecting the changes i made? I already created a doctype name Members and i’m trying to customize the autonaming of the doctype. i have 2 fields in my doctype : member_name, mobile_number
even printing a message using print “Test” not reflecting in my terminal. i also used frappe.throw(_(“Test”)) but still nothing happened.
below is my code:
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.naming import make_autoname
from frappe.model.document import Document
class Members(Document):
def autoname(self):
self.name = make_autoname("G-" + self.member_name)
and as i see, my code is not working …i already clear the cache using bench --site sitename clear-cache in frappe-bench folder but still the changes is not working.
Strange. Under which module/app you created this doctype? If you are in development setup create a new site, install the same app there and try it on the new site.
as i’ve done your instruction i notice that when i create a new doctype in UI, frappe automatically creates the doctype folder corresponding on the created doctype in UI in my custom_app …
if i can remember i created the custom app first and install it in the site then create new doctype but it didnt create the files in my app so i have created its own files. maybe thats what i did wrong?
the problem already solved. but now the autoname seems to have an auto inrementing number