mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-22 18:59:58 +00:00
chore: migrate Address/Contact custom fields from JSON fixtures to install (backport #55084) (#55088)
Co-authored-by: diptanilsaha <diptanil@frappe.io> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> fixtures to install (#55084)
This commit is contained in:
@@ -25,6 +25,7 @@ def after_install():
|
||||
setup_repost_defaults()
|
||||
create_print_setting_custom_fields()
|
||||
create_marketing_campaign_custom_fields()
|
||||
create_address_and_contact_custom_fields()
|
||||
create_custom_company_links()
|
||||
add_all_roles_to("Administrator")
|
||||
create_default_success_action()
|
||||
@@ -145,6 +146,37 @@ def create_marketing_campaign_custom_fields():
|
||||
)
|
||||
|
||||
|
||||
def create_address_and_contact_custom_fields():
|
||||
create_custom_fields(
|
||||
{
|
||||
"Address": [
|
||||
{
|
||||
"label": _("Tax Category"),
|
||||
"fieldname": "tax_category",
|
||||
"fieldtype": "Link",
|
||||
"options": "Tax Category",
|
||||
"insert_after": "fax",
|
||||
},
|
||||
{
|
||||
"label": _("Is Your Company Address"),
|
||||
"fieldname": "is_your_company_address",
|
||||
"fieldtype": "Check",
|
||||
"default": "0",
|
||||
"insert_after": "linked_with",
|
||||
},
|
||||
],
|
||||
"Contact": [
|
||||
{
|
||||
"label": _("Is Billing Contact"),
|
||||
"fieldname": "is_billing_contact",
|
||||
"fieldtype": "Check",
|
||||
"insert_after": "is_primary_contact",
|
||||
},
|
||||
],
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def create_default_success_action():
|
||||
for success_action in get_default_success_action():
|
||||
if not frappe.db.exists("Success Action", success_action.get("ref_doctype")):
|
||||
|
||||
Reference in New Issue
Block a user