“but please i want more completed code”
Why not search for gems to learn from -
In this forum check for say frappe.db.get_value or frappe.db.set_value
Use frappe.db.get_value within a Depends On doesn't work
Getting company_name from another doctype - #9 by eldorim
How to add TAX ID in Sales Invoice Print Out
or the actual code base, either from a console for either Python controller
frappe@ubuntu:~/frappe-bench$ find . -name *.py | xargs grep frappe.db.get_value
or Javascript form views
frappe@ubuntu:~/frappe-bench$ find . -name *.js | xargs grep frappe.db.get_value
also too the github repository:
hope this helps