Frappe Core DocTypes can't be customized in Version 11

Hi @youssef,

sure, I used a custom app with fixtures enabled: in your hooks.py file, add “Custom Fields”

fixtures = ["Custom Field"]

Then, run

$ bench --site mysite export-fixtures

This will create the base fixture file. You can effectively remove the content. What I did was copy one variable section and manually entered the definition for my core doctype field:

{
  "allow_on_submit": 0,
  "bold": 0,
  "collapsible": 0,
  "collapsible_depends_on": null,
  "columns": 0,
  "default": null,
  "depends_on": null,
  "description": null,
  "docstatus": 0,
  "doctype": "Custom Field",
  "dt": "User",
  "fetch_from": null,
  "fieldname": "section_signature_cost_center",
  "fieldtype": "Section Break",
  "hidden": 0,
  "ignore_user_permissions": 0,
  "ignore_xss_filter": 0,
  "in_global_search": 0,
  "in_list_view": 0,
  "in_standard_filter": 0,
  "insert_after": "mute_sounds",
  "label": "Signature and Cost Center",
  "modified": "2019-03-06 21:52:14.685977",
  "name": "User-section_signature_cost_center",
  "no_copy": 0,
  "options": "",
  "permlevel": 0,
  "precision": "",
  "print_hide": 0,
  "print_hide_if_no_value": 0,
  "print_width": null,
  "read_only": 0,
  "report_hide": 0,
  "reqd": 0,
  "search_index": 0,
  "translatable": 0,
  "unique": 0,
  "width": null
 },

I then saved the fixture file, checked in the changes and ran

$ bench migrate

This will load the changes in the database and you will have your customisation of a core doctype. Hope this helps.

4 Likes