Merge pull request #4314 from anandpdoshi/fix/po-non-stock-receive
[fix] Don't show Receive for a Purchase Order having non-stock items, show Close button only for users with Submit rights
diff --git a/erpnext/__version__.py b/erpnext/__version__.py
index 192f4a7..f2ac375 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
from __future__ import unicode_literals
-__version__ = '6.8.1'
+__version__ = '6.8.4'
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index a3c0194..3b33e65 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -29,7 +29,7 @@
"""
app_icon = "icon-th"
app_color = "#e74c3c"
-app_version = "6.8.1"
+app_version = "6.8.4"
app_email = "info@erpnext.com"
app_license = "GNU General Public License (v3)"
source_link = "https://github.com/frappe/erpnext"
diff --git a/erpnext/setup/doctype/email_digest/quotes.py b/erpnext/setup/doctype/email_digest/quotes.py
index d56117a..4b996d9 100644
--- a/erpnext/setup/doctype/email_digest/quotes.py
+++ b/erpnext/setup/doctype/email_digest/quotes.py
@@ -27,6 +27,7 @@
("There is more to life than increasing its speed.", "Mahatma Gandhi"),
("A small body of determined spirits fired by an unquenchable faith in their mission can alter the course of history.", "Mahatma Gandhi"),
("If two wrongs don't make a right, try three.", "Laurence J. Peter"),
+ ("Inspiration exists, but it has to find you working.", "Pablo Picasso"),
]
return random.choice(quotes)
diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py
index 90856ca..2289e26 100644
--- a/erpnext/setup/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/setup_wizard/setup_wizard.py
@@ -255,7 +255,7 @@
for i in xrange(1,6):
if args.get("tax_" + str(i)):
# replace % in case someone also enters the % symbol
- tax_rate = (args.get("tax_rate_" + str(i)) or "").replace("%", "")
+ tax_rate = cstr(args.get("tax_rate_" + str(i)) or "").replace("%", "")
try:
tax_group = frappe.db.get_value("Account", {"company": args.get("company_name"),
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index a795de8..c02d9f1 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -105,7 +105,11 @@
frappe.local.message_log.pop()
except requests.exceptions.HTTPError:
- frappe.msgprint(_("Warning: Invalid Attachment {0}").format(self.website_image))
+ frappe.msgprint(_("Warning: Invalid attachment {0}").format(self.website_image))
+ self.website_image = None
+
+ except requests.exceptions.SSLError:
+ frappe.msgprint(_("Warning: Invalid SSL certificate on attachment {0}").format(self.website_image))
self.website_image = None
# for CSV import
diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py
index 8a1f8c7..398a7c6 100644
--- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py
@@ -74,11 +74,12 @@
from erpnext.stock.doctype.item.test_item import make_item_variant
make_item_variant()
self._test_auto_material_request("_Test Item")
+ self._test_auto_material_request("_Test Item", material_request_type="Transfer")
def test_auto_material_request_for_variant(self):
self._test_auto_material_request("_Test Variant Item-S")
- def _test_auto_material_request(self, item_code):
+ def _test_auto_material_request(self, item_code, material_request_type="Purchase"):
item = frappe.get_doc("Item", item_code)
if item.variant_of:
@@ -101,6 +102,7 @@
# update re-level qty so that it is more than projected_qty
if projected_qty >= template.reorder_levels[0].warehouse_reorder_level:
template.reorder_levels[0].warehouse_reorder_level += projected_qty
+ template.reorder_levels[0].material_request_type = material_request_type
template.save()
from erpnext.stock.reorder_item import reorder_item
diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py
index bf06396..ff943d2 100644
--- a/erpnext/stock/reorder_item.py
+++ b/erpnext/stock/reorder_item.py
@@ -114,7 +114,7 @@
mr.update({
"company": company,
"transaction_date": nowdate(),
- "material_request_type": request_type
+ "material_request_type": "Material Transfer" if request_type=="Transfer" else request_type
})
for d in items:
diff --git a/setup.py b/setup.py
index 2fbd4d3..51dd9e4 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages
-version = "6.8.1"
+version = "6.8.4"
with open("requirements.txt", "r") as f:
install_requires = f.readlines()