"""App setup: custom fields created/synced on migrate.""" import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields # Fee schedule/amounts live on ERPNext's Dunning Type; this adds the one thing # it lacks — the Item used to bill a late fee as a Sales Invoice. CUSTOM_FIELDS = { "Dunning Type": [ { "fieldname": "custom_late_fee_item", "label": "Late Fee Item", "fieldtype": "Link", "options": "Item", "insert_after": "income_account", "description": ( "Item used to bill a late-payment fee as a Sales Invoice when " "customer statements are generated." ), } ] } def after_migrate(): create_custom_fields(CUSTOM_FIELDS)