added manifest, hooks and fixed requires webnotes/wnframework#351
This commit is contained in:
parent
1f84799f2d
commit
6de403f2be
18
MANIFEST.in
Normal file
18
MANIFEST.in
Normal file
@ -0,0 +1,18 @@
|
||||
include MANIFEST.in
|
||||
include requirements.txt
|
||||
include *.json
|
||||
include *.md
|
||||
include *.py
|
||||
include *.txt
|
||||
recursive-include erpnext *.css
|
||||
recursive-include erpnext *.csv
|
||||
recursive-include erpnext *.html
|
||||
recursive-include erpnext *.ico
|
||||
recursive-include erpnext *.js
|
||||
recursive-include erpnext *.json
|
||||
recursive-include erpnext *.md
|
||||
recursive-include erpnext *.png
|
||||
recursive-include erpnext *.py
|
||||
recursive-include erpnext *.svg
|
||||
recursive-include erpnext *.txt
|
||||
recursive-exclude * *.pyc
|
@ -6,9 +6,9 @@ cur_frm.cscript.fname = "entries";
|
||||
cur_frm.cscript.other_fname = "purchase_tax_details";
|
||||
|
||||
wn.provide("erpnext.accounts");
|
||||
wn.require('app/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js');
|
||||
wn.require('app/buying/doctype/purchase_common/purchase_common.js');
|
||||
wn.require('app/accounts/doctype/sales_invoice/pos.js');
|
||||
{% include 'buying/doctype/purchase_common/purchase_common.js' %};
|
||||
{% include 'accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js' %}
|
||||
{% include 'accounts/doctype/sales_invoice/pos.js' %}
|
||||
|
||||
erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
||||
onload: function() {
|
||||
@ -133,7 +133,7 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.fields_dict['entries'].grid.get_field("item_code").get_query = function(doc, cdt, cdn) {
|
||||
return {
|
||||
query:"controllers.queries.item_query",
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters:{
|
||||
'is_purchase_item': 'Yes'
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
//--------- ONLOAD -------------
|
||||
wn.require("app/js/controllers/accounts.js");
|
||||
{% include "public/js/controllers/accounts.js" %}
|
||||
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
|
||||
@ -139,7 +139,7 @@ cur_frm.cscript.row_id = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.set_query("account_head", "purchase_tax_details", function(doc) {
|
||||
return {
|
||||
query: "controllers.queries.tax_account_query",
|
||||
query: "erpnext.controllers.queries.tax_account_query",
|
||||
filters: {
|
||||
"account_type": ["Tax", "Chargeable", "Expense Account"],
|
||||
"debit_or_credit": "Debit",
|
||||
|
@ -9,10 +9,10 @@ cur_frm.cscript.sales_team_fname = "sales_team";
|
||||
// print heading
|
||||
cur_frm.pformat.print_heading = 'Invoice';
|
||||
|
||||
wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
|
||||
wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
||||
wn.require('app/selling/sales_common.js');
|
||||
wn.require('app/accounts/doctype/sales_invoice/pos.js');
|
||||
{% include 'selling/sales_common.js' %};
|
||||
{% include 'accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js' %}
|
||||
{% include 'utilities/doctype/sms_control/sms_control.js' %}
|
||||
{% include 'accounts/doctype/sales_invoice/pos.js' %}
|
||||
|
||||
wn.provide("erpnext.accounts");
|
||||
erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.extend({
|
||||
@ -115,7 +115,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
||||
};
|
||||
if(cur_frm.doc.customer) filters["customer"] = cur_frm.doc.customer;
|
||||
return {
|
||||
query: "controllers.queries.get_delivery_notes_to_be_billed",
|
||||
query: "erpnext.controllers.queries.get_delivery_notes_to_be_billed",
|
||||
filters: filters
|
||||
};
|
||||
}
|
||||
@ -324,7 +324,7 @@ cur_frm.fields_dict.write_off_cost_center.get_query = function(doc) {
|
||||
//--------------------------
|
||||
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
|
||||
return{
|
||||
query: "controllers.queries.get_project_name",
|
||||
query: "erpnext.controllers.queries.get_project_name",
|
||||
filters: {'customer': doc.customer}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
//--------- ONLOAD -------------
|
||||
|
||||
wn.require("app/js/controllers/accounts.js");
|
||||
{% include "public/js/controllers/accounts.js" %}
|
||||
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
if(doc.doctype === "Sales Taxes and Charges Master")
|
||||
@ -129,7 +129,7 @@ cur_frm.cscript.row_id = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.fields_dict['other_charges'].grid.get_field("account_head").get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
query: "controllers.queries.tax_account_query",
|
||||
query: "erpnext.controllers.queries.tax_account_query",
|
||||
filters: {
|
||||
"account_type": ["Tax", "Chargeable", "Income Account"],
|
||||
"debit_or_credit": "Credit",
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("app/js/account_tree_grid.js");
|
||||
wn.require("assets/erpnext/js/account_tree_grid.js");
|
||||
|
||||
wn.pages['financial-analytics'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("app/js/account_tree_grid.js");
|
||||
wn.require("assets/erpnext/js/account_tree_grid.js");
|
||||
|
||||
wn.pages['trial-balance'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("app/js/purchase_trends_filters.js");
|
||||
wn.require("assets/erpnext/js/purchase_trends_filters.js");
|
||||
|
||||
wn.query_reports["Purchase Invoice Trends"] = {
|
||||
filters: get_filters()
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("app/js/sales_trends_filters.js");
|
||||
wn.require("assets/erpnext/js/sales_trends_filters.js");
|
||||
|
||||
wn.query_reports["Sales Invoice Trends"] = {
|
||||
filters: get_filters()
|
||||
|
@ -7,8 +7,8 @@
|
||||
// cur_frm.cscript.fname - Details fieldname
|
||||
|
||||
wn.provide("erpnext.buying");
|
||||
wn.require("app/js/transaction.js");
|
||||
wn.require("app/js/controllers/accounts.js");
|
||||
wn.require("assets/erpnext/js/transaction.js");
|
||||
{% include "public/js/controllers/accounts.js" %}
|
||||
|
||||
erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
onload: function() {
|
||||
@ -37,18 +37,18 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
|
||||
if(this.frm.fields_dict.supplier) {
|
||||
this.frm.set_query("supplier", function() {
|
||||
return{ query:"controllers.queries.supplier_query" }});
|
||||
return{ query: "erpnext.controllers.queries.supplier_query" }});
|
||||
}
|
||||
|
||||
this.frm.set_query("item_code", this.frm.cscript.fname, function() {
|
||||
if(me.frm.doc.is_subcontracted == "Yes") {
|
||||
return{
|
||||
query:"controllers.queries.item_query",
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters:{ 'is_sub_contracted_item': 'Yes' }
|
||||
}
|
||||
} else {
|
||||
return{
|
||||
query: "controllers.queries.item_query",
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters: { 'is_purchase_item': 'Yes' }
|
||||
}
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ cur_frm.cscript.tname = "Purchase Order Item";
|
||||
cur_frm.cscript.fname = "po_details";
|
||||
cur_frm.cscript.other_fname = "purchase_tax_details";
|
||||
|
||||
wn.require('app/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js');
|
||||
wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
||||
wn.require('app/buying/doctype/purchase_common/purchase_common.js');
|
||||
wn.require('app/accounts/doctype/sales_invoice/pos.js');
|
||||
{% include 'buying/doctype/purchase_common/purchase_common.js' %};
|
||||
{% include 'accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js' %}
|
||||
{% include 'utilities/doctype/sms_control/sms_control.js' %}
|
||||
{% include 'accounts/doctype/sales_invoice/pos.js' %}
|
||||
|
||||
erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend({
|
||||
refresh: function(doc, cdt, cdn) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require('app/setup/doctype/contact_control/contact_control.js');
|
||||
{% include 'setup/doctype/contact_control/contact_control.js' %};
|
||||
|
||||
cur_frm.cscript.refresh = function(doc,dt,dn) {
|
||||
cur_frm.cscript.make_dashboard(doc);
|
||||
|
@ -7,9 +7,9 @@ cur_frm.cscript.fname = "quotation_items";
|
||||
cur_frm.cscript.other_fname = "purchase_tax_details";
|
||||
|
||||
// attach required files
|
||||
wn.require('app/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js');
|
||||
wn.require('app/buying/doctype/purchase_common/purchase_common.js');
|
||||
wn.require('app/accounts/doctype/sales_invoice/pos.js');
|
||||
{% include 'buying/doctype/purchase_common/purchase_common.js' %};
|
||||
{% include 'accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js' %}
|
||||
{% include 'accounts/doctype/sales_invoice/pos.js' %}
|
||||
|
||||
erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.extend({
|
||||
refresh: function() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("app/js/purchase_trends_filters.js");
|
||||
wn.require("assets/erpnext/js/purchase_trends_filters.js");
|
||||
|
||||
wn.query_reports["Purchase Order Trends"] = {
|
||||
filters: get_filters()
|
||||
|
10
erpnext/hooks.txt
Normal file
10
erpnext/hooks.txt
Normal file
@ -0,0 +1,10 @@
|
||||
app_name ERPNext
|
||||
|
||||
app_include_js assets/js/erpnext.min.js
|
||||
app_include_css assets/css/erpnext.css
|
||||
get_desktop_icons erpnext.manage.get_desktop_icons
|
||||
boot_session erpnext.startup.boot.boot_session
|
||||
|
||||
standard_queries Warehouse erpnext.stock.utils.get_warehouse_list
|
||||
standard_queries Customer erpnext.selling.utils.get_customer_list
|
||||
|
@ -71,5 +71,5 @@ cur_frm.cscript.calculate_total = function(doc,cdt,cdn){
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.employee_query" }
|
||||
return{ query: "erpnext.controllers.queries.employee_query" }
|
||||
}
|
@ -10,6 +10,6 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
query:"controllers.queries.employee_query"
|
||||
query: "erpnext.controllers.queries.employee_query"
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ erpnext.hr.EmployeeController = wn.ui.form.Controller.extend({
|
||||
this.frm.fields_dict.user_id.get_query = function(doc,cdt,cdn) {
|
||||
return { query:"core.doctype.profile.profile.profile_query"} }
|
||||
this.frm.fields_dict.reports_to.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.employee_query"} }
|
||||
return{ query: "erpnext.controllers.queries.employee_query"} }
|
||||
},
|
||||
|
||||
onload: function() {
|
||||
|
@ -55,7 +55,7 @@ cur_frm.cscript.onload = function(doc,cdt,cdn) {
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
query:"controllers.queries.employee_query"
|
||||
query: "erpnext.controllers.queries.employee_query"
|
||||
}
|
||||
}
|
||||
var exp_approver = doc.exp_approver;
|
||||
|
@ -68,6 +68,6 @@ calculate_total_leaves_allocated = function(doc, dt, dn) {
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
query:"controllers.queries.employee_query"
|
||||
query: "erpnext.controllers.queries.employee_query"
|
||||
}
|
||||
}
|
@ -123,6 +123,6 @@ cur_frm.cscript.validate = function(doc, dt, dn) {
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
query:"controllers.queries.employee_query"
|
||||
query: "erpnext.controllers.queries.employee_query"
|
||||
}
|
||||
}
|
||||
|
@ -60,5 +60,5 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) {
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.employee_query" }
|
||||
return{ query: "erpnext.controllers.queries.employee_query" }
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
|
||||
wn.require("public/app/js/utils.js");
|
||||
wn.require("assets/erpnext/js/utils.js");
|
||||
wn.provide("erpnext.hr");
|
||||
|
||||
erpnext.hr.AttendanceControlPanel = wn.ui.form.Controller.extend({
|
||||
|
@ -5,14 +5,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import webnotes
|
||||
|
||||
def get_hooks():
|
||||
return {
|
||||
"app_include_js": ["assets/js/erpnext.min.js"],
|
||||
"app_include_css": ["assets/css/erpnext.css"],
|
||||
"desktop_icons": get_desktop_icons(),
|
||||
"boot_session": ["erpnext.startup.boot.boot_session"]
|
||||
}
|
||||
|
||||
def after_install():
|
||||
import_defaults()
|
||||
import_country_and_currency()
|
||||
|
@ -167,7 +167,7 @@ var calculate_total = function(doc) {
|
||||
|
||||
cur_frm.fields_dict['item'].get_query = function(doc) {
|
||||
return{
|
||||
query:"controllers.queries.item_query",
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters:{
|
||||
'is_manufactured_item': 'Yes'
|
||||
}
|
||||
@ -184,7 +184,7 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, dt, dn) {
|
||||
|
||||
cur_frm.fields_dict['bom_materials'].grid.get_field('item_code').get_query = function(doc) {
|
||||
return{
|
||||
query:"controllers.queries.item_query"
|
||||
query: "erpnext.controllers.queries.item_query"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ cur_frm.cscript.refresh = function(doc) {
|
||||
|
||||
cur_frm.set_query("current_bom", function(doc) {
|
||||
return{
|
||||
query:"controllers.queries.bom",
|
||||
query: "erpnext.controllers.queries.bom",
|
||||
filters: {name: "!" + doc.new_bom}
|
||||
}
|
||||
});
|
||||
@ -16,7 +16,7 @@ cur_frm.set_query("current_bom", function(doc) {
|
||||
|
||||
cur_frm.set_query("new_bom", function(doc) {
|
||||
return{
|
||||
query:"controllers.queries.bom",
|
||||
query: "erpnext.controllers.queries.bom",
|
||||
filters: {name: "!" + doc.current_bom}
|
||||
}
|
||||
});
|
@ -102,7 +102,7 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, dt, dn) {
|
||||
cur_frm.set_query("bom_no", function(doc) {
|
||||
if (doc.production_item) {
|
||||
return{
|
||||
query:"controllers.queries.bom",
|
||||
query: "erpnext.controllers.queries.bom",
|
||||
filters: {item: cstr(doc.production_item)}
|
||||
}
|
||||
} else msgprint(wn._("Please enter Production Item first"));
|
||||
|
@ -41,7 +41,7 @@ cur_frm.fields_dict['pp_details'].grid.get_field('bom_no').get_query = function(
|
||||
var d = locals[this.doctype][this.docname];
|
||||
if (d.item_code) {
|
||||
return {
|
||||
query:"controllers.queries.bom",
|
||||
query: "erpnext.controllers.queries.bom",
|
||||
filters:{'item': cstr(d.item_code)}
|
||||
}
|
||||
} else msgprint(wn._("Please enter Item first"));
|
||||
@ -49,7 +49,7 @@ cur_frm.fields_dict['pp_details'].grid.get_field('bom_no').get_query = function(
|
||||
|
||||
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
query:"controllers.queries.customer_query"
|
||||
query: "erpnext.controllers.queries.customer_query"
|
||||
}
|
||||
}
|
||||
|
||||
|
0
erpnext/patches.txt
Normal file
0
erpnext/patches.txt
Normal file
@ -17,6 +17,6 @@ cur_frm.cscript.refresh = function(doc) {
|
||||
|
||||
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
query:"controllers.queries.customer_query"
|
||||
query: "erpnext.controllers.queries.customer_query"
|
||||
}
|
||||
}
|
@ -12,5 +12,5 @@
|
||||
"public/js/feature_setup.js",
|
||||
"public/js/utils.js",
|
||||
"public/js/queries.js"
|
||||
]
|
||||
],
|
||||
}
|
||||
|
@ -9,27 +9,27 @@ $.extend(erpnext.queries, {
|
||||
},
|
||||
|
||||
lead: function() {
|
||||
return { query: "controllers.queries.lead_query" };
|
||||
return { query: "erpnext.controllers.queries.lead_query" };
|
||||
},
|
||||
|
||||
customer: function() {
|
||||
return { query: "controllers.queries.customer_query" };
|
||||
return { query: "erpnext.controllers.queries.customer_query" };
|
||||
},
|
||||
|
||||
supplier: function() {
|
||||
return { query: "controllers.queries.supplier_query" };
|
||||
return { query: "erpnext.controllers.queries.supplier_query" };
|
||||
},
|
||||
|
||||
account: function() {
|
||||
return { query: "controllers.queries.account_query" };
|
||||
return { query: "erpnext.controllers.queries.account_query" };
|
||||
},
|
||||
|
||||
item: function() {
|
||||
return { query: "controllers.queries.item_query" };
|
||||
return { query: "erpnext.controllers.queries.item_query" };
|
||||
},
|
||||
|
||||
bom: function() {
|
||||
return { query: "controllers.queries.bom" };
|
||||
return { query: "erpnext.controllers.queries.bom" };
|
||||
},
|
||||
|
||||
task: function() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("app/js/stock_grid_report.js");
|
||||
wn.require("assets/erpnext/js/stock_grid_report.js");
|
||||
|
||||
erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
||||
init: function(wrapper, opts) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.provide("erpnext");
|
||||
wn.require("app/js/controllers/stock_controller.js");
|
||||
wn.require("assets/erpnext/js/controllers/stock_controller.js");
|
||||
|
||||
erpnext.TransactionController = erpnext.stock.StockController.extend({
|
||||
onload: function() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require('app/setup/doctype/contact_control/contact_control.js');
|
||||
{% include 'setup/doctype/contact_control/contact_control.js' %};
|
||||
|
||||
cur_frm.cscript.onload = function(doc,dt,dn){
|
||||
cur_frm.cscript.load_defaults(doc, dt, dn);
|
||||
@ -116,7 +116,7 @@ cur_frm.fields_dict['customer_group'].get_query = function(doc,dt,dn) {
|
||||
|
||||
cur_frm.fields_dict.lead_name.get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
query:"controllers.queries.lead_query"
|
||||
query: "erpnext.controllers.queries.lead_query"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ erpnext.selling.InstallationNote = wn.ui.form.Controller.extend({
|
||||
|
||||
this.frm.set_query("customer", function() {
|
||||
return {
|
||||
query: "controllers.queries.customer_query"
|
||||
query: "erpnext.controllers.queries.customer_query"
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -1,14 +1,14 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
||||
wn.require('app/setup/doctype/contact_control/contact_control.js');
|
||||
{% include 'setup/doctype/contact_control/contact_control.js' %};
|
||||
{% include 'utilities/doctype/sms_control/sms_control.js' %}
|
||||
|
||||
wn.provide("erpnext");
|
||||
erpnext.LeadController = wn.ui.form.Controller.extend({
|
||||
setup: function() {
|
||||
this.frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return { query:"controllers.queries.customer_query" } }
|
||||
return { query: "erpnext.controllers.queries.customer_query" } }
|
||||
},
|
||||
|
||||
onload: function() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
||||
{% include 'utilities/doctype/sms_control/sms_control.js' %};
|
||||
|
||||
wn.provide("erpnext.selling");
|
||||
// TODO commonify this code
|
||||
@ -60,7 +60,7 @@ erpnext.selling.Opportunity = wn.ui.form.Controller.extend({
|
||||
|
||||
this.frm.set_query("item_code", "enquiry_details", function() {
|
||||
return {
|
||||
query: "controllers.queries.item_query",
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters: me.frm.doc.enquiry_type === "Maintenance" ?
|
||||
{"is_service_item": "Yes"} : {"is_sales_item": "Yes"}
|
||||
};
|
||||
|
@ -8,10 +8,10 @@ cur_frm.cscript.fname = "quotation_details";
|
||||
cur_frm.cscript.other_fname = "other_charges";
|
||||
cur_frm.cscript.sales_team_fname = "sales_team";
|
||||
|
||||
wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
|
||||
wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
||||
wn.require('app/selling/sales_common.js');
|
||||
wn.require('app/accounts/doctype/sales_invoice/pos.js');
|
||||
{% include 'selling/sales_common.js' %}
|
||||
{% include 'accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js' %}
|
||||
{% include 'utilities/doctype/sms_control/sms_control.js' %}
|
||||
{% include 'accounts/doctype/sales_invoice/pos.js' %}
|
||||
|
||||
erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
||||
onload: function(doc, dt, dn) {
|
||||
@ -90,7 +90,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
||||
cur_frm.script_manager.make(erpnext.selling.QuotationController);
|
||||
|
||||
cur_frm.fields_dict.lead.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.lead_query" } }
|
||||
return{ query: "erpnext.controllers.queries.lead_query" } }
|
||||
|
||||
cur_frm.cscript.lead = function(doc, cdt, cdn) {
|
||||
if(doc.lead) {
|
||||
|
@ -8,11 +8,10 @@ cur_frm.cscript.fname = "sales_order_details";
|
||||
cur_frm.cscript.other_fname = "other_charges";
|
||||
cur_frm.cscript.sales_team_fname = "sales_team";
|
||||
|
||||
|
||||
wn.require('app/selling/sales_common.js');
|
||||
wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
|
||||
wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
||||
wn.require('app/accounts/doctype/sales_invoice/pos.js');
|
||||
{% include 'selling/sales_common.js' %}
|
||||
{% include 'accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js' %}
|
||||
{% include 'utilities/doctype/sms_control/sms_control.js' %}
|
||||
{% include 'accounts/doctype/sales_invoice/pos.js' %}
|
||||
|
||||
erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend({
|
||||
refresh: function(doc, dt, dn) {
|
||||
@ -148,7 +147,7 @@ cur_frm.cscript.new_contact = function(){
|
||||
|
||||
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
|
||||
return {
|
||||
query: "controllers.queries.get_project_name",
|
||||
query: "erpnext.controllers.queries.get_project_name",
|
||||
filters: {
|
||||
'customer': doc.customer
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("app/js/sales_trends_filters.js");
|
||||
wn.require("assets/erpnext/js/sales_trends_filters.js");
|
||||
|
||||
wn.query_reports["Quotation Trends"] = {
|
||||
filters: get_filters()
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("app/js/sales_trends_filters.js");
|
||||
wn.require("assets/erpnext/js/sales_trends_filters.js");
|
||||
|
||||
wn.query_reports["Sales Order Trends"] = {
|
||||
filters: get_filters()
|
||||
|
@ -5,12 +5,12 @@
|
||||
// ------
|
||||
// cur_frm.cscript.tname - Details table name
|
||||
// cur_frm.cscript.fname - Details fieldname
|
||||
// cur_frm.cscript.other_fname - wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js'); fieldname
|
||||
// cur_frm.cscript.other_fname - fieldname
|
||||
// cur_frm.cscript.sales_team_fname - Sales Team fieldname
|
||||
|
||||
wn.provide("erpnext.selling");
|
||||
wn.require("app/js/transaction.js");
|
||||
wn.require("app/js/controllers/accounts.js");
|
||||
wn.require("assets/erpnext/js/transaction.js");
|
||||
{% include "public/js/controllers/accounts.js" %}
|
||||
|
||||
erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
onload: function() {
|
||||
@ -59,7 +59,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
if(this.frm.fields_dict[this.fname].grid.get_field('item_code')) {
|
||||
this.frm.set_query("item_code", this.fname, function() {
|
||||
return {
|
||||
query: "controllers.queries.item_query",
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters: (me.frm.doc.order_type === "Maintenance" ?
|
||||
{'is_service_item': 'Yes'}:
|
||||
{'is_sales_item': 'Yes' })
|
||||
|
@ -100,7 +100,7 @@ cur_frm.fields_dict['master_name'].get_query = function(doc){
|
||||
else if(doc.based_on == 'Itemwise Discount')
|
||||
return {
|
||||
doctype: "Item",
|
||||
query: "controllers.queries.item_query"
|
||||
query: "erpnext.controllers.queries.item_query"
|
||||
}
|
||||
else
|
||||
return {
|
||||
@ -111,4 +111,4 @@ cur_frm.fields_dict['master_name'].get_query = function(doc){
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.to_emp.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.employee_query" } }
|
||||
return{ query: "erpnext.controllers.queries.employee_query" } }
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require('app/setup/doctype/contact_control/contact_control.js');
|
||||
{% include 'setup/doctype/contact_control/contact_control.js' %};
|
||||
|
||||
cur_frm.cscript.onload = function(doc,dt,dn){
|
||||
|
||||
|
@ -37,4 +37,4 @@ cur_frm.fields_dict['target_details'].grid.get_field("item_group").get_query = f
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.employee.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.employee_query" } }
|
||||
return{ query: "erpnext.controllers.queries.employee_query" } }
|
@ -165,8 +165,8 @@ def set_defaults(args):
|
||||
|
||||
def create_feed_and_todo():
|
||||
"""update activty feed and create todo for creation of item, customer, vendor"""
|
||||
import home
|
||||
home.make_feed('Comment', 'ToDo', '', webnotes.session['user'],
|
||||
from erpnext.home import make_feed
|
||||
make_feed('Comment', 'ToDo', '', webnotes.session['user'],
|
||||
'ERNext Setup Complete!', '#6B24B3')
|
||||
|
||||
def create_email_digest():
|
||||
|
@ -4,7 +4,8 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
import home
|
||||
|
||||
from erpnext.home import make_feed
|
||||
|
||||
def on_login_post_session(login_manager):
|
||||
"""
|
||||
@ -25,7 +26,7 @@ def on_login_post_session(login_manager):
|
||||
from webnotes.utils import nowtime
|
||||
from webnotes.profile import get_user_fullname
|
||||
webnotes.conn.begin()
|
||||
home.make_feed('Login', 'Profile', login_manager.user, login_manager.user,
|
||||
make_feed('Login', 'Profile', login_manager.user, login_manager.user,
|
||||
'%s logged in at %s' % (get_user_fullname(login_manager.user), nowtime()),
|
||||
login_manager.user=='Administrator' and '#8CA2B3' or '#1B750D')
|
||||
webnotes.conn.commit()
|
||||
@ -66,6 +67,6 @@ def check_if_expired():
|
||||
|
||||
def comment_added(doc):
|
||||
"""add comment to feed"""
|
||||
home.make_feed('Comment', doc.comment_doctype, doc.comment_docname, doc.comment_by,
|
||||
make_feed('Comment', doc.comment_doctype, doc.comment_docname, doc.comment_by,
|
||||
'<i>"' + doc.comment + '"</i>', '#6B24B3')
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
standard_queries = {
|
||||
"Warehouse": "stock.utils.get_warehouse_list",
|
||||
"Customer": "selling.utils.get_customer_list",
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
|
||||
cur_frm.fields_dict['item'].get_query = function(doc, cdt, cdn) {
|
||||
return {
|
||||
query:"controllers.queries.item_query",
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters:{
|
||||
'is_stock_item': 'Yes'
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ cur_frm.cscript.fname = "delivery_note_details";
|
||||
cur_frm.cscript.other_fname = "other_charges";
|
||||
cur_frm.cscript.sales_team_fname = "sales_team";
|
||||
|
||||
wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js');
|
||||
wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
||||
wn.require('app/selling/sales_common.js');
|
||||
wn.require('app/accounts/doctype/sales_invoice/pos.js');
|
||||
{% include 'selling/sales_common.js' %};
|
||||
{% include 'accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js' %}
|
||||
{% include 'utilities/doctype/sms_control/sms_control.js' %}
|
||||
{% include 'accounts/doctype/sales_invoice/pos.js' %}
|
||||
|
||||
wn.provide("erpnext.stock");
|
||||
erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend({
|
||||
@ -106,7 +106,7 @@ cur_frm.cscript.new_contact = function(){
|
||||
// ***************** Get project name *****************
|
||||
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
|
||||
return {
|
||||
query: "controllers.queries.get_project_name",
|
||||
query: "erpnext.controllers.queries.get_project_name",
|
||||
filters: {
|
||||
'customer': doc.customer
|
||||
}
|
||||
|
@ -151,11 +151,11 @@ cur_frm.cscript.validate = function(doc,cdt,cdn){
|
||||
|
||||
cur_frm.fields_dict.item_customer_details.grid.get_field("customer_name").get_query =
|
||||
function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.customer_query" } }
|
||||
return{ query: "erpnext.controllers.queries.customer_query" } }
|
||||
|
||||
cur_frm.fields_dict.item_supplier_details.grid.get_field("supplier").get_query =
|
||||
function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.supplier_query" } }
|
||||
return{ query: "erpnext.controllers.queries.supplier_query" } }
|
||||
|
||||
cur_frm.cscript.copy_from_item_group = function(doc) {
|
||||
wn.model.with_doc("Item Group", doc.item_group, function() {
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
wn.provide("erpnext.stock");
|
||||
wn.require("public/app/js/controllers/stock_controller.js");
|
||||
wn.require("assets/erpnext/js/controllers/stock_controller.js");
|
||||
|
||||
erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({
|
||||
setup: function() {
|
||||
|
@ -4,8 +4,8 @@
|
||||
cur_frm.cscript.tname = "Material Request Item";
|
||||
cur_frm.cscript.fname = "indent_details";
|
||||
|
||||
wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
||||
wn.require('app/buying/doctype/purchase_common/purchase_common.js');
|
||||
{% include 'buying/doctype/purchase_common/purchase_common.js' %};
|
||||
{% include 'utilities/doctype/sms_control/sms_control.js' %}
|
||||
|
||||
erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.extend({
|
||||
refresh: function(doc) {
|
||||
|
@ -5,10 +5,10 @@ cur_frm.cscript.tname = "Purchase Receipt Item";
|
||||
cur_frm.cscript.fname = "purchase_receipt_details";
|
||||
cur_frm.cscript.other_fname = "purchase_tax_details";
|
||||
|
||||
wn.require('app/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js');
|
||||
wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
||||
wn.require('app/buying/doctype/purchase_common/purchase_common.js');
|
||||
wn.require('app/accounts/doctype/sales_invoice/pos.js');
|
||||
{% include 'buying/doctype/purchase_common/purchase_common.js' %};
|
||||
{% include 'accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js' %}
|
||||
{% include 'utilities/doctype/sms_control/sms_control.js' %}
|
||||
{% include 'accounts/doctype/sales_invoice/pos.js' %}
|
||||
|
||||
wn.provide("erpnext.stock");
|
||||
erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend({
|
||||
|
@ -4,7 +4,7 @@
|
||||
cur_frm.cscript.tname = "Stock Entry Detail";
|
||||
cur_frm.cscript.fname = "mtn_details";
|
||||
|
||||
wn.require("public/app/js/controllers/stock_controller.js");
|
||||
wn.require("assets/erpnext/js/controllers/stock_controller.js");
|
||||
wn.provide("erpnext.stock");
|
||||
|
||||
erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
@ -386,9 +386,9 @@ cur_frm.cscript.cost_center = function(doc, cdt, cdn) {
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.customer.get_query = function(doc, cdt, cdn) {
|
||||
return{ query:"controllers.queries.customer_query" }
|
||||
return{ query: "erpnext.controllers.queries.customer_query" }
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.supplier.get_query = function(doc, cdt, cdn) {
|
||||
return{ query:"controllers.queries.supplier_query" }
|
||||
return{ query: "erpnext.controllers.queries.supplier_query" }
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("public/app/js/controllers/stock_controller.js");
|
||||
wn.require("assets/erpnext/js/controllers/stock_controller.js");
|
||||
wn.provide("erpnext.stock");
|
||||
|
||||
erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
|
||||
|
@ -16,7 +16,7 @@ wn.pages['stock-ageing'].onload = function(wrapper) {
|
||||
|
||||
}
|
||||
|
||||
wn.require("app/js/stock_grid_report.js");
|
||||
wn.require("assets/erpnext/js/stock_grid_report.js");
|
||||
|
||||
erpnext.StockAgeing = erpnext.StockGridReport.extend({
|
||||
init: function(wrapper) {
|
||||
|
@ -16,4 +16,4 @@ wn.pages['stock-analytics'].onload = function(wrapper) {
|
||||
|
||||
}
|
||||
|
||||
wn.require("app/js/stock_analytics.js");
|
||||
wn.require("assets/erpnext/js/stock_analytics.js");
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("app/js/stock_analytics.js");
|
||||
wn.require("assets/erpnext/js/stock_analytics.js");
|
||||
|
||||
wn.pages['stock-balance'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
|
@ -12,7 +12,7 @@ wn.pages['stock-ledger'].onload = function(wrapper) {
|
||||
wrapper.appframe.add_module_icon("Stock")
|
||||
}
|
||||
|
||||
wn.require("app/js/stock_grid_report.js");
|
||||
wn.require("assets/erpnext/js/stock_grid_report.js");
|
||||
|
||||
erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
init: function(wrapper) {
|
||||
|
@ -15,7 +15,7 @@ wn.pages['stock-level'].onload = function(wrapper) {
|
||||
;
|
||||
}
|
||||
|
||||
wn.require("app/js/stock_grid_report.js");
|
||||
wn.require("assets/erpnext/js/stock_grid_report.js");
|
||||
|
||||
erpnext.StockLevel = erpnext.StockGridReport.extend({
|
||||
init: function(wrapper) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("app/js/sales_trends_filters.js");
|
||||
wn.require("assets/erpnext/js/sales_trends_filters.js");
|
||||
|
||||
wn.query_reports["Delivery Note Trends"] = {
|
||||
filters: get_filters()
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("app/js/purchase_trends_filters.js");
|
||||
wn.require("assets/erpnext/js/purchase_trends_filters.js");
|
||||
|
||||
wn.query_reports["Purchase Receipt Trends"] = {
|
||||
filters: get_filters()
|
||||
|
@ -103,4 +103,4 @@ cur_frm.add_fetch('item_code', 'description', 'description');
|
||||
|
||||
|
||||
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.customer_query" } }
|
||||
return{ query: "erpnext.controllers.queries.customer_query" } }
|
||||
|
@ -108,4 +108,4 @@ cur_frm.cscript.generate_schedule = function(doc, cdt, cdn) {
|
||||
}
|
||||
|
||||
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.customer_query" } }
|
||||
return{ query: "erpnext.controllers.queries.customer_query" } }
|
||||
|
@ -104,5 +104,5 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) {
|
||||
|
||||
|
||||
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return {query: "controllers.queries.customer_query" }
|
||||
return {query: "erpnext.controllers.queries.customer_query" }
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return{ query:"controllers.queries.customer_query" } }
|
||||
return{ query: "erpnext.controllers.queries.customer_query" } }
|
||||
|
||||
wn.provide("erpnext.support");
|
||||
// TODO commonify this code
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require('app/controllers/js/contact_address_common.js');
|
||||
{% include 'controllers/js/contact_address_common.js' %};
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require('app/controllers/js/contact_address_common.js');
|
||||
{% include 'controllers/js/contact_address_common.js' %};
|
||||
|
||||
cur_frm.cscript.refresh = function(doc) {
|
||||
cur_frm.communication_view = new wn.views.CommunicationList({
|
||||
|
Loading…
x
Reference in New Issue
Block a user