Merge pull request #17918 from Alchez/develop-item-code-gen

fix(stock): Remove hardcoded validation for Item
This commit is contained in:
Rushabh Mehta 2019-06-20 14:21:57 +05:30 committed by GitHub
commit 5162b7457f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,8 +67,6 @@ class Item(WebsiteGenerator):
from frappe.model.naming import set_name_by_naming_series
set_name_by_naming_series(self)
self.item_code = self.name
elif not self.item_code:
msgprint(_("Item Code is mandatory because Item is not automatically numbered"), raise_exception=1)
self.item_code = strip(self.item_code)
self.name = self.item_code