[email] remove communicationlist #561
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index c2e76e2..0b4b2c1 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -10,6 +10,8 @@
frappe.require("assets/erpnext/js/transaction.js");
{% include "public/js/controllers/accounts.js" %}
+cur_frm.email_field = "contact_email";
+
erpnext.buying.BuyingController = erpnext.TransactionController.extend({
onload: function() {
this.setup_queries();
diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index b5c7fb1..5339067 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -20,13 +20,7 @@
// make lists
cur_frm.cscript.make_address(doc,dt,dn);
cur_frm.cscript.make_contact(doc,dt,dn);
-
- cur_frm.communication_view = new frappe.views.CommunicationList({
- list: frappe.get_list("Communication", {"supplier": doc.name}),
- parent: cur_frm.fields_dict.communication_html.wrapper,
- doc: doc
- })
- }
+ }
}
cur_frm.cscript.make_dashboard = function(doc) {
diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json
index 1d21778..2c2fbff 100644
--- a/erpnext/buying/doctype/supplier/supplier.json
+++ b/erpnext/buying/doctype/supplier/supplier.json
@@ -1,260 +1,244 @@
{
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "naming_series:",
- "creation": "2013-01-10 16:34:11",
- "description": "Supplier of Goods or Services.",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Master",
+ "allow_import": 1,
+ "allow_rename": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-01-10 16:34:11",
+ "description": "Supplier of Goods or Services.",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Master",
"fields": [
{
- "fieldname": "basic_info",
- "fieldtype": "Section Break",
- "label": "Basic Info",
- "oldfieldtype": "Section Break",
- "options": "icon-user",
+ "fieldname": "basic_info",
+ "fieldtype": "Section Break",
+ "label": "Basic Info",
+ "oldfieldtype": "Section Break",
+ "options": "icon-user",
"permlevel": 0
- },
+ },
{
- "fieldname": "naming_series",
- "fieldtype": "Select",
- "label": "Series",
- "no_copy": 1,
- "oldfieldname": "naming_series",
- "oldfieldtype": "Select",
- "options": "SUPP-",
+ "fieldname": "naming_series",
+ "fieldtype": "Select",
+ "label": "Series",
+ "no_copy": 1,
+ "oldfieldname": "naming_series",
+ "oldfieldtype": "Select",
+ "options": "SUPP-",
"permlevel": 0
- },
+ },
{
- "fieldname": "supplier_name",
- "fieldtype": "Data",
- "in_list_view": 1,
- "label": "Supplier Name",
- "no_copy": 1,
- "oldfieldname": "supplier_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
+ "fieldname": "supplier_name",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Supplier Name",
+ "no_copy": 1,
+ "oldfieldname": "supplier_name",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
"reqd": 1
- },
+ },
{
- "fieldname": "column_break0",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break0",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"width": "50%"
- },
+ },
{
- "fieldname": "supplier_type",
- "fieldtype": "Link",
- "in_list_view": 1,
- "label": "Supplier Type",
- "oldfieldname": "supplier_type",
- "oldfieldtype": "Link",
- "options": "Supplier Type",
- "permlevel": 0,
+ "fieldname": "supplier_type",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Supplier Type",
+ "oldfieldname": "supplier_type",
+ "oldfieldtype": "Link",
+ "options": "Supplier Type",
+ "permlevel": 0,
"reqd": 1
- },
+ },
{
- "depends_on": "eval:!doc.__islocal",
- "fieldname": "address_contacts",
- "fieldtype": "Section Break",
- "label": "Address & Contacts",
- "oldfieldtype": "Column Break",
- "options": "icon-map-marker",
+ "depends_on": "eval:!doc.__islocal",
+ "fieldname": "address_contacts",
+ "fieldtype": "Section Break",
+ "label": "Address & Contacts",
+ "oldfieldtype": "Column Break",
+ "options": "icon-map-marker",
"permlevel": 0
- },
+ },
{
- "fieldname": "address_html",
- "fieldtype": "HTML",
- "label": "Address HTML",
- "permlevel": 0,
+ "fieldname": "address_html",
+ "fieldtype": "HTML",
+ "label": "Address HTML",
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "fieldname": "column_break1",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break1",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"width": "50%"
- },
+ },
{
- "fieldname": "contact_html",
- "fieldtype": "HTML",
- "label": "Contact HTML",
- "permlevel": 0,
+ "fieldname": "contact_html",
+ "fieldtype": "HTML",
+ "label": "Contact HTML",
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "depends_on": "eval:!doc.__islocal",
- "fieldname": "communication_history",
- "fieldtype": "Section Break",
- "label": "Communication History",
- "options": "icon-comments",
- "permlevel": 0,
- "print_hide": 1
- },
- {
- "fieldname": "communication_html",
- "fieldtype": "HTML",
- "label": "Communication HTML",
- "permlevel": 0,
- "print_hide": 1
- },
- {
- "fieldname": "more_info",
- "fieldtype": "Section Break",
- "label": "More Info",
- "oldfieldtype": "Section Break",
- "options": "icon-file-text",
+ "fieldname": "more_info",
+ "fieldtype": "Section Break",
+ "label": "More Info",
+ "oldfieldtype": "Section Break",
+ "options": "icon-file-text",
"permlevel": 0
- },
+ },
{
- "description": "Enter the company name under which Account Head will be created for this Supplier",
- "fieldname": "company",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Company",
- "oldfieldname": "company",
- "oldfieldtype": "Link",
- "options": "Company",
- "permlevel": 0,
- "reqd": 1,
+ "description": "Enter the company name under which Account Head will be created for this Supplier",
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "label": "Company",
+ "oldfieldname": "company",
+ "oldfieldtype": "Link",
+ "options": "Company",
+ "permlevel": 0,
+ "reqd": 1,
"search_index": 0
- },
+ },
{
- "fieldname": "default_currency",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Default Currency",
- "no_copy": 1,
- "options": "Currency",
+ "fieldname": "default_currency",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Default Currency",
+ "no_copy": 1,
+ "options": "Currency",
"permlevel": 0
- },
+ },
{
- "fieldname": "default_price_list",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Price List",
- "options": "Price List",
+ "fieldname": "default_price_list",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Price List",
+ "options": "Price List",
"permlevel": 0
- },
+ },
{
- "fieldname": "default_taxes_and_charges",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Taxes and Charges",
- "options": "Purchase Taxes and Charges Master",
+ "fieldname": "default_taxes_and_charges",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Taxes and Charges",
+ "options": "Purchase Taxes and Charges Master",
"permlevel": 0
- },
+ },
{
- "fieldname": "credit_days",
- "fieldtype": "Int",
- "label": "Credit Days",
+ "fieldname": "credit_days",
+ "fieldtype": "Int",
+ "label": "Credit Days",
"permlevel": 0
- },
+ },
{
- "fieldname": "column_break2",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break2",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"width": "50%"
- },
+ },
{
- "fieldname": "website",
- "fieldtype": "Data",
- "label": "Website",
- "oldfieldname": "website",
- "oldfieldtype": "Data",
+ "fieldname": "website",
+ "fieldtype": "Data",
+ "label": "Website",
+ "oldfieldname": "website",
+ "oldfieldtype": "Data",
"permlevel": 0
- },
+ },
{
- "description": "Statutory info and other general information about your Supplier",
- "fieldname": "supplier_details",
- "fieldtype": "Text",
- "label": "Supplier Details",
- "oldfieldname": "supplier_details",
- "oldfieldtype": "Code",
+ "description": "Statutory info and other general information about your Supplier",
+ "fieldname": "supplier_details",
+ "fieldtype": "Text",
+ "label": "Supplier Details",
+ "oldfieldname": "supplier_details",
+ "oldfieldtype": "Code",
"permlevel": 0
- },
+ },
{
- "fieldname": "communications",
- "fieldtype": "Table",
- "hidden": 1,
- "label": "Communications",
- "options": "Communication",
- "permlevel": 0,
+ "fieldname": "communications",
+ "fieldtype": "Table",
+ "hidden": 1,
+ "label": "Communications",
+ "options": "Communication",
+ "permlevel": 0,
"print_hide": 1
}
- ],
- "icon": "icon-user",
- "idx": 1,
- "modified": "2014-09-10 17:53:09.286715",
- "modified_by": "Administrator",
- "module": "Buying",
- "name": "Supplier",
- "owner": "Administrator",
+ ],
+ "icon": "icon-user",
+ "idx": 1,
+ "modified": "2014-09-12 12:26:37.606976",
+ "modified_by": "Administrator",
+ "module": "Buying",
+ "name": "Supplier",
+ "owner": "Administrator",
"permissions": [
{
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
"role": "Purchase User"
- },
+ },
{
- "amend": 0,
- "create": 0,
- "delete": 0,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Purchase Manager",
- "submit": 0,
+ "amend": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Purchase Manager",
+ "submit": 0,
"write": 0
- },
+ },
{
- "amend": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Purchase Master Manager",
- "submit": 0,
+ "amend": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Purchase Master Manager",
+ "submit": 0,
"write": 1
- },
+ },
{
- "apply_user_permissions": 1,
- "permlevel": 0,
- "read": 1,
+ "apply_user_permissions": 1,
+ "permlevel": 0,
+ "read": 1,
"role": "Material User"
- },
+ },
{
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
"role": "Material Manager"
- },
+ },
{
- "apply_user_permissions": 1,
- "permlevel": 0,
- "read": 1,
+ "apply_user_permissions": 1,
+ "permlevel": 0,
+ "read": 1,
"role": "Accounts User"
- },
+ },
{
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
"role": "Accounts Manager"
}
- ],
- "search_fields": "supplier_name,supplier_type",
+ ],
+ "search_fields": "supplier_name,supplier_type",
"title_field": "supplier_name"
-}
\ No newline at end of file
+}
diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.js b/erpnext/hr/doctype/job_applicant/job_applicant.js
index 762bd96..63b58db 100644
--- a/erpnext/hr/doctype/job_applicant/job_applicant.js
+++ b/erpnext/hr/doctype/job_applicant/job_applicant.js
@@ -3,16 +3,9 @@
// For license information, please see license.txt
+// for communication
+cur_frm.email_field = "email_id";
cur_frm.cscript = {
refresh: function(doc) {
- cur_frm.cscript.make_listing(doc);
- },
- make_listing: function(doc) {
- cur_frm.communication_view = new frappe.views.CommunicationList({
- list: frappe.get_list("Communication", {"parent": doc.name, "parenttype": "Job Applicant"}),
- parent: cur_frm.fields_dict['thread_html'].wrapper,
- doc: doc,
- recipients: doc.email_id
- })
},
}
diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js
index e5d2ca9..9829ed2 100644
--- a/erpnext/selling/doctype/customer/customer.js
+++ b/erpnext/selling/doctype/customer/customer.js
@@ -34,11 +34,6 @@
// make lists
cur_frm.cscript.make_address(doc, dt, dn);
cur_frm.cscript.make_contact(doc, dt, dn);
-
- cur_frm.communication_view = new frappe.views.CommunicationList({
- parent: cur_frm.fields_dict.communication_html.wrapper,
- doc: doc,
- });
}
}
diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json
index 47286de..bb481fa 100644
--- a/erpnext/selling/doctype/customer/customer.json
+++ b/erpnext/selling/doctype/customer/customer.json
@@ -1,377 +1,361 @@
{
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "naming_series:",
- "creation": "2013-06-11 14:26:44",
- "description": "Buyer of Goods and Services.",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Master",
+ "allow_import": 1,
+ "allow_rename": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-06-11 14:26:44",
+ "description": "Buyer of Goods and Services.",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Master",
"fields": [
{
- "fieldname": "basic_info",
- "fieldtype": "Section Break",
- "label": "Basic Info",
- "oldfieldtype": "Section Break",
- "options": "icon-user",
- "permlevel": 0,
+ "fieldname": "basic_info",
+ "fieldtype": "Section Break",
+ "label": "Basic Info",
+ "oldfieldtype": "Section Break",
+ "options": "icon-user",
+ "permlevel": 0,
"reqd": 0
- },
+ },
{
- "fieldname": "naming_series",
- "fieldtype": "Select",
- "label": "Series",
- "no_copy": 1,
- "options": "CUST-",
- "permlevel": 0,
+ "fieldname": "naming_series",
+ "fieldtype": "Select",
+ "label": "Series",
+ "no_copy": 1,
+ "options": "CUST-",
+ "permlevel": 0,
"print_hide": 0
- },
+ },
{
- "fieldname": "customer_name",
- "fieldtype": "Data",
- "hidden": 0,
- "in_filter": 1,
- "in_list_view": 1,
- "label": "Full Name",
- "no_copy": 1,
- "oldfieldname": "customer_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 0,
- "report_hide": 0,
- "reqd": 1,
+ "fieldname": "customer_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "in_filter": 1,
+ "in_list_view": 1,
+ "label": "Full Name",
+ "no_copy": 1,
+ "oldfieldname": "customer_name",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 0,
+ "report_hide": 0,
+ "reqd": 1,
"search_index": 1
- },
+ },
{
- "fieldname": "customer_type",
- "fieldtype": "Select",
- "label": "Type",
- "oldfieldname": "customer_type",
- "oldfieldtype": "Select",
- "options": "\nCompany\nIndividual",
- "permlevel": 0,
+ "fieldname": "customer_type",
+ "fieldtype": "Select",
+ "label": "Type",
+ "oldfieldname": "customer_type",
+ "oldfieldtype": "Select",
+ "options": "\nCompany\nIndividual",
+ "permlevel": 0,
"reqd": 1
- },
+ },
{
- "fieldname": "lead_name",
- "fieldtype": "Link",
- "hidden": 0,
- "in_filter": 1,
- "label": "From Lead",
- "no_copy": 1,
- "oldfieldname": "lead_name",
- "oldfieldtype": "Link",
- "options": "Lead",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "lead_name",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "in_filter": 1,
+ "label": "From Lead",
+ "no_copy": 1,
+ "oldfieldname": "lead_name",
+ "oldfieldtype": "Link",
+ "options": "Lead",
+ "permlevel": 0,
+ "print_hide": 1,
"report_hide": 1
- },
+ },
{
- "fieldname": "column_break0",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break0",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"width": "50%"
- },
+ },
{
- "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>",
- "fieldname": "customer_group",
- "fieldtype": "Link",
- "hidden": 0,
- "in_filter": 1,
- "label": "Customer Group",
- "oldfieldname": "customer_group",
- "oldfieldtype": "Link",
- "options": "Customer Group",
- "permlevel": 0,
- "print_hide": 0,
- "reqd": 1,
+ "description": "<a href=\"#Sales Browser/Customer Group\">Add / Edit</a>",
+ "fieldname": "customer_group",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "in_filter": 1,
+ "label": "Customer Group",
+ "oldfieldname": "customer_group",
+ "oldfieldtype": "Link",
+ "options": "Customer Group",
+ "permlevel": 0,
+ "print_hide": 0,
+ "reqd": 1,
"search_index": 1
- },
+ },
{
- "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>",
- "fieldname": "territory",
- "fieldtype": "Link",
- "in_list_view": 1,
- "label": "Territory",
- "oldfieldname": "territory",
- "oldfieldtype": "Link",
- "options": "Territory",
- "permlevel": 0,
- "print_hide": 1,
+ "description": "<a href=\"#Sales Browser/Territory\">Add / Edit</a>",
+ "fieldname": "territory",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Territory",
+ "oldfieldname": "territory",
+ "oldfieldtype": "Link",
+ "options": "Territory",
+ "permlevel": 0,
+ "print_hide": 1,
"reqd": 1
- },
+ },
{
- "depends_on": "eval:!doc.__islocal",
- "fieldname": "address_contacts",
- "fieldtype": "Section Break",
- "label": "Address & Contacts",
- "options": "icon-map-marker",
+ "depends_on": "eval:!doc.__islocal",
+ "fieldname": "address_contacts",
+ "fieldtype": "Section Break",
+ "label": "Address & Contacts",
+ "options": "icon-map-marker",
"permlevel": 0
- },
+ },
{
- "fieldname": "address_html",
- "fieldtype": "HTML",
- "label": "Address HTML",
- "permlevel": 0,
+ "fieldname": "address_html",
+ "fieldtype": "HTML",
+ "label": "Address HTML",
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "fieldname": "column_break1",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break1",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"width": "50%"
- },
+ },
{
- "fieldname": "contact_html",
- "fieldtype": "HTML",
- "label": "Contact HTML",
- "oldfieldtype": "HTML",
- "permlevel": 0,
+ "fieldname": "contact_html",
+ "fieldtype": "HTML",
+ "label": "Contact HTML",
+ "oldfieldtype": "HTML",
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "depends_on": "eval:!doc.__islocal",
- "fieldname": "communication_history",
- "fieldtype": "Section Break",
- "label": "Communication History",
- "options": "icon-comments",
- "permlevel": 0,
- "print_hide": 1
- },
- {
- "fieldname": "communication_html",
- "fieldtype": "HTML",
- "label": "Communication HTML",
- "permlevel": 0,
- "print_hide": 1
- },
- {
- "fieldname": "more_info",
- "fieldtype": "Section Break",
- "label": "More Info",
- "oldfieldtype": "Section Break",
- "options": "icon-file-text",
+ "fieldname": "more_info",
+ "fieldtype": "Section Break",
+ "label": "More Info",
+ "oldfieldtype": "Section Break",
+ "options": "icon-file-text",
"permlevel": 0
- },
+ },
{
- "fieldname": "column_break2",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break2",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"width": "50%"
- },
+ },
{
- "description": "To create an Account Head under a different company, select the company and save customer.",
- "fieldname": "company",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Company",
- "oldfieldname": "company",
- "oldfieldtype": "Link",
- "options": "Company",
- "permlevel": 0,
- "reqd": 1,
+ "description": "To create an Account Head under a different company, select the company and save customer.",
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "label": "Company",
+ "oldfieldname": "company",
+ "oldfieldtype": "Link",
+ "options": "Company",
+ "permlevel": 0,
+ "reqd": 1,
"search_index": 1
- },
+ },
{
- "description": "Your Customer's TAX registration numbers (if applicable) or any general information",
- "fieldname": "customer_details",
- "fieldtype": "Text",
- "label": "Customer Details",
- "oldfieldname": "customer_details",
- "oldfieldtype": "Code",
+ "description": "Your Customer's TAX registration numbers (if applicable) or any general information",
+ "fieldname": "customer_details",
+ "fieldtype": "Text",
+ "label": "Customer Details",
+ "oldfieldname": "customer_details",
+ "oldfieldtype": "Code",
"permlevel": 0
- },
+ },
{
- "fieldname": "column_break3",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break3",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"width": "50%"
- },
+ },
{
- "fieldname": "default_currency",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Currency",
- "no_copy": 1,
- "options": "Currency",
+ "fieldname": "default_currency",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Currency",
+ "no_copy": 1,
+ "options": "Currency",
"permlevel": 0
- },
+ },
{
- "fieldname": "default_price_list",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Price List",
- "options": "Price List",
+ "fieldname": "default_price_list",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Price List",
+ "options": "Price List",
"permlevel": 0
- },
+ },
{
- "fieldname": "default_taxes_and_charges",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Taxes and Charges",
- "options": "Sales Taxes and Charges Master",
+ "fieldname": "default_taxes_and_charges",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Taxes and Charges",
+ "options": "Sales Taxes and Charges Master",
"permlevel": 0
- },
+ },
{
- "fieldname": "credit_days",
- "fieldtype": "Int",
- "label": "Credit Days",
- "oldfieldname": "credit_days",
- "oldfieldtype": "Int",
+ "fieldname": "credit_days",
+ "fieldtype": "Int",
+ "label": "Credit Days",
+ "oldfieldname": "credit_days",
+ "oldfieldtype": "Int",
"permlevel": 1
- },
+ },
{
- "fieldname": "credit_limit",
- "fieldtype": "Currency",
- "label": "Credit Limit",
- "oldfieldname": "credit_limit",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
+ "fieldname": "credit_limit",
+ "fieldtype": "Currency",
+ "label": "Credit Limit",
+ "oldfieldname": "credit_limit",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
"permlevel": 1
- },
+ },
{
- "fieldname": "website",
- "fieldtype": "Data",
- "label": "Website",
+ "fieldname": "website",
+ "fieldtype": "Data",
+ "label": "Website",
"permlevel": 0
- },
+ },
{
- "fieldname": "sales_team_section_break",
- "fieldtype": "Section Break",
- "label": "Sales Team",
- "oldfieldtype": "Section Break",
- "options": "icon-group",
+ "fieldname": "sales_team_section_break",
+ "fieldtype": "Section Break",
+ "label": "Sales Team",
+ "oldfieldtype": "Section Break",
+ "options": "icon-group",
"permlevel": 0
- },
+ },
{
- "fieldname": "default_sales_partner",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Sales Partner",
- "oldfieldname": "default_sales_partner",
- "oldfieldtype": "Link",
- "options": "Sales Partner",
+ "fieldname": "default_sales_partner",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Sales Partner",
+ "oldfieldname": "default_sales_partner",
+ "oldfieldtype": "Link",
+ "options": "Sales Partner",
"permlevel": 0
- },
+ },
{
- "fieldname": "default_commission_rate",
- "fieldtype": "Float",
- "label": "Commission Rate",
- "oldfieldname": "default_commission_rate",
- "oldfieldtype": "Currency",
+ "fieldname": "default_commission_rate",
+ "fieldtype": "Float",
+ "label": "Commission Rate",
+ "oldfieldname": "default_commission_rate",
+ "oldfieldtype": "Currency",
"permlevel": 0
- },
+ },
{
- "fieldname": "sales_team",
- "fieldtype": "Table",
- "label": "Sales Team Details",
- "oldfieldname": "sales_team",
- "oldfieldtype": "Table",
- "options": "Sales Team",
+ "fieldname": "sales_team",
+ "fieldtype": "Table",
+ "label": "Sales Team Details",
+ "oldfieldname": "sales_team",
+ "oldfieldtype": "Table",
+ "options": "Sales Team",
"permlevel": 0
- },
+ },
{
- "fieldname": "communications",
- "fieldtype": "Table",
- "hidden": 1,
- "label": "Communications",
- "options": "Communication",
- "permlevel": 0,
+ "fieldname": "communications",
+ "fieldtype": "Table",
+ "hidden": 1,
+ "label": "Communications",
+ "options": "Communication",
+ "permlevel": 0,
"print_hide": 1
}
- ],
- "icon": "icon-user",
- "idx": 1,
- "modified": "2014-09-10 16:41:07.553182",
- "modified_by": "Administrator",
- "module": "Selling",
- "name": "Customer",
- "owner": "Administrator",
+ ],
+ "icon": "icon-user",
+ "idx": 1,
+ "modified": "2014-09-12 12:26:47.480965",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Customer",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 0,
- "apply_user_permissions": 1,
- "create": 1,
- "delete": 0,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Sales User",
- "submit": 0,
+ "amend": 0,
+ "apply_user_permissions": 1,
+ "create": 1,
+ "delete": 0,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Sales User",
+ "submit": 0,
"write": 1
- },
+ },
{
- "cancel": 0,
- "delete": 0,
- "permlevel": 1,
- "read": 1,
+ "cancel": 0,
+ "delete": 0,
+ "permlevel": 1,
+ "read": 1,
"role": "Sales User"
- },
+ },
{
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
"role": "Sales Manager"
- },
+ },
{
- "amend": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Sales Master Manager",
- "set_user_permissions": 1,
- "submit": 0,
+ "amend": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Sales Master Manager",
+ "set_user_permissions": 1,
+ "submit": 0,
"write": 1
- },
+ },
{
- "cancel": 0,
- "delete": 0,
- "permlevel": 1,
- "read": 1,
- "role": "Sales Master Manager",
+ "cancel": 0,
+ "delete": 0,
+ "permlevel": 1,
+ "read": 1,
+ "role": "Sales Master Manager",
"write": 1
- },
+ },
{
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
"role": "Material User"
- },
+ },
{
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
"role": "Material Manager"
- },
+ },
{
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
"role": "Accounts User"
- },
+ },
{
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
"role": "Accounts Manager"
}
- ],
- "search_fields": "customer_name,customer_group,territory",
+ ],
+ "search_fields": "customer_name,customer_group,territory",
"title_field": "customer_name"
-}
\ No newline at end of file
+}
diff --git a/erpnext/selling/doctype/lead/lead.js b/erpnext/selling/doctype/lead/lead.js
index 8d036a4..75f3add 100644
--- a/erpnext/selling/doctype/lead/lead.js
+++ b/erpnext/selling/doctype/lead/lead.js
@@ -4,6 +4,8 @@
{% include 'setup/doctype/contact_control/contact_control.js' %};
frappe.provide("erpnext");
+cur_frm.email_field = "email_id";
+
erpnext.LeadController = frappe.ui.form.Controller.extend({
setup: function() {
this.frm.fields_dict.customer.get_query = function(doc, cdt, cdn) {
diff --git a/erpnext/selling/doctype/opportunity/opportunity.js b/erpnext/selling/doctype/opportunity/opportunity.js
index af31d39..df84d72 100644
--- a/erpnext/selling/doctype/opportunity/opportunity.js
+++ b/erpnext/selling/doctype/opportunity/opportunity.js
@@ -8,6 +8,8 @@
frappe.provide("erpnext.selling");
+cur_frm.email_field = "contact_email";
+
// TODO commonify this code
erpnext.selling.Opportunity = frappe.ui.form.Controller.extend({
onload: function() {
@@ -26,15 +28,6 @@
set_multiple(cdt, cdn, { fiscal_year:sys_defaults.fiscal_year });
- if(!this.frm.doc.__islocal) {
- cur_frm.communication_view = new frappe.views.CommunicationList({
- list: frappe.get_list("Communication", {"parent": this.frm.doc.name, "parenttype": "Opportunity"}),
- parent: cur_frm.fields_dict.communication_html.wrapper,
- doc: this.frm.doc,
- recipients: this.frm.doc.contact_email
- });
- }
-
if(this.frm.doc.customer && !this.frm.doc.customer_name) cur_frm.cscript.customer(this.frm.doc);
this.setup_queries();
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index 8cff8d8..5f25446 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -53,15 +53,6 @@
}, "icon-download", "btn-default");
}
- if (!doc.__islocal) {
- cur_frm.communication_view = new frappe.views.CommunicationList({
- list: frappe.get_list("Communication", {"parent": doc.name, "parenttype": "Quotation"}),
- parent: cur_frm.fields_dict.communication_html.wrapper,
- doc: doc,
- recipients: doc.contact_email
- });
- }
-
this.toggle_reqd_lead_customer();
},
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index 66e935a..a5460fc 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -13,6 +13,8 @@
{% include "public/js/controllers/accounts.js" %}
+cur_frm.email_field = "contact_email";
+
erpnext.selling.SellingController = erpnext.TransactionController.extend({
onload: function() {
this._super();
@@ -591,7 +593,7 @@
method:'erpnext.projects.doctype.project.project.get_cost_center_name' ,
args: { project_name: frm.doc.project_name },
callback: function(r, rt) {
- if(!r.exc) {
+ if(!r.exc) {
$.each(frm.doc[cur_frm.cscript.fname] || [], function(i, row) {
frappe.model.set_value(row.doctype, row.name, "cost_center", r.message);
msgprint(__("Cost Center For Item with Item Code '"+row.item_name+"' has been Changed to "+ r.message));
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.js b/erpnext/support/doctype/support_ticket/support_ticket.js
index 096fd27..cd77be4 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.js
+++ b/erpnext/support/doctype/support_ticket/support_ticket.js
@@ -7,6 +7,7 @@
frappe.provide("erpnext.support");
cur_frm.add_fetch("customer", "customer_name", "customer_name")
+cur_frm.email_field = "raised_by";
$.extend(cur_frm.cscript, {
refresh: function(doc) {
diff --git a/erpnext/utilities/doctype/contact/contact.js b/erpnext/utilities/doctype/contact/contact.js
index f2a2fdc..fe407d9 100644
--- a/erpnext/utilities/doctype/contact/contact.js
+++ b/erpnext/utilities/doctype/contact/contact.js
@@ -3,16 +3,8 @@
{% include 'controllers/js/contact_address_common.js' %};
-cur_frm.cscript.refresh = function(doc) {
- cur_frm.communication_view = new frappe.views.CommunicationList({
- list: frappe.get_list("Communication", {"parent": doc.name, "parenttype": "Contact"}),
- parent: cur_frm.fields_dict.communication_html.wrapper,
- doc: doc,
- recipients: doc.email_id
- });
-}
-
+cur_frm.email_field = "email_id";
cur_frm.cscript.hide_dialog = function() {
if(cur_frm.contact_list)
cur_frm.contact_list.run();
-}
\ No newline at end of file
+}