Hi everyone,
i have a custom app called ‘ict’, i defined a new module ‘ICT’ and new doctype ‘outcome’.
I’m in developers_mode 1, the doctype is make from web interface.
The problem is under ict/ict/ict/doctype/outcome the js part (outcome.js) work fine but i don’t understand how to use outcome.py
I create this file:
class Outcome(Document):
def validate(self):
frappe.throw("Hello")
‘.py’ file is used to write your business logic. The validate method(trigger) that you have written is called when you create a new record under that doctype and save it.
First of all thanks for the answer, now I try to explain myself better.
My goal is to create my logic inside the .py file, but seams that it was not read. The .js files are automatically taken from, the python one no. That code was just a test to verify that it was used, but when I click save on the doctype outcome I don’t see anything.
What could be the problem?
Nothing comes out, yes I created it manually, I also read that it had to be created automatically, but I did not do it, but the custom is checked.
I try to remove it and see what happens, I didn’t know this thing.
Thanks a lot!