Mapping doctype

can some1 help me to solve this error?
I have creted Make Plan button in project doctype


My py code:

My js code:

When I clicked on Make Plan button
I got this error:
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 57, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 935, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/mapper.py”, line 17, in make_mapped_doc
method = frappe.get_attr(method)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 915, in get_attr
return getattr(get_module(modulename), methodname)
AttributeError: ‘module’ object has no attribute ‘make_plan’

How to solve dis error?

If your writing code in the project.py file then the path should be like,

erpnext.projects.doctype.project.project.make_plan. Your code not indented. Also your making changes in default files

then… should I try this in custom module?

You can use the custom script, custom application for customization.

If I copy this code
and paste it in custom script will it work?

check

Custom script Examples

1 Like

thank you so much