diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 349cc44bd0..ebfb9bf6b4 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.15.4' +__version__ = '4.16.0' diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index c658cdd09f..0a05275bca 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -28,7 +28,7 @@ def get_fiscal_years(date=None, fiscal_year=None, label="Date", verbose=1): from `tabFiscal Year` where %s order by year_start_date desc""" % cond) if not fy: - error_msg = _("""{0} {1} not in any Fiscal Year""").format(label, formatdate(date)) + error_msg = _("""{0} {1} not in any Fiscal Year. For more details check {2}.""").format(label, formatdate(date), "https://erpnext.com/kb/accounts/fiscal-year-error") if verbose: frappe.msgprint(error_msg) raise FiscalYearError, error_msg diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js index 3681081c95..3011160639 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -211,7 +211,8 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ var tax_count = this.frm.tax_doclist.length; this.frm.doc.grand_total = flt(tax_count ? this.frm.tax_doclist[tax_count - 1].total : this.frm.doc.net_total); - this.frm.doc.grand_total_import = flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate); + this.frm.doc.grand_total_import = flt(tax_count ? + flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate) : this.frm.doc.net_total_import); this.frm.doc.total_tax = flt(this.frm.doc.grand_total - this.frm.doc.net_total, precision("total_tax")); diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index f6d47dd420..02fdf2ca99 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -471,7 +471,7 @@ class AccountsController(TransactionBase): max_allowed_amt = flt(ref_amt * (100 + tolerance) / 100) if total_billed_amt - max_allowed_amt > 0.01: - frappe.throw(_("Cannot overbill for Item {0} in row {0} more than {1}. To allow overbilling, please set in Stock Settings").format(item.item_code, item.idx, max_allowed_amt)) + frappe.throw(_("Cannot overbill for Item {0} in row {1} more than {2}. To allow overbilling, please set in Stock Settings").format(item.item_code, item.idx, max_allowed_amt)) def get_company_default(self, fieldname): from erpnext.accounts.utils import get_company_default diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 1e6e65d86b..f7b5a87d56 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -111,7 +111,8 @@ class BuyingController(StockController): def calculate_totals(self): self.grand_total = flt(self.tax_doclist[-1].total if self.tax_doclist else self.net_total) - self.grand_total_import = flt(self.grand_total / self.conversion_rate) + self.grand_total_import = flt(self.grand_total / self.conversion_rate) \ + if self.tax_doclist else self.net_total_import self.total_tax = flt(self.grand_total - self.net_total, self.precision("total_tax")) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 6e93c30797..68cdf189bd 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -218,7 +218,8 @@ class SellingController(StockController): def calculate_totals(self): self.grand_total = flt(self.tax_doclist[-1].total if self.tax_doclist else self.net_total) - self.grand_total_export = flt(self.grand_total / self.conversion_rate) + self.grand_total_export = flt(self.grand_total / self.conversion_rate) \ + if self.tax_doclist else self.net_total_export self.other_charges_total = flt(self.grand_total - self.net_total, self.precision("other_charges_total")) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 0a9adc0e05..754a7d8ad7 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -167,7 +167,7 @@ class StockController(AccountsController): else: is_expense_account = frappe.db.get_value("Account", item.get("expense_account"), "report_type")=="Profit and Loss" - if self.doctype not in ("Purchase Receipt", "Stock Reconciliation") and not is_expense_account: + if self.doctype not in ("Purchase Receipt", "Stock Reconciliation", "Stock Entry") and not is_expense_account: frappe.throw(_("Expense / Difference account ({0}) must be a 'Profit or Loss' account") .format(item.get("expense_account"))) if is_expense_account and not item.get("cost_center"): diff --git a/erpnext/hooks.py b/erpnext/hooks.py index f033d687be..d8b8a2e023 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "4.15.4" +app_version = "4.16.0" error_report_email = "support@erpnext.com" diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index 783474c75f..c7c21fdda9 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -342,7 +342,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ var tax_count = this.frm.tax_doclist.length; this.frm.doc.grand_total = flt(tax_count ? this.frm.tax_doclist[tax_count - 1].total : this.frm.doc.net_total); - this.frm.doc.grand_total_export = flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate); + this.frm.doc.grand_total_export = flt(tax_count ? + flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate) : this.frm.doc.net_total_export); this.frm.doc.other_charges_total = flt(this.frm.doc.grand_total - this.frm.doc.net_total, precision("other_charges_total")); diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index b8a31909ce..366e8282f1 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -229,7 +229,7 @@ class Item(WebsiteGenerator): if not frappe.db.exists("Item", newdn): frappe.throw(_("Item {0} does not exist").format(newdn)) - field_list = ["stock_uom", "is_stock_item", "has_serial_no", "has_batch_no"] + field_list = ["stock_uom", "is_stock_item", "has_serial_no", "has_batch_no", "is_manufactured_item"] new_properties = [cstr(d) for d in frappe.db.get_value("Item", newdn, field_list)] if new_properties != [cstr(self.get(fld)) for fld in field_list]: frappe.throw(_("To merge, following properties must be same for both items") diff --git a/setup.py b/setup.py index 24e0155468..4df95668d4 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.15.4" +version = "4.16.0" with open("requirements.txt", "r") as f: install_requires = f.readlines()