ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

How to add Address and Contact HTML section


#1

Hi there.

I want to add the Address and Contact section to my Custom DocType.

I have created all the fields in DocType and I want to know which py code need to add into the server side to get the datas.

Please let me know how to do this.

I have added the import code to the .py file but the rest is missing.


#2

i need this too


#3

frappe.db.get_value(‘doctype’, {filters}, [fields])


#4

should i add this in doctype.js file ?


#5

Yes you can add it into js or py controller depends on your logic


#6

i can added in js file
but please i want more completed code
my doctype name in workers
and i use default erpnext contacts and address doctyps


#7

“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
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


#8

that’s it
i’ve tried for last 4 hours and i couldn’t did it :confused:
maybe if some one could help me i appreciate your help


#9

“that’s it
i’ve tried for last 4 hours and i couldn’t did it :confused:
maybe if some one could help me i appreciate your help”

What specifically are you referring to?


#10

thank you for your replay
my company have a workers listing website
so i created a new doctype it’s name workers ( it is the same customer doctype with all it’s fields) this doctype under custom module called workers under custom app called listing
all i want to display address like this in worker doctype


ps. iam in production mode


#11

“all i want to display address like this in worker doctype”

Why don’t you and garybsimon collaborate here…


#12

@garybsimon
i’ll be glade if we worked together on this if you agree


#13

@garybsimon , @fatheyabdelslam is it done? please explain as i want to do this also.