The list button was registered by reassigning frappe.listview_settings['Customer'] in a globally-loaded script, but ERPNext's own Customer list_js (loaded when the list opens) overwrote it, so the button never appeared. Register it via doctype_list_js instead — which Frappe appends after the doctype's own list_js — and merge into the existing settings (wrapping onload, preserving ERPNext's add_fields) rather than reassigning. The form button and shared ns_statements helpers stay in customer_statements.js. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
40 lines
900 B
Python
40 lines
900 B
Python
app_name = "ns_app"
|
|
app_title = "NS App"
|
|
app_publisher = "NS Innovations"
|
|
app_description = "Custom ERPNext extensions"
|
|
app_email = "dev@nsinnovations.net"
|
|
app_license = "MIT"
|
|
|
|
# Load on every page
|
|
app_include_js = [
|
|
"/assets/ns_app/js/customer_quick_entry.js",
|
|
"/assets/ns_app/js/customer_statements.js"
|
|
]
|
|
|
|
# Load on Sales Invoice form
|
|
doctype_js = {
|
|
"Sales Invoice": "public/js/sales_invoice.js"
|
|
}
|
|
|
|
# Load on Customer list view (merges the "Generate Statements" action)
|
|
doctype_list_js = {
|
|
"Customer": "public/js/customer_list.js"
|
|
}
|
|
|
|
# Ensure custom fields exist after every migrate
|
|
after_migrate = "ns_app.setup.after_migrate"
|
|
|
|
# Fixtures tracked in Git
|
|
fixtures = [
|
|
{
|
|
"dt": "Print Format",
|
|
"filters": [
|
|
["name", "in", [
|
|
"NS Invoice",
|
|
"NS Sales Order",
|
|
"NS Quotation"
|
|
]]
|
|
]
|
|
}
|
|
]
|