mirror of
https://github.com/frappe/books.git
synced 2024-11-08 23:00:56 +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() {
|
||||
Object.assign(this, require('./account.json'));
|
||||
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) {
|
||||
return `<a href="#edit/account/${data.name}">${data.name} (${data.account_type})</a>`;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class account extends frappe.document.Document {
|
||||
|
Loading…
Reference in New Issue
Block a user