chore: migrate Address/Contact custom fields from JSON fixtures to install (backport #55084) (#55087)

fixtures to install (backport #55084)
This commit is contained in:
mergify[bot]
2026-05-21 20:41:36 +00:00
committed by GitHub
parent be1f1e8781
commit 429e02e6f9
5 changed files with 49 additions and 186 deletions

View File

@@ -24,6 +24,7 @@ def after_install():
set_single_defaults()
create_print_setting_custom_fields()
create_address_and_contact_custom_fields()
create_custom_company_links()
add_all_roles_to("Administrator")
create_default_success_action()
@@ -132,6 +133,37 @@ def create_print_setting_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_custom_company_links():
"""Add link fields to Company in Email Account and Communication.