Create a DocType similar to user profile

Hi team,

Here’s the problem that I am trying to solve.

I want to create a DocType to collect user specific data. Let’s say the DocType has the following fields;

  • Full Name (text)
  • ECF Entry Code (int)
  • Allow Contact (yes/no)

When a user logs in to the system, he should be able to click his user icon (top right corner) and in the dropdown get a menu link saying “Internal Details”.

This is just like the in-built user “My Settings” section as shown below;

When the user clicks on this link he should be shown the form of the DocType we created above and he should be able to fill in his details (fields given above) and click save. He can modify / edit this information at a later stage.

The user will never see the list view of this DocType.
The data entered in this DocType will be unique for each user just like his user profile data.

The admin user will be able to see this data in the DocType list view to check the submissions of all users.

Kindly guide on the right way to achieve this functionality.

Thanks,

@bkm @ChillarAnand @brian_pond @peterg

Create a custom app for that

Add custom fields
Decorate with all your settings and functionalities…

In your hooks.py file add this line

fixtures = [“Custom Field”]

Then export fixtures with:

bench --site mysite export-fixtures

Hi @spryng

Thanks for your reply. I don’t think that’s a solution to what I am trying to achieve. I am well versed with creating custom apps and exporting fixtures.

Can you suggest on possible ways to achieve the functionality described in the post above? Custom apps and exporting fixtures can be done later.