From af111e9c43cb3775d93b76d65917c74fed1b0e90 Mon Sep 17 00:00:00 2001 From: pawan Date: Mon, 12 Sep 2016 15:15:32 +0530 Subject: [PATCH] [fix] #6195 --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 2 +- erpnext/stock/doctype/stock_entry/stock_entry.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index 9223cdb3f0..b052e4d141 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -57,7 +57,7 @@ class GLEntry(Document): def pl_must_have_cost_center(self): if frappe.db.get_value("Account", self.account, "report_type") == "Profit and Loss": if not self.cost_center and self.voucher_type != 'Period Closing Voucher': - frappe.throw(_("Cost Center is required for 'Profit and Loss' account {0}") + frappe.throw(_("Cost Center is required for 'Profit and Loss' account {0}. Please set up a default Cost Center for the Company.") .format(self.account)) else: if self.cost_center: diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index e35f3d2965..90315c7ee0 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -162,7 +162,7 @@ class StockEntry(StockController): if not d.s_warehouse: frappe.throw(_("Source warehouse is mandatory for row {0}").format(d.idx)) - if cstr(d.s_warehouse) == cstr(d.t_warehouse): + if cstr(d.s_warehouse) == cstr(d.t_warehouse) and not self.purpose == "Material Transfer for Manufacture": frappe.throw(_("Source and target warehouse cannot be same for row {0}").format(d.idx)) def validate_production_order(self):