Compare commits

...

8 Commits

Author SHA1 Message Date
Anand Doshi
f37884472d Merge branch 'develop' 2015-08-20 18:47:19 +05:30
Anand Doshi
e9cebd4de3 bumped to version 5.7.5 2015-08-20 19:17:19 +06:00
Anand Doshi
db1a9edbdf [minor] removed test case of template cannot have stock 2015-08-20 18:20:06 +05:30
Anand Doshi
5c85740aab [minor] don't validate stock for template item 2015-08-20 17:43:35 +05:30
Anand Doshi
8554cbf001 [minor] fixed patch item template attributes 2015-08-20 17:43:35 +05:30
Anand Doshi
0e90e8e8dc Merge branch 'develop' 2015-08-20 15:45:07 +05:30
Anand Doshi
30d3eb3d4b bumped to version 5.7.4 2015-08-20 16:15:07 +06:00
Anand Doshi
cf7adb5c02 [patch] re-run repost_reserved_qty 2015-08-20 15:42:58 +05:30
7 changed files with 16 additions and 10 deletions

View File

@@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '5.7.3'
__version__ = '5.7.5'

View File

@@ -27,7 +27,7 @@ blogs.
"""
app_icon = "icon-th"
app_color = "#e74c3c"
app_version = "5.7.3"
app_version = "5.7.5"
github_link = "https://github.com/frappe/erpnext"
error_report_email = "support@erpnext.com"

View File

@@ -191,5 +191,5 @@ erpnext.patches.v5_4.stock_entry_additional_costs
erpnext.patches.v5_4.cleanup_journal_entry #2015-08-14
execute:frappe.db.sql("update `tabProduction Order` pro set description = (select description from tabItem where name=pro.production_item) where ifnull(description, '') = ''")
erpnext.patches.v5_7.item_template_attributes
erpnext.patches.v4_2.repost_reserved_qty #2015-08-17
erpnext.patches.v4_2.repost_reserved_qty #2015-08-20
erpnext.patches.v5_4.update_purchase_cost_against_project

View File

@@ -65,6 +65,12 @@ def migrate_item_variants():
item_attributes = frappe.db.sql("""select distinct item_attribute, item_attribute_value
from `tabItem Variant` where parent=%s""", item.name)
if not item_attributes and not all_variants:
item = frappe.get_doc("Item", item.name)
item.has_variants = 0
item.save()
continue
attribute_value_options = {}
for attribute, value in item_attributes:
attribute_value_options.setdefault(attribute, []).append(value)

View File

@@ -64,7 +64,7 @@ class Item(WebsiteGenerator):
self.update_item_desc()
self.synced_with_hub = 0
self.validate_has_variants()
self.validate_stock_for_template_must_be_zero()
# self.validate_stock_for_template_must_be_zero()
self.validate_attributes()
self.validate_variant_attributes()

View File

@@ -46,11 +46,11 @@ class TestItem(unittest.TestCase):
item = frappe.get_doc("Item", item_code)
return item
def test_template_cannot_have_stock(self):
item = self.get_item(10)
make_stock_entry(item_code=item.name, target="Stores - _TC", qty=1, basic_rate=1)
item.has_variants = 1
self.assertRaises(ItemTemplateCannotHaveStock, item.save)
# def test_template_cannot_have_stock(self):
# item = self.get_item(10)
# make_stock_entry(item_code=item.name, target="Stores - _TC", qty=1, basic_rate=1)
# item.has_variants = 1
# self.assertRaises(ItemTemplateCannotHaveStock, item.save)
def test_default_warehouse(self):
item = frappe.copy_doc(test_records[0])

View File

@@ -1,6 +1,6 @@
from setuptools import setup, find_packages
version = "5.7.3"
version = "5.7.5"
with open("requirements.txt", "r") as f:
install_requires = f.readlines()