diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py
index f4ac6b08c00..17ae216e022 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/accounts/doctype/sales_invoice/sales_invoice.py
@@ -549,9 +549,7 @@ class DocType(SellingController):
self.values = []
items = get_obj('Sales Common').get_item_list(self)
for d in items:
- stock_item = webnotes.conn.sql("SELECT is_stock_item, is_sample_item \
- FROM tabItem where name = '%s'"%(d['item_code']), as_dict = 1)
- if stock_item[0]['is_stock_item'] == "Yes":
+ if webnotes.conn.get_value("Item", d['item_code'], "is_stock_item") == "Yes":
if not d['warehouse']:
msgprint("Message: Please enter Warehouse for item %s as it is stock item." \
% d['item_code'], raise_exception=1)
diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt
index ca2b4b243fa..f921f242234 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.txt
+++ b/accounts/doctype/sales_invoice/sales_invoice.txt
@@ -180,7 +180,6 @@
"search_index": 1
},
{
- "default": "Today",
"description": "Enter the date by which payments from customer is expected against this invoice.",
"doctype": "DocField",
"fieldname": "due_date",
diff --git a/accounts/report/gross_profit/gross_profit.py b/accounts/report/gross_profit/gross_profit.py
index 3aba234c190..590babbf6bc 100644
--- a/accounts/report/gross_profit/gross_profit.py
+++ b/accounts/report/gross_profit/gross_profit.py
@@ -4,7 +4,7 @@
from __future__ import unicode_literals
import webnotes
from webnotes.utils import flt
-from stock.utils import get_buying_amount
+from stock.utils import get_buying_amount, get_sales_bom_buying_amount
def execute(filters=None):
if not filters: filters = {}
@@ -21,10 +21,15 @@ def execute(filters=None):
data = []
for row in source:
selling_amount = flt(row.amount)
-
- buying_amount = get_buying_amount(row.item_code, row.parenttype, row.name, row.item_row,
- stock_ledger_entries.get((row.item_code, row.warehouse), []),
- item_sales_bom.get(row.parenttype, {}).get(row.name, webnotes._dict()))
+
+ item_sales_bom_map = item_sales_bom.get(row.parenttype, {}).get(row.name, webnotes._dict())
+
+ if item_sales_bom_map.get(row.item_code):
+ buying_amount = get_sales_bom_buying_amount(row.item_code, row.warehouse,
+ row.parenttype, row.name, row.item_row, stock_ledger_entries, item_sales_bom_map)
+ else:
+ buying_amount = get_buying_amount(row.parenttype, row.name, row.item_row,
+ stock_ledger_entries.get((row.item_code, row.warehouse), []))
buying_amount = buying_amount > 0 and buying_amount or 0
diff --git a/buying/doctype/purchase_common/purchase_common.js b/buying/doctype/purchase_common/purchase_common.js
index 67ba33c2456..5785b1a9d57 100644
--- a/buying/doctype/purchase_common/purchase_common.js
+++ b/buying/doctype/purchase_common/purchase_common.js
@@ -333,10 +333,10 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
// other charges added/deducted
if(tax_count) {
this.frm.doc.other_charges_added = wn.utils.sum($.map(this.frm.tax_doclist,
- function(tax) { return tax.add_deduct_tax == "Add" ? tax.tax_amount : 0.0; }));
+ function(tax) { return (tax.add_deduct_tax == "Add" && in_list(["Valuation and Total", "Total"], tax.category)) ? tax.tax_amount : 0.0; }));
this.frm.doc.other_charges_deducted = wn.utils.sum($.map(this.frm.tax_doclist,
- function(tax) { return tax.add_deduct_tax == "Deduct" ? tax.tax_amount : 0.0; }));
+ function(tax) { return (tax.add_deduct_tax == "Deduct" && in_list(["Valuation and Total", "Total"], tax.category)) ? tax.tax_amount : 0.0; }));
wn.model.round_floats_in(this.frm.doc, ["other_charges_added", "other_charges_deducted"]);
diff --git a/buying/doctype/supplier/supplier.py b/buying/doctype/supplier/supplier.py
index c646fdbdb54..75b2e037627 100644
--- a/buying/doctype/supplier/supplier.py
+++ b/buying/doctype/supplier/supplier.py
@@ -18,9 +18,6 @@ class DocType(TransactionBase):
self.doc = doc
self.doclist = doclist
- def onload(self):
- self.add_communication_list()
-
def autoname(self):
supp_master_name = webnotes.defaults.get_global_default('supp_master_name')
diff --git a/buying/doctype/supplier/supplier.txt b/buying/doctype/supplier/supplier.txt
index 8fa70679f91..50202dcae25 100644
--- a/buying/doctype/supplier/supplier.txt
+++ b/buying/doctype/supplier/supplier.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:11",
"docstatus": 0,
- "modified": "2013-08-08 14:22:08",
+ "modified": "2013-09-02 16:25:44",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -204,6 +204,14 @@
"oldfieldname": "website",
"oldfieldtype": "Data"
},
+ {
+ "doctype": "DocField",
+ "fieldname": "communications",
+ "fieldtype": "Table",
+ "hidden": 1,
+ "label": "Communications",
+ "options": "Communication"
+ },
{
"cancel": 0,
"create": 0,
diff --git a/config.json b/config.json
index 5412b017b24..ef5a1644008 100644
--- a/config.json
+++ b/config.json
@@ -130,7 +130,7 @@
},
"writers": {
"template": "app/website/templates/pages/writers",
- "args_method": "website.helpers.blog.get_writers_args"
+ "args_method": "website.doctype.blogger.blogger.get_writers_args"
},
"profile": {
"no_cache": true,
diff --git a/controllers/buying_controller.py b/controllers/buying_controller.py
index 63244c5fcec..043099a70df 100644
--- a/controllers/buying_controller.py
+++ b/controllers/buying_controller.py
@@ -17,7 +17,6 @@ class BuyingController(StockController):
def onload_post_render(self):
# contact, address, item details
self.set_missing_values()
- self.set_taxes("purchase_tax_details", "purchase_other_charges")
def validate(self):
super(BuyingController, self).validate()
@@ -40,6 +39,8 @@ class BuyingController(StockController):
self.doc.fields[fieldname] = val
self.set_missing_item_details(get_item_details)
+ if self.doc.fields.get("__islocal"):
+ self.set_taxes("purchase_tax_details", "purchase_other_charges")
def set_supplier_from_item_default(self):
if self.meta.get_field("supplier") and not self.doc.supplier:
diff --git a/controllers/selling_controller.py b/controllers/selling_controller.py
index 086c42e3981..5605ccf3a25 100644
--- a/controllers/selling_controller.py
+++ b/controllers/selling_controller.py
@@ -14,15 +14,15 @@ class SellingController(StockController):
def onload_post_render(self):
# contact, address, item details and pos details (if applicable)
self.set_missing_values()
- self.set_taxes("other_charges", "charge")
def set_missing_values(self, for_validate=False):
super(SellingController, self).set_missing_values(for_validate)
# set contact and address details for customer, if they are not mentioned
self.set_missing_lead_customer_details()
-
self.set_price_list_and_item_details()
+ if self.doc.fields.get("__islocal"):
+ self.set_taxes("other_charges", "charge")
def set_missing_lead_customer_details(self):
if self.doc.customer:
@@ -85,7 +85,7 @@ class SellingController(StockController):
self.doc.grand_total_export or self.doc.rounded_total_export, self.doc.currency)
def set_buying_amount(self, stock_ledger_entries = None):
- from stock.utils import get_buying_amount
+ from stock.utils import get_buying_amount, get_sales_bom_buying_amount
if not stock_ledger_entries:
stock_ledger_entries = self.get_stock_ledger_entries()
@@ -99,10 +99,18 @@ class SellingController(StockController):
for item in self.doclist.get({"parentfield": self.fname}):
if item.item_code in self.stock_items or \
(item_sales_bom and item_sales_bom.get(item.item_code)):
- buying_amount = get_buying_amount(item.item_code, self.doc.doctype, self.doc.name, item.name,
- stock_ledger_entries.get((item.item_code, item.warehouse), []),
- item_sales_bom)
+ buying_amount = 0
+ if item.item_code in self.stock_items:
+ buying_amount = get_buying_amount(self.doc.doctype, self.doc.name,
+ item.name, stock_ledger_entries.get((item.item_code,
+ item.warehouse), []))
+ elif item_sales_bom and item_sales_bom.get(item.item_code):
+ buying_amount = get_sales_bom_buying_amount(item.item_code, item.warehouse,
+ self.doc.doctype, self.doc.name, item.name, stock_ledger_entries,
+ item_sales_bom)
+
+ # buying_amount >= 0.01 so that gl entry doesn't get created for such small amounts
item.buying_amount = buying_amount >= 0.01 and buying_amount or 0
webnotes.conn.set_value(item.doctype, item.name, "buying_amount",
item.buying_amount)
diff --git a/docs/docs.community.md b/docs/docs.community.md
deleted file mode 100644
index 121a6925d0a..00000000000
--- a/docs/docs.community.md
+++ /dev/null
@@ -1,14 +0,0 @@
----
-{
- "_label": "Get Involved"
-}
----
-If you are an ERPNext user:
-
-[https://groups.google.com/group/erpnext-user-forum](https://groups.google.com/group/erpnext-user-forum)
-
-If you are an ERPNext developer:
-
-[https://groups.google.com/group/erpnext-developer-forum](https://groups.google.com/group/erpnext-developer-forum)
-
-
diff --git a/docs/docs.md b/docs/docs.md
index 378a0b8eb5d..3ed24b75d64 100644
--- a/docs/docs.md
+++ b/docs/docs.md
@@ -7,28 +7,25 @@
"docs.dev",
"docs.download",
"docs.community",
- "docs.blog",
- "docs.about"
+ "docs.blog"
],
"_no_toc": 1
}
---
-
-
All-in-One Platform to Manage Your Organization.
-
100% Free and Open Source.
+
+
ERPNext Docs (beta)
+
Open Source ERP Built for The Web.
+
For the main site, go to https://erpnext.com

+Welcome to the ERPNext Documentation + Community Site
+
### What is ERPNext?
-ERPNext is an information system that links together an entire organization's operations. It is a software package that offers convenience of managing all the business functions from a single platform. No need of going to different applications to process different requests. No need of saving data in different functional packages. Under one ERP "roof" you can manage Accounting, Warehouse Management, CRM, Human Resources, Supply Chain Management, Sales Management, and Website Design.
+ERPNext is an Open Source integrated app (that manages Financial Accounting, Inventory, CRM) that is built grounds up for the web, using some of the latest web technologies and frameworks. ERPNext helps your organization manage Financial Accounting, Inventory, Sales, Purchase, Payroll, Customer Support, E-Commerce all in one platform. Learn more at [https://erpnext.com](https://erpnext.com)
-ERPNext is written by Web Notes Technologies keeping small and medium businesses in mind.
+### Site Contents
-- It gives better access to crucial information as a whole rather than in fragments of different versions.
-- It provides comparable financial reports.
-- It avoids duplication of reports and redundant data.
-- It allows better alignment across cross-functional departments.
-- It facilitates Website Design and provides shopping cart facility.
-- It gives better deployment on mobiles, tablets, desktops and large screens.
\ No newline at end of file
+This site contains the full User and Developer Documentation for ERPNext. This is still a work-in-progress. Please feel free to contribute issues and documentation.
diff --git a/docs/templates/docs.html b/docs/templates/docs.html
new file mode 100644
index 00000000000..ef3cf8e9f8f
--- /dev/null
+++ b/docs/templates/docs.html
@@ -0,0 +1,51 @@
+{% extends "lib/core/doctype/documentation_tool/docs.html" %}
+
+{% block navbar %}
+
+{% endblock %}
+
+{% block footer %}
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/hr/doctype/job_applicant/get_job_applications.py b/hr/doctype/job_applicant/get_job_applications.py
index 9bec43e5e8c..2e013289159 100644
--- a/hr/doctype/job_applicant/get_job_applications.py
+++ b/hr/doctype/job_applicant/get_job_applications.py
@@ -37,7 +37,7 @@ class JobsMailbox(POP3Mailbox):
mail.save_attachments_in_doc(applicant.doc)
make(content=mail.content, sender=mail.from_email,
- doctype="Job Applicant", name=applicant.doc.name, set_lead=False)
+ doctype="Job Applicant", name=applicant.doc.name)
def get_job_applications():
if cint(webnotes.conn.get_value('Jobs Email Settings', None, 'extract_emails')):
diff --git a/hr/doctype/job_applicant/job_applicant.js b/hr/doctype/job_applicant/job_applicant.js
index 9aff6057641..f82da11f07f 100644
--- a/hr/doctype/job_applicant/job_applicant.js
+++ b/hr/doctype/job_applicant/job_applicant.js
@@ -16,7 +16,7 @@ cur_frm.cscript = {
},
make_listing: function(doc) {
cur_frm.communication_view = new wn.views.CommunicationList({
- list: wn.model.get("Communication", {"job_applicant": doc.name}),
+ list: wn.model.get("Communication", {"parent": doc.name, "parenttype": "Job Applicant"}),
parent: cur_frm.fields_dict['thread_html'].wrapper,
doc: doc,
recipients: doc.email_id
diff --git a/hr/doctype/job_applicant/job_applicant.py b/hr/doctype/job_applicant/job_applicant.py
index e9b12b0f782..04b6da9568a 100644
--- a/hr/doctype/job_applicant/job_applicant.py
+++ b/hr/doctype/job_applicant/job_applicant.py
@@ -11,9 +11,6 @@ class DocType(TransactionBase):
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
- def onload(self):
- self.add_communication_list()
-
def get_sender(self, comm):
return webnotes.conn.get_value('Jobs Email Settings',None,'email_id')
diff --git a/hr/doctype/job_applicant/job_applicant.txt b/hr/doctype/job_applicant/job_applicant.txt
index ebf95f68bb6..62b1d807bca 100644
--- a/hr/doctype/job_applicant/job_applicant.txt
+++ b/hr/doctype/job_applicant/job_applicant.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-29 19:25:37",
"docstatus": 0,
- "modified": "2013-07-05 14:43:11",
+ "modified": "2013-09-02 16:26:23",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -89,6 +89,14 @@
"fieldtype": "HTML",
"label": "Thread HTML"
},
+ {
+ "doctype": "DocField",
+ "fieldname": "communications",
+ "fieldtype": "Table",
+ "hidden": 1,
+ "label": "Communications",
+ "options": "Communication"
+ },
{
"doctype": "DocPerm"
}
diff --git a/patches/august_2013/fix_fiscal_year.py b/patches/august_2013/fix_fiscal_year.py
new file mode 100644
index 00000000000..67988c440e3
--- /dev/null
+++ b/patches/august_2013/fix_fiscal_year.py
@@ -0,0 +1,49 @@
+import webnotes
+
+def execute():
+ create_fiscal_years()
+
+ doctypes = webnotes.conn.sql_list("""select parent from tabDocField
+ where (fieldtype="Link" and options='Fiscal Year')
+ or (fieldtype="Select" and options='link:Fiscal Year')""")
+
+ for dt in doctypes:
+ date_fields = webnotes.conn.sql_list("""select fieldname from tabDocField
+ where parent=%s and fieldtype='Date'""", dt)
+
+ date_field = get_date_field(date_fields, dt)
+
+ if not date_field:
+ print dt, date_field
+ else:
+ webnotes.conn.sql("""update `tab%s` set fiscal_year =
+ if(%s<='2013-06-30', '2012-2013', '2013-2014')""" % (dt, date_field))
+
+def create_fiscal_years():
+ fiscal_years = {
+ "2012-2013": ["2012-07-01", "2013-06-30"],
+ "2013-2014": ["2013-07-01", "2014-06-30"]
+ }
+
+ for d in fiscal_years:
+ webnotes.bean({
+ "doctype": "Fiscal Year",
+ "year": d,
+ "year_start_date": fiscal_years[d][0],
+ "is_fiscal_year_closed": "No"
+ }).insert()
+
+
+def get_date_field(date_fields, dt):
+ date_field = None
+ if date_fields:
+ if "posting_date" in date_fields:
+ date_field = "posting_date"
+ elif "transaction_date" in date_fields:
+ date_field = 'transaction_date'
+ else:
+ date_field = date_fields[0]
+ # print dt, date_fields
+
+ return date_field
+
\ No newline at end of file
diff --git a/patches/patch_list.py b/patches/patch_list.py
index dd95e2dfd71..a5c95a97fb2 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -259,4 +259,6 @@ patch_list = [
"execute:webnotes.bean('Style Settings').save() #2013-08-20",
"patches.september_2013.p01_add_user_defaults_from_pos_setting",
"execute:webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice') # 2013-09-02",
+ "patches.september_2013.p01_fix_buying_amount_gl_entries",
+ "patches.september_2013.p01_update_communication",
]
\ No newline at end of file
diff --git a/patches/september_2013/p01_fix_buying_amount_gl_entries.py b/patches/september_2013/p01_fix_buying_amount_gl_entries.py
new file mode 100644
index 00000000000..369a2914f1a
--- /dev/null
+++ b/patches/september_2013/p01_fix_buying_amount_gl_entries.py
@@ -0,0 +1,66 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes
+import webnotes.defaults
+from webnotes.utils import cint
+
+def execute():
+ if not cint(webnotes.defaults.get_global_default("auto_inventory_accounting")):
+ return
+
+ # fix delivery note
+ for dn in webnotes.conn.sql_list("""select name from `tabDelivery Note` where docstatus=1
+ and posting_date >= "2013-08-06" order by posting_date"""):
+ recreate_gl_entries("Delivery Note", dn, "delivery_note_details")
+
+ # fix sales invoice
+ for si in webnotes.conn.sql_list("""select name from `tabSales Invoice` where docstatus=1
+ and update_stock=1 and posting_date >= "2013-08-06" order by posting_date"""):
+ recreate_gl_entries("Sales Invoice", si, "entries")
+
+def recreate_gl_entries(doctype, name, parentfield):
+ # calculate buying amount and make gl entries
+ bean = webnotes.bean(doctype, name)
+ bean.run_method("set_buying_amount")
+
+ company_values = webnotes.conn.get_value("Company", bean.doc.company, ["default_expense_account",
+ "stock_adjustment_account", "cost_center", "stock_adjustment_cost_center"])
+
+ # update missing expense account and cost center
+ for item in bean.doclist.get({"parentfield": parentfield}):
+ if item.buying_amount and not validate_item_values(item, bean.doc.company):
+ res = webnotes.conn.sql("""select expense_account, cost_center
+ from `tab%s` child where docstatus=1 and item_code=%s and
+ ifnull(expense_account, '')!='' and ifnull(cost_center, '')!='' and
+ (select company from `tabAccount` ac where ac.name=child.expense_account)=%s and
+ (select company from `tabCost Center` cc where cc.name=child.cost_center)=%s
+ order by creation desc limit 1""" % (item.doctype, "%s", "%s", "%s"),
+ (item.item_code, bean.doc.company, bean.doc.company))
+ if res:
+ item.expense_account = res[0][0]
+ item.cost_center = res[0][1]
+ elif company_values:
+ item.expense_account = company_values[0] or company_values[1]
+ item.cost_center = company_values[2] or company_values[3]
+
+ webnotes.conn.set_value(item.doctype, item.name, "expense_account", item.expense_account)
+ webnotes.conn.set_value(item.doctype, item.name, "cost_center", item.cost_center)
+
+ # remove gl entries
+ webnotes.conn.sql("""delete from `tabGL Entry` where voucher_type=%s
+ and voucher_no=%s""", (doctype, name))
+ bean.run_method("make_gl_entries")
+
+def validate_item_values(item, company):
+ if item.expense_account and \
+ webnotes.conn.get_value("Account", item.expense_account, "company")!=company:
+ return False
+ elif item.cost_center and \
+ webnotes.conn.get_value("Cost Center", item.cost_center, "company")!=company:
+ return False
+ elif not (item.expense_account and item.cost_center):
+ return False
+
+ return True
\ No newline at end of file
diff --git a/patches/september_2013/p01_update_communication.py b/patches/september_2013/p01_update_communication.py
new file mode 100644
index 00000000000..d840c801f9b
--- /dev/null
+++ b/patches/september_2013/p01_update_communication.py
@@ -0,0 +1,15 @@
+import webnotes
+
+def execute():
+ for doctype in ("Contact", "Lead", "Job Applicant", "Supplier", "Customer", "Quotation", "Sales Person", "Support Ticket"):
+ fieldname = doctype.replace(" ", '_').lower()
+ webnotes.conn.sql("""update tabCommunication
+ set parenttype=%s, parentfield='communications',
+ parent=`%s`
+ where ifnull(`%s`, '')!=''""" % ("%s", fieldname, fieldname), doctype)
+
+ webnotes.reload_doc("core", "doctype", "communication")
+
+ webnotes.conn.sql("""update tabCommunication set communication_date = creation where
+ ifnull(communication_date, '')='' """)
+
\ No newline at end of file
diff --git a/public/js/toolbar.js b/public/js/toolbar.js
index d2ca512fa6f..2566fcb6a3a 100644
--- a/public/js/toolbar.js
+++ b/public/js/toolbar.js
@@ -20,20 +20,6 @@ erpnext.toolbar.setup = function() {
'+wn._('Live Chat')+'');
}
- erpnext.toolbar.set_new_comments();
-
$("#toolbar-tools").append(' \
Latest Updates ');
-}
-
-erpnext.toolbar.set_new_comments = function(new_comments) {
- return;
- var navbar_nc = $('.navbar-new-comments');
- if(cint(new_comments)) {
- navbar_nc.addClass('navbar-new-comments-true')
- navbar_nc.text(new_comments);
- } else {
- navbar_nc.removeClass('navbar-new-comments-true');
- navbar_nc.text(0);
- }
}
\ No newline at end of file
diff --git a/selling/doctype/customer/customer.py b/selling/doctype/customer/customer.py
index 2eabf12ddec..cb19d4f931c 100644
--- a/selling/doctype/customer/customer.py
+++ b/selling/doctype/customer/customer.py
@@ -17,10 +17,7 @@ class DocType(TransactionBase):
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclist
-
- def onload(self):
- self.add_communication_list()
-
+
def autoname(self):
cust_master_name = webnotes.defaults.get_global_default('cust_master_name')
if cust_master_name == 'Customer Name':
diff --git a/selling/doctype/customer/customer.txt b/selling/doctype/customer/customer.txt
index 7da29d2adb9..94bd8fceb43 100644
--- a/selling/doctype/customer/customer.txt
+++ b/selling/doctype/customer/customer.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-06-11 14:26:44",
"docstatus": 0,
- "modified": "2013-08-08 14:22:13",
+ "modified": "2013-09-02 16:25:13",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -348,6 +348,15 @@
"options": "Customer Discount",
"permlevel": 0
},
+ {
+ "doctype": "DocField",
+ "fieldname": "communications",
+ "fieldtype": "Table",
+ "hidden": 1,
+ "label": "Communications",
+ "options": "Communication",
+ "permlevel": 0
+ },
{
"amend": 0,
"cancel": 0,
diff --git a/selling/doctype/lead/get_leads.py b/selling/doctype/lead/get_leads.py
index c376f450a4a..3305a3b9f6e 100644
--- a/selling/doctype/lead/get_leads.py
+++ b/selling/doctype/lead/get_leads.py
@@ -9,17 +9,8 @@ from core.doctype.communication.communication import make
def add_sales_communication(subject, content, sender, real_name, mail=None,
status="Open", date=None):
- def set_status(doctype, name):
- w = webnotes.bean(doctype, name)
- w.ignore_permissions = True
- w.doc.status = is_system_user and "Replied" or status
- w.doc.save()
- if mail:
- mail.save_attachments_in_doc(w.doc)
-
lead_name = webnotes.conn.get_value("Lead", {"email_id": sender})
contact_name = webnotes.conn.get_value("Contact", {"email_id": sender})
- is_system_user = webnotes.conn.get_value("Profile", sender)
if not (lead_name or contact_name):
# none, create a new Lead
@@ -34,14 +25,16 @@ def add_sales_communication(subject, content, sender, real_name, mail=None,
lead.insert()
lead_name = lead.doc.name
- make(content=content, sender=sender, subject=subject,
- lead=lead_name, contact=contact_name, date=date)
-
- if contact_name:
- set_status("Contact", contact_name)
- elif lead_name:
- set_status("Lead", lead_name)
+ parent_doctype = "Contact" if contact_name else "Lead"
+ parent_name = contact_name or lead_name
+
+ message = make(content=content, sender=sender, subject=subject,
+ doctype = parent_doctype, name = parent_name, date=date)
+ if mail:
+ # save attachments to parent if from mail
+ bean = webnotes.bean(parent_doctype, parent_name)
+ mail.save_attachments_in_doc(bean.doc)
class SalesMailbox(POP3Mailbox):
def setup(self, args=None):
diff --git a/selling/doctype/lead/lead.py b/selling/doctype/lead/lead.py
index b2016aa7a90..063c5f0d09b 100644
--- a/selling/doctype/lead/lead.py
+++ b/selling/doctype/lead/lead.py
@@ -24,7 +24,6 @@ class DocType(SellingController):
})
def onload(self):
- self.add_communication_list()
customer = webnotes.conn.get_value("Customer", {"lead_name": self.doc.name})
if customer:
self.doc.fields["__is_customer"] = customer
@@ -39,17 +38,14 @@ class DocType(SellingController):
def validate(self):
if self.doc.status == 'Lead Lost' and not self.doc.order_lost_reason:
- msgprint("Please Enter Lost Reason under More Info section")
- raise Exception
+ webnotes.throw("Please Enter Lost Reason under More Info section")
if self.doc.source == 'Campaign' and not self.doc.campaign_name and session['user'] != 'Guest':
- msgprint("Please specify campaign name")
- raise Exception
+ webnotes.throw("Please specify campaign name")
if self.doc.email_id:
if not validate_email_add(self.doc.email_id):
- msgprint('Please enter valid email id.')
- raise Exception
+ webnotes.throw('Please enter valid email id.')
def on_update(self):
self.check_email_id_is_unique()
diff --git a/selling/doctype/lead/lead.txt b/selling/doctype/lead/lead.txt
index d66c6a0269a..9402259ac73 100644
--- a/selling/doctype/lead/lead.txt
+++ b/selling/doctype/lead/lead.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-04-10 11:45:37",
"docstatus": 0,
- "modified": "2013-08-08 14:22:14",
+ "modified": "2013-09-02 17:25:59",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -410,6 +410,14 @@
"fieldtype": "Check",
"label": "Blog Subscriber"
},
+ {
+ "doctype": "DocField",
+ "fieldname": "communications",
+ "fieldtype": "Table",
+ "hidden": 1,
+ "label": "Communications",
+ "options": "Communication"
+ },
{
"cancel": 1,
"doctype": "DocPerm",
diff --git a/selling/doctype/opportunity/opportunity.py b/selling/doctype/opportunity/opportunity.py
index 906e5470b0c..a3ef1976d95 100644
--- a/selling/doctype/opportunity/opportunity.py
+++ b/selling/doctype/opportunity/opportunity.py
@@ -25,9 +25,6 @@ class DocType(TransactionBase):
"contact_by": webnotes.conn.get_value("Opportunity", self.doc.name, "contact_by") if \
(not cint(self.doc.fields.get("__islocal"))) else None,
})
-
- def onload(self):
- self.add_communication_list()
def get_item_details(self, item_code):
item = sql("""select item_name, stock_uom, description_html, description, item_group, brand
diff --git a/selling/doctype/opportunity/opportunity.txt b/selling/doctype/opportunity/opportunity.txt
index 5b1d93f9627..4ca1564c7d0 100644
--- a/selling/doctype/opportunity/opportunity.txt
+++ b/selling/doctype/opportunity/opportunity.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 18:50:30",
"docstatus": 0,
- "modified": "2013-08-08 14:22:15",
+ "modified": "2013-09-02 16:27:33",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -442,6 +442,14 @@
"read_only": 1,
"width": "150px"
},
+ {
+ "doctype": "DocField",
+ "fieldname": "communications",
+ "fieldtype": "Table",
+ "hidden": 1,
+ "label": "Communications",
+ "options": "Communication"
+ },
{
"doctype": "DocPerm",
"role": "Sales User"
diff --git a/selling/doctype/quotation/quotation.py b/selling/doctype/quotation/quotation.py
index b6ff1d7fd9a..c1b529ca695 100644
--- a/selling/doctype/quotation/quotation.py
+++ b/selling/doctype/quotation/quotation.py
@@ -20,9 +20,6 @@ class DocType(SellingController):
self.doclist = doclist
self.tname = 'Quotation Item'
self.fname = 'quotation_details'
-
- def onload(self):
- self.add_communication_list()
# Get contact person details based on customer selected
# ------------------------------------------------------
diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt
index c3b24347ff1..9d47259d806 100644
--- a/selling/doctype/quotation/quotation.txt
+++ b/selling/doctype/quotation/quotation.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:08",
"docstatus": 0,
- "modified": "2013-08-09 14:46:11",
+ "modified": "2013-09-02 16:25:01",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -835,6 +835,14 @@
"read_only": 0,
"width": "40px"
},
+ {
+ "doctype": "DocField",
+ "fieldname": "communications",
+ "fieldtype": "Table",
+ "hidden": 1,
+ "label": "Communications",
+ "options": "Communication"
+ },
{
"amend": 1,
"cancel": 1,
diff --git a/setup/doctype/sales_person/sales_person.txt b/setup/doctype/sales_person/sales_person.txt
index 77ba6afd4ea..d78b5c8d274 100644
--- a/setup/doctype/sales_person/sales_person.txt
+++ b/setup/doctype/sales_person/sales_person.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:24",
"docstatus": 0,
- "modified": "2013-08-05 18:11:22",
+ "modified": "2013-09-02 16:26:54",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -160,6 +160,14 @@
"options": "Budget Distribution",
"search_index": 0
},
+ {
+ "doctype": "DocField",
+ "fieldname": "communications",
+ "fieldtype": "Table",
+ "hidden": 1,
+ "label": "Communications",
+ "options": "Communication"
+ },
{
"cancel": 0,
"create": 0,
diff --git a/stock/doctype/item/item.txt b/stock/doctype/item/item.txt
index 8b17aee6bb0..eb05503b329 100644
--- a/stock/doctype/item/item.txt
+++ b/stock/doctype/item/item.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-03 10:45:46",
"docstatus": 0,
- "modified": "2013-08-14 11:46:49",
+ "modified": "2013-08-30 16:21:38",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -35,7 +35,9 @@
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
- "read": 1
+ "read": 1,
+ "report": 1,
+ "submit": 0
},
{
"doctype": "DocType",
@@ -557,20 +559,6 @@
"read_only": 0,
"reqd": 1
},
- {
- "default": "No",
- "depends_on": "eval:doc.is_sales_item==\"Yes\"",
- "description": "Select \"Yes\" if this item is to be sent to a customer or received from a supplier as a sample. Delivery notes and Purchase Receipts will update stock levels but there will be no invoice against this item.",
- "doctype": "DocField",
- "fieldname": "is_sample_item",
- "fieldtype": "Select",
- "label": "Allow Samples",
- "oldfieldname": "is_sample_item",
- "oldfieldtype": "Select",
- "options": "Yes\nNo",
- "read_only": 0,
- "reqd": 1
- },
{
"depends_on": "eval:doc.is_sales_item==\"Yes\"",
"doctype": "DocField",
@@ -878,9 +866,7 @@
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
- "report": 1,
"role": "Material Master Manager",
- "submit": 0,
"write": 1
},
{
@@ -888,9 +874,7 @@
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
- "report": 1,
"role": "Material Manager",
- "submit": 0,
"write": 0
},
{
@@ -898,21 +882,7 @@
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
- "report": 1,
"role": "Material User",
- "submit": 0,
"write": 0
- },
- {
- "doctype": "DocPerm",
- "role": "Sales User"
- },
- {
- "doctype": "DocPerm",
- "role": "Purchase User"
- },
- {
- "doctype": "DocPerm",
- "role": "Accounts User"
}
]
\ No newline at end of file
diff --git a/stock/doctype/item/test_item.py b/stock/doctype/item/test_item.py
index b9b67e2db1f..7be6ea56edc 100644
--- a/stock/doctype/item/test_item.py
+++ b/stock/doctype/item/test_item.py
@@ -44,7 +44,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
- "is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
@@ -82,7 +81,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
- "is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
@@ -108,7 +106,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
- "is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
@@ -128,7 +125,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
- "is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
@@ -149,7 +145,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
- "is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "Yes",
"is_sub_contracted_item": "Yes",
@@ -168,7 +163,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
- "is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
@@ -188,7 +182,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
- "is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
@@ -209,7 +202,6 @@ test_records = [
"is_purchase_item": "Yes",
"is_sales_item": "Yes",
"is_service_item": "No",
- "is_sample_item": "No",
"inspection_required": "No",
"is_pro_applicable": "No",
"is_sub_contracted_item": "No",
diff --git a/stock/doctype/stock_reconciliation/stock_reconciliation.py b/stock/doctype/stock_reconciliation/stock_reconciliation.py
index 617ec698c4a..dbb0a348c3f 100644
--- a/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -293,7 +293,7 @@ class DocType(StockController):
self.doc.stock_value_difference = 0.0
for d in self.entries:
- self.doc.stock_value_difference -= get_buying_amount(d.item_code, self.doc.doctype, self.doc.name,
+ self.doc.stock_value_difference -= get_buying_amount(self.doc.doctype, self.doc.name,
d.voucher_detail_no, stock_ledger_entries.get((d.item_code, d.warehouse), []))
webnotes.conn.set(self.doc, "stock_value_difference", self.doc.stock_value_difference)
diff --git a/stock/report/items_to_be_requested/items_to_be_requested.txt b/stock/report/items_to_be_requested/items_to_be_requested.txt
index c149c969409..91e8ca3f269 100644
--- a/stock/report/items_to_be_requested/items_to_be_requested.txt
+++ b/stock/report/items_to_be_requested/items_to_be_requested.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-08-20 15:08:10",
"docstatus": 0,
- "modified": "2013-08-20 15:10:43",
+ "modified": "2013-08-20 15:10:45",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -10,7 +10,7 @@
"doctype": "Report",
"is_standard": "Yes",
"name": "__common__",
- "query": "SELECT\n tabBin.item_code as \"Item:Link/Item:120\",\n tabBin.warehouse as \"Item:Link/Warehouse:120\",\n tabBin.actual_qty as \"Actual:Float:90\",\n tabBin.indented_qty as \"Requested:Float:90\",\n tabBin.reserved_qty as \"Reserved:Float:90\",\n tabBin.ordered_qty as \"Ordered:Float:90\",\n tabBin.projected_qty as \"Projected:Float:90\"\nFROM\n tabBin, tabItem\nWHERE\n tabBin.item_code = tabItem.name\n AND tabItem.is_purchase_item = \"Yes\"\n AND tabBin.projected_qty < 0\nORDER BY\n tabBin.projected_qty ASC",
+ "query": "SELECT\n tabBin.item_code as \"Item:Link/Item:120\",\n tabBin.warehouse as \"Warehouse:Link/Warehouse:120\",\n tabBin.actual_qty as \"Actual:Float:90\",\n tabBin.indented_qty as \"Requested:Float:90\",\n tabBin.reserved_qty as \"Reserved:Float:90\",\n tabBin.ordered_qty as \"Ordered:Float:90\",\n tabBin.projected_qty as \"Projected:Float:90\"\nFROM\n tabBin, tabItem\nWHERE\n tabBin.item_code = tabItem.name\n AND tabItem.is_purchase_item = \"Yes\"\n AND tabBin.projected_qty < 0\nORDER BY\n tabBin.projected_qty ASC",
"ref_doctype": "Item",
"report_name": "Items To Be Requested",
"report_type": "Query Report"
diff --git a/stock/utils.py b/stock/utils.py
index f04b6632369..52471e4c6fd 100644
--- a/stock/utils.py
+++ b/stock/utils.py
@@ -164,20 +164,18 @@ def validate_warehouse_user(warehouse):
webnotes.throw(_("Not allowed entry in Warehouse") \
+ ": " + warehouse, UserNotAllowedForWarehouse)
-def get_buying_amount(item_code, voucher_type, voucher_no, voucher_detail_no,
- stock_ledger_entries, item_sales_bom=None):
- if item_sales_bom and item_sales_bom.get(item_code):
- # sales bom item
- buying_amount = 0.0
- for bom_item in item_sales_bom[item_code]:
- if bom_item.get("parent_detail_docname")==voucher_detail_no:
- buying_amount += _get_buying_amount(voucher_type, voucher_no, voucher_detail_no, stock_ledger_entries)
- return buying_amount
- else:
- # doesn't have sales bom
- return _get_buying_amount(voucher_type, voucher_no, voucher_detail_no, stock_ledger_entries)
+def get_sales_bom_buying_amount(item_code, warehouse, voucher_type, voucher_no, voucher_detail_no,
+ stock_ledger_entries, item_sales_bom):
+ # sales bom item
+ buying_amount = 0.0
+ for bom_item in item_sales_bom[item_code]:
+ if bom_item.get("parent_detail_docname")==voucher_detail_no:
+ buying_amount += get_buying_amount(voucher_type, voucher_no, voucher_detail_no,
+ stock_ledger_entries.get((bom_item.item_code, warehouse), []))
+
+ return buying_amount
-def _get_buying_amount(voucher_type, voucher_no, item_row, stock_ledger_entries):
+def get_buying_amount(voucher_type, voucher_no, item_row, stock_ledger_entries):
# IMP NOTE
# stock_ledger_entries should already be filtered by item_code and warehouse and
# sorted by posting_date desc, posting_time desc
diff --git a/support/doctype/support_ticket/get_support_mails.py b/support/doctype/support_ticket/get_support_mails.py
index 7e09846dda5..fb26e570d7c 100644
--- a/support/doctype/support_ticket/get_support_mails.py
+++ b/support/doctype/support_ticket/get_support_mails.py
@@ -46,7 +46,7 @@ class SupportMailbox(POP3Mailbox):
make(content=mail.content, sender=mail.from_email, subject = ticket.doc.subject,
doctype="Support Ticket", name=ticket.doc.name,
- lead = ticket.doc.lead, contact=ticket.doc.contact, date=mail.date)
+ date=mail.date)
if new_ticket and cint(self.email_settings.send_autoreply) and \
"mailer-daemon" not in mail.from_email.lower():
diff --git a/support/doctype/support_ticket/support_ticket.js b/support/doctype/support_ticket/support_ticket.js
index 2c1f3322f33..0e612734393 100644
--- a/support/doctype/support_ticket/support_ticket.js
+++ b/support/doctype/support_ticket/support_ticket.js
@@ -46,16 +46,12 @@ $.extend(cur_frm.cscript, {
make_listing: function(doc) {
var wrapper = cur_frm.fields_dict['thread_html'].wrapper;
- var comm_list = wn.model.get("Communication", {"support_ticket": doc.name})
-
- var sortfn = function (a, b) { return (b.creation > a.creation) ? 1 : -1; }
- comm_list = comm_list.sort(sortfn);
+ var comm_list = wn.model.get("Communication", {"parent": doc.name, "parenttype":"Support Ticket"})
- if(!comm_list.length || (comm_list[comm_list.length - 1].sender != doc.raised_by)) {
+ if(!comm_list.length) {
comm_list.push({
"sender": doc.raised_by,
"creation": doc.creation,
- "modified": doc.creation,
"content": doc.description});
}
diff --git a/support/doctype/support_ticket/support_ticket.py b/support/doctype/support_ticket/support_ticket.py
index 2b8fe85c98b..8e723ee3c10 100644
--- a/support/doctype/support_ticket/support_ticket.py
+++ b/support/doctype/support_ticket/support_ticket.py
@@ -11,9 +11,6 @@ class DocType(TransactionBase):
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclist
-
- def onload(self):
- self.add_communication_list()
def get_sender(self, comm):
return webnotes.conn.get_value('Email Settings',None,'support_email')
@@ -53,7 +50,7 @@ class DocType(TransactionBase):
if not self.doc.company:
self.doc.company = webnotes.conn.get_value("Lead", self.doc.lead, "company") or \
webnotes.conn.get_default("company")
-
+
def on_trash(self):
webnotes.conn.sql("""update `tabCommunication` set support_ticket=NULL
where support_ticket=%s""", (self.doc.name,))
diff --git a/support/doctype/support_ticket/support_ticket.txt b/support/doctype/support_ticket/support_ticket.txt
index 53d1c7ca41d..01d0e353880 100644
--- a/support/doctype/support_ticket/support_ticket.txt
+++ b/support/doctype/support_ticket/support_ticket.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-02-01 10:36:25",
"docstatus": 0,
- "modified": "2013-08-08 14:22:34",
+ "modified": "2013-09-02 16:24:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -224,17 +224,6 @@
"oldfieldtype": "Column Break",
"read_only": 1
},
- {
- "depends_on": "eval:!doc.__islocal",
- "doctype": "DocField",
- "fieldname": "resolution_details",
- "fieldtype": "Small Text",
- "label": "Resolution Details",
- "no_copy": 1,
- "oldfieldname": "resolution_details",
- "oldfieldtype": "Text",
- "read_only": 1
- },
{
"doctype": "DocField",
"fieldname": "first_responded_on",
@@ -254,6 +243,17 @@
"read_only": 1,
"search_index": 0
},
+ {
+ "depends_on": "eval:!doc.__islocal",
+ "doctype": "DocField",
+ "fieldname": "resolution_details",
+ "fieldtype": "Small Text",
+ "label": "Resolution Details",
+ "no_copy": 1,
+ "oldfieldname": "resolution_details",
+ "oldfieldtype": "Text",
+ "read_only": 0
+ },
{
"doctype": "DocField",
"fieldname": "content_type",
@@ -261,6 +261,14 @@
"hidden": 1,
"label": "Content Type"
},
+ {
+ "doctype": "DocField",
+ "fieldname": "communications",
+ "fieldtype": "Table",
+ "hidden": 1,
+ "label": "Communications",
+ "options": "Communication"
+ },
{
"cancel": 0,
"doctype": "DocPerm",
diff --git a/utilities/demo/demo-login.html b/utilities/demo/demo-login.html
index ef24678e27a..4595cb7d355 100644
--- a/utilities/demo/demo-login.html
+++ b/utilities/demo/demo-login.html
@@ -8,7 +8,7 @@
+ class="form-control" placeholder="Your Email Id (optional)">
0 and ifnull(disabled,0)=0
+ order by posts desc""", as_dict=1)
+
+ args = {
+ "bloggers": bloggers,
+ "texts": {
+ "all_posts_by": _("All posts by")
+ },
+ "categories": webnotes.conn.sql_list("select name from `tabBlog Category` order by name")
+ }
+
+ args.update(webnotes.doc("Blog Settings", "Blog Settings").fields)
+ return args
\ No newline at end of file
diff --git a/website/doctype/blogger/blogger.txt b/website/doctype/blogger/blogger.txt
index e2b4367efb2..1486c01247e 100644
--- a/website/doctype/blogger/blogger.txt
+++ b/website/doctype/blogger/blogger.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-03-25 16:00:51",
"docstatus": 0,
- "modified": "2013-07-05 14:27:34",
+ "modified": "2013-08-30 16:35:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -39,6 +39,12 @@
"doctype": "DocType",
"name": "Blogger"
},
+ {
+ "doctype": "DocField",
+ "fieldname": "disabled",
+ "fieldtype": "Check",
+ "label": "Disabled"
+ },
{
"description": "Will be used in url (usually first name).",
"doctype": "DocField",
diff --git a/website/helpers/blog.py b/website/helpers/blog.py
index f8f7a421d60..3f6d94fa6c5 100644
--- a/website/helpers/blog.py
+++ b/website/helpers/blog.py
@@ -119,18 +119,3 @@ def get_blog_template_args():
}
args.update(webnotes.doc("Blog Settings", "Blog Settings").fields)
return args
-
-def get_writers_args():
- bloggers = webnotes.conn.sql("""select * from `tabBlogger`
- order by posts desc""", as_dict=1)
-
- args = {
- "bloggers": bloggers,
- "texts": {
- "all_posts_by": _("All posts by")
- },
- "categories": webnotes.conn.sql_list("select name from `tabBlog Category` order by name")
- }
-
- args.update(webnotes.doc("Blog Settings", "Blog Settings").fields)
- return args
\ No newline at end of file
diff --git a/website/helpers/contact.py b/website/helpers/contact.py
index 05ae4f797e1..35446a3d241 100644
--- a/website/helpers/contact.py
+++ b/website/helpers/contact.py
@@ -20,7 +20,7 @@ def send_message(subject="Website Query", message="", sender="", status="Open"):
# make lead / communication
from selling.doctype.lead.get_leads import add_sales_communication
- add_sales_communication(subject or "Website Query", message, sender, sender,
+ message = add_sales_communication(subject or "Website Query", message, sender, sender,
mail=None, status=status)
# guest method, cap max writes per hour
@@ -29,4 +29,4 @@ def send_message(subject="Website Query", message="", sender="", status="Open"):
webnotes.response["message"] = "Sorry: we believe we have received an unreasonably high number of requests of this kind. Please try later"
return
- webnotes.response["message"] = 'Thank You'
\ No newline at end of file
+ webnotes.response.status = "okay"
diff --git a/website/templates/css/blog_page.css b/website/templates/css/blog_page.css
index ffa45b41151..8f56cd2fec1 100644
--- a/website/templates/css/blog_page.css
+++ b/website/templates/css/blog_page.css
@@ -1,8 +1,4 @@