Fixed set_query

This commit is contained in:
Anand Doshi 2014-04-25 18:35:45 +05:30
parent bbffaf78fb
commit 69a2c25ca5
14 changed files with 16 additions and 16 deletions

View File

@ -109,7 +109,7 @@ cur_frm.fields_dict['master_name'].get_query = function(doc) {
var dt = doc.master_type || "Warehouse"; var dt = doc.master_type || "Warehouse";
return { return {
doctype: dt, doctype: dt,
query: "accounts.doctype.account.account.get_master_name", query: "erpnext.accounts.doctype.account.account.get_master_name",
filters: { filters: {
"master_type": dt, "master_type": dt,
"company": doc.company "company": doc.company

View File

@ -56,7 +56,7 @@ erpnext.accounts.JournalVoucher = frappe.ui.form.Controller.extend({
frappe.model.validate_missing(jvd, "account"); frappe.model.validate_missing(jvd, "account");
return { return {
query: "accounts.doctype.journal_voucher.journal_voucher.get_against_jv", query: "erpnext.accounts.doctype.journal_voucher.journal_voucher.get_against_jv",
filters: { account: jvd.account } filters: { account: jvd.account }
}; };
}); });

View File

@ -18,7 +18,7 @@ frappe.query_reports["Accounts Payable"] = {
"get_query": function() { "get_query": function() {
var company = frappe.query_report.filters_by_name.company.get_value(); var company = frappe.query_report.filters_by_name.company.get_value();
return { return {
"query": "accounts.utils.get_account_list", "query": "erpnext.accounts.utils.get_account_list",
"filters": { "filters": {
"report_type": "Balance Sheet", "report_type": "Balance Sheet",
"company": company, "company": company,

View File

@ -18,7 +18,7 @@ frappe.query_reports["Accounts Receivable"] = {
"get_query": function() { "get_query": function() {
var company = frappe.query_report.filters_by_name.company.get_value(); var company = frappe.query_report.filters_by_name.company.get_value();
return { return {
"query": "accounts.utils.get_account_list", "query": "erpnext.accounts.utils.get_account_list",
"filters": { "filters": {
"report_type": "Balance Sheet", "report_type": "Balance Sheet",
"company": company, "company": company,

View File

@ -23,7 +23,7 @@ frappe.query_reports["Bank Clearance Summary"] = {
"options": "Account", "options": "Account",
"get_query": function() { "get_query": function() {
return { return {
"query": "accounts.utils.get_account_list", "query": "erpnext.accounts.utils.get_account_list",
"filters": [ "filters": [
['Account', 'account_type', 'in', 'Bank, Cash'], ['Account', 'account_type', 'in', 'Bank, Cash'],
['Account', 'group_or_ledger', '=', 'Ledger'], ['Account', 'group_or_ledger', '=', 'Ledger'],

View File

@ -11,7 +11,7 @@ frappe.query_reports["Bank Reconciliation Statement"] = {
"reqd": 1, "reqd": 1,
"get_query": function() { "get_query": function() {
return { return {
"query": "accounts.utils.get_account_list", "query": "erpnext.accounts.utils.get_account_list",
"filters": [ "filters": [
['Account', 'account_type', 'in', 'Bank, Cash'], ['Account', 'account_type', 'in', 'Bank, Cash'],
['Account', 'group_or_ledger', '=', 'Ledger'], ['Account', 'group_or_ledger', '=', 'Ledger'],

View File

@ -30,7 +30,7 @@ frappe.query_reports["Item-wise Purchase Register"] = {
"get_query": function() { "get_query": function() {
var company = frappe.query_report.filters_by_name.company.get_value(); var company = frappe.query_report.filters_by_name.company.get_value();
return { return {
"query": "accounts.utils.get_account_list", "query": "erpnext.accounts.utils.get_account_list",
"filters": { "filters": {
"report_type": "Balance Sheet", "report_type": "Balance Sheet",
"company": company, "company": company,

View File

@ -24,7 +24,7 @@ frappe.query_reports["Item-wise Sales Register"] = frappe.query_reports["Sales R
"get_query": function() { "get_query": function() {
var company = frappe.query_report.filters_by_name.company.get_value(); var company = frappe.query_report.filters_by_name.company.get_value();
return { return {
"query": "accounts.utils.get_account_list", "query": "erpnext.accounts.utils.get_account_list",
"filters": { "filters": {
"report_type": "Balance Sheet", "report_type": "Balance Sheet",
"company": company, "company": company,

View File

@ -29,7 +29,7 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = {
options: "Account", options: "Account",
get_query: function() { get_query: function() {
return { return {
query: "accounts.utils.get_account_list", query: "erpnext.accounts.utils.get_account_list",
filters: { filters: {
"report_type": "Balance Sheet", "report_type": "Balance Sheet",
company: frappe.query_report.filters_by_name.company.get_value() company: frappe.query_report.filters_by_name.company.get_value()

View File

@ -24,7 +24,7 @@ frappe.query_reports["Purchase Register"] = {
"get_query": function() { "get_query": function() {
var company = frappe.query_report.filters_by_name.company.get_value(); var company = frappe.query_report.filters_by_name.company.get_value();
return { return {
"query": "accounts.utils.get_account_list", "query": "erpnext.accounts.utils.get_account_list",
"filters": { "filters": {
"report_type": "Balance Sheet", "report_type": "Balance Sheet",
"company": company, "company": company,

View File

@ -24,7 +24,7 @@ frappe.query_reports["Sales Register"] = {
"get_query": function() { "get_query": function() {
var company = frappe.query_report.filters_by_name.company.get_value(); var company = frappe.query_report.filters_by_name.company.get_value();
return { return {
"query": "accounts.utils.get_account_list", "query": "erpnext.accounts.utils.get_account_list",
"filters": { "filters": {
"report_type": "Balance Sheet", "report_type": "Balance Sheet",
"company": company, "company": company,

View File

@ -27,7 +27,7 @@ cur_frm.cscript.refresh = cur_frm.cscript.inspection_type;
cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) { cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
if (doc.purchase_receipt_no) { if (doc.purchase_receipt_no) {
return { return {
query: "buying.doctype.quality_inspection.quality_inspection.item_query", query: "erpnext.buying.doctype.quality_inspection.quality_inspection.item_query",
filters: { filters: {
"from": "Purchase Receipt Item", "from": "Purchase Receipt Item",
"parent": doc.purchase_receipt_no "parent": doc.purchase_receipt_no
@ -35,7 +35,7 @@ cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
} }
} else if (doc.delivery_note_no) { } else if (doc.delivery_note_no) {
return { return {
query: "buying.doctype.quality_inspection.quality_inspection.item_query", query: "erpnext.buying.doctype.quality_inspection.quality_inspection.item_query",
filters: { filters: {
"from": "Delivery Note Item", "from": "Delivery Note Item",
"parent": doc.delivery_note_no "parent": doc.delivery_note_no

View File

@ -9,7 +9,7 @@ erpnext.projects.Task = frappe.ui.form.Controller.extend({
setup: function() { setup: function() {
this.frm.fields_dict.project.get_query = function() { this.frm.fields_dict.project.get_query = function() {
return { return {
query: "projects.doctype.task.task.get_project" query: "erpnext.projects.doctype.task.task.get_project"
} }
}; };
}, },

View File

@ -7,7 +7,7 @@ cur_frm.add_fetch("time_log", "hours", "hours");
cur_frm.set_query("time_log", "time_log_batch_details", function(doc) { cur_frm.set_query("time_log", "time_log_batch_details", function(doc) {
return { return {
query: "projects.utils.get_time_log_list", query: "erpnext.projects.utils.get_time_log_list",
filters: { filters: {
"billable": 1, "billable": 1,
"status": "Submitted" "status": "Submitted"