mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
[cleanup] rename "links" to "dashboard"
This commit is contained in:
@@ -29,8 +29,6 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
cur_frm.msgbox.hide();
|
cur_frm.msgbox.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.dashboard.reset();
|
|
||||||
|
|
||||||
this.frm.toggle_reqd("due_date", !this.frm.doc.is_return);
|
this.frm.toggle_reqd("due_date", !this.frm.doc.is_return);
|
||||||
|
|
||||||
this.show_general_ledger();
|
this.show_general_ledger();
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
|||||||
refresh: function(doc, cdt, cdn) {
|
refresh: function(doc, cdt, cdn) {
|
||||||
var me = this;
|
var me = this;
|
||||||
this._super();
|
this._super();
|
||||||
// this.frm.dashboard.reset();
|
|
||||||
var allow_receipt = false;
|
var allow_receipt = false;
|
||||||
var is_drop_ship = false;
|
var is_drop_ship = false;
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ frappe.ui.form.on("Request for Quotation",{
|
|||||||
|
|
||||||
refresh: function(frm, cdt, cdn) {
|
refresh: function(frm, cdt, cdn) {
|
||||||
if (frm.doc.docstatus === 1) {
|
if (frm.doc.docstatus === 1) {
|
||||||
frm.dashboard.show_dashboard();
|
|
||||||
frm.add_custom_button(__("Make"),
|
frm.add_custom_button(__("Make"),
|
||||||
function(){ frm.trigger("make_suppplier_quotation") }, __("Supplier Quotation"));
|
function(){ frm.trigger("make_suppplier_quotation") }, __("Supplier Quotation"));
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
links = {
|
data = {
|
||||||
|
'docstatus': 1,
|
||||||
'fieldname': 'request_for_quotation',
|
'fieldname': 'request_for_quotation',
|
||||||
# 'non_standard_fieldnames': {
|
# 'non_standard_fieldnames': {
|
||||||
# 'Purchase Order': 'prevdoc_detail_docname',
|
# 'Purchase Order': 'prevdoc_detail_docname',
|
||||||
@@ -6,10 +6,6 @@ frappe.ui.form.on("Supplier", {
|
|||||||
frappe.setup_language_field(frm);
|
frappe.setup_language_field(frm);
|
||||||
},
|
},
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
frm.dashboard.show_heatmap = true;
|
|
||||||
frm.dashboard.heatmap_message = __('This is based on transactions against this Supplier. See timeline below for details');
|
|
||||||
frm.dashboard.show_dashboard();
|
|
||||||
|
|
||||||
if(frappe.defaults.get_default("supp_master_name")!="Naming Series") {
|
if(frappe.defaults.get_default("supp_master_name")!="Naming Series") {
|
||||||
frm.toggle_display("naming_series", false);
|
frm.toggle_display("naming_series", false);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
links = {
|
data = {
|
||||||
|
'heatmap': True,
|
||||||
|
'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'),
|
||||||
'fieldname': 'supplier',
|
'fieldname': 'supplier',
|
||||||
'transactions': [
|
'transactions': [
|
||||||
{
|
{
|
||||||
11
erpnext/crm/doctype/opportunity/opportunity_dashboard.py
Normal file
11
erpnext/crm/doctype/opportunity/opportunity_dashboard.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
from frappe import _
|
||||||
|
|
||||||
|
data = {
|
||||||
|
'fieldname': 'prevdoc_docname',
|
||||||
|
'transactions': [
|
||||||
|
{
|
||||||
|
'label': _('Related Documents'),
|
||||||
|
'items': ['Quotation']
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -24,9 +24,6 @@ erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({
|
|||||||
refresh: function() {
|
refresh: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
erpnext.toggle_naming_series();
|
erpnext.toggle_naming_series();
|
||||||
this.frm.dashboard.show_heatmap = true;
|
|
||||||
this.frm.dashboard.heatmap_message = __('This is based on the attendance of this Employee');
|
|
||||||
this.frm.dashboard.show_dashboard();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
date_of_birth: function() {
|
date_of_birth: function() {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
links = {
|
data = {
|
||||||
|
'heatmap': True,
|
||||||
|
'heatmap_message': _('This is based on the attendance of this Employee'),
|
||||||
'fieldname': 'employee',
|
'fieldname': 'employee',
|
||||||
'transactions': [
|
'transactions': [
|
||||||
{
|
{
|
||||||
@@ -66,10 +66,6 @@ frappe.ui.form.on("Project", {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
show_dashboard: function(frm) {
|
show_dashboard: function(frm) {
|
||||||
frm.dashboard.show_heatmap = true;
|
|
||||||
frm.dashboard.heatmap_message = __('This is based on the Time Sheet created against this project');
|
|
||||||
frm.dashboard.show_dashboard();
|
|
||||||
|
|
||||||
if(frm.doc.__onload.activity_summary.length) {
|
if(frm.doc.__onload.activity_summary.length) {
|
||||||
var hours = $.map(frm.doc.__onload.activity_summary, function(d) { return d.total_hours });
|
var hours = $.map(frm.doc.__onload.activity_summary, function(d) { return d.total_hours });
|
||||||
var max_count = Math.max.apply(null, hours);
|
var max_count = Math.max.apply(null, hours);
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
links = {
|
data = {
|
||||||
|
'heatmap': True,
|
||||||
|
'heatmap_message': _('This is based on the Time Sheets created against this project'),
|
||||||
'fieldname': 'project',
|
'fieldname': 'project',
|
||||||
'transactions': [
|
'transactions': [
|
||||||
{
|
{
|
||||||
@@ -6,10 +6,6 @@ frappe.ui.form.on("Customer", {
|
|||||||
frappe.setup_language_field(frm);
|
frappe.setup_language_field(frm);
|
||||||
},
|
},
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
frm.dashboard.show_heatmap = true;
|
|
||||||
frm.dashboard.heatmap_message = __('This is based on transactions against this Customer. See timeline below for details');
|
|
||||||
frm.dashboard.show_dashboard();
|
|
||||||
|
|
||||||
if(frappe.defaults.get_default("cust_master_name")!="Naming Series") {
|
if(frappe.defaults.get_default("cust_master_name")!="Naming Series") {
|
||||||
frm.toggle_display("naming_series", false);
|
frm.toggle_display("naming_series", false);
|
||||||
} else {
|
} else {
|
||||||
@@ -45,7 +41,7 @@ cur_frm.cscript.load_defaults = function(doc, dt, dn) {
|
|||||||
if(fields_to_refresh) { refresh_many(fields_to_refresh); }
|
if(fields_to_refresh) { refresh_many(fields_to_refresh); }
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.add_fetch('lead_name', 'company_name', 'customer_name');
|
cur_frm.add_fetch('lead_name', ('company_name', 'customer_name');
|
||||||
cur_frm.add_fetch('default_sales_partner','commission_rate','default_commission_rate');
|
cur_frm.add_fetch('default_sales_partner','commission_rate','default_commission_rate');
|
||||||
|
|
||||||
cur_frm.fields_dict['customer_group'].get_query = function(doc, dt, dn) {
|
cur_frm.fields_dict['customer_group'].get_query = function(doc, dt, dn) {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
links = {
|
data = {
|
||||||
|
'heatmap': True,
|
||||||
|
'heatmap_message': _('This is based on transactions against this Customer. See timeline below for details'),
|
||||||
'fieldname': 'customer',
|
'fieldname': 'customer',
|
||||||
'transactions': [
|
'transactions': [
|
||||||
{
|
{
|
||||||
@@ -18,7 +18,6 @@ frappe.ui.form.on("Sales Order", {
|
|||||||
erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend({
|
erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend({
|
||||||
refresh: function(doc, dt, dn) {
|
refresh: function(doc, dt, dn) {
|
||||||
this._super();
|
this._super();
|
||||||
this.frm.dashboard.reset();
|
|
||||||
var allow_purchase = false;
|
var allow_purchase = false;
|
||||||
var allow_delivery = false;
|
var allow_delivery = false;
|
||||||
|
|
||||||
|
|||||||
@@ -198,15 +198,9 @@ $.extend(erpnext.item, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
make_dashboard: function(frm) {
|
make_dashboard: function(frm) {
|
||||||
frm.dashboard.reset();
|
|
||||||
if(frm.doc.__islocal)
|
if(frm.doc.__islocal)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
frm.dashboard.show_heatmap = frm.doc.is_stock_item;
|
|
||||||
frm.dashboard.heatmap_message = __('This is based on stock movement. See {0} for details',
|
|
||||||
['<a href="#query-report/Stock Ledger">' + __('Stock Ledger') + '</a>']);
|
|
||||||
frm.dashboard.show_dashboard();
|
|
||||||
|
|
||||||
frappe.require('assets/js/item-dashboard.min.js', function() {
|
frappe.require('assets/js/item-dashboard.min.js', function() {
|
||||||
var section = frm.dashboard.add_section('<h5 style="margin-top: 0px;"><a href="#stock-balance">Stock Levels</a></h5>');
|
var section = frm.dashboard.add_section('<h5 style="margin-top: 0px;"><a href="#stock-balance">Stock Levels</a></h5>');
|
||||||
erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({
|
erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
links = {
|
data = {
|
||||||
|
'heatmap': True,
|
||||||
|
'heatmap_message': _('This is based on stock movement. See {0} for details')\
|
||||||
|
.format('<a href="#query-report/Stock Ledger">' + _('Stock Ledger') + '</a>'),
|
||||||
'fieldname': 'item_code',
|
'fieldname': 'item_code',
|
||||||
'non_standard_fieldnames': {
|
'non_standard_fieldnames': {
|
||||||
'Production Order': 'production_item',
|
'Production Order': 'production_item',
|
||||||
@@ -49,9 +49,6 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(doc.docstatus == 1 && doc.status != 'Stopped') {
|
if(doc.docstatus == 1 && doc.status != 'Stopped') {
|
||||||
|
|
||||||
// this.frm.dashboard.show_dashboard();
|
|
||||||
|
|
||||||
if(flt(doc.per_ordered, 2) < 100) {
|
if(flt(doc.per_ordered, 2) < 100) {
|
||||||
// make
|
// make
|
||||||
if(doc.material_request_type === "Material Transfer" && doc.status === "Submitted")
|
if(doc.material_request_type === "Material Transfer" && doc.status === "Submitted")
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
links = {
|
data = {
|
||||||
|
'docstatus': 1,
|
||||||
'fieldname': 'material_request',
|
'fieldname': 'material_request',
|
||||||
'non_standard_fieldnames': {
|
'non_standard_fieldnames': {
|
||||||
'Purchase Order': 'prevdoc_detail_docname',
|
'Purchase Order': 'prevdoc_detail_docname',
|
||||||
Reference in New Issue
Block a user