mirror of
https://github.com/frappe/books.git
synced 2025-01-03 15:17:30 +00:00
overrride link filters
This commit is contained in:
parent
44c171db79
commit
1c9b43225b
56
js/bundle.js
56
js/bundle.js
File diff suppressed because one or more lines are too long
@ -4,12 +4,21 @@ class account_meta extends frappe.meta.Meta {
|
|||||||
setup_meta() {
|
setup_meta() {
|
||||||
Object.assign(this, require('./account.json'));
|
Object.assign(this, require('./account.json'));
|
||||||
this.list_options.fields = ['name', 'account_type'];
|
this.list_options.fields = ['name', 'account_type'];
|
||||||
|
this.setup_links();
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_links() {
|
||||||
|
this.get_field('parent_account').get_filters = function(query) {
|
||||||
|
return {
|
||||||
|
keywords: ["like", query],
|
||||||
|
name: ["!=", this.form.doc.name]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get_row_html(data) {
|
get_row_html(data) {
|
||||||
return `<a href="#edit/account/${data.name}">${data.name} (${data.account_type})</a>`;
|
return `<a href="#edit/account/${data.name}">${data.name} (${data.account_type})</a>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class account extends frappe.document.Document {
|
class account extends frappe.document.Document {
|
||||||
|
Loading…
Reference in New Issue
Block a user