hns
3 years ago
21 changed files with 136 additions and 89 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,8 +1,16 @@ |
|||
// Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
|
|||
// For license information, please see license.txt
|
|||
|
|||
cur_frm.fields_dict['variant'].get_query = function(doc, cdt, cdn) { |
|||
return { |
|||
query:"smart_service.transactions.doctype.variant_mapping.variant_mapping.variant", |
|||
// filters: {'doc': doc.name}
|
|||
} |
|||
} |
|||
|
|||
frappe.ui.form.on('Variant Mapping', { |
|||
// refresh: function(frm) {
|
|||
|
|||
// }
|
|||
refresh: function(frm) { |
|||
|
|||
} |
|||
}); |
|||
|
@ -1,8 +1,15 @@ |
|||
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors |
|||
# For license information, please see license.txt |
|||
|
|||
# import frappe |
|||
import frappe |
|||
from frappe.model.document import Document |
|||
|
|||
class VariantMapping(Document): |
|||
def validate(self): |
|||
pass |
|||
@frappe.whitelist() |
|||
def variant(doctype, txt, searchfield, start, page_len, filters): |
|||
#return frappe.db.sql("""SELECT name,variant,vehicle,vehicle_segment,active_status FROM _d6463952657fa86c.tabVariant order by creation desc""") |
|||
return frappe.db.sql(""" select name,variant,vehicle,vehicle_segment,active_status |
|||
FROM _d6463952657fa86c.tabVariant where |
|||
(name like "%%%(txt)s%%" or variant like "%%%(txt)s%%") limit %(start)s, %(page_len)s order by creation"""%{'txt': txt, 'start': start, 'page_len': page_len}) |
|||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue