Custom app -python file

i have created a custom fields in project doctype.
Succefully added fixtures in my custom app
Now i m writting the py file to validate this custom field .

image file is here:


still i m not able to get expected output.


Is my syntax in py and hooks file is right?
can someone help me on dis?

Add print statement or simple frappe.msgprint() in your method to get to know whether your function is callable or not.

One more thing, remove line - as your calling your method on validate.

i have tried below line in abcd function

def abcd(doc,method):

did bench restart.

still not getting expected output.

Seems like your path is incorrect then.
run bench console from frappe-bench dir. and try to import your method.


But if your path is incorrect it will give you error

i have is accepting.


what is the error sir?
I m not able to get expected output.
plz help

try your method,

from overtime.overtime.project_custom import abcd

i have try dis sir,

it is accepting my line.



So, you are updating stock_entry_consumable field form project on save.

try following,

def abcd(doc, method):
	frappe.msgprint("Project validation..")
	doc.stock_entry_consumable = 100

and save any project record, you will see this message pop-up. Also, make sure your filed-name is correct.