From 17089eeac336a57781c966871505cd8fc6cc6d27 Mon Sep 17 00:00:00 2001 From: Zarrar Date: Thu, 14 Jun 2018 11:54:18 +0530 Subject: [PATCH] [Minor] Fetching and appending items in Stock Reconciliation fix (#14509) * minor fix in get_list of items in stock reconciliation * reload doc fails because of backdated modified date * item and item defaults should load prior to shopify refactor * attribute value should't be none or empty, could be zero though * Update item.py --- .../buying/doctype/supplier_quotation/supplier_quotation.json | 2 +- erpnext/patches.txt | 2 +- erpnext/selling/doctype/quotation/quotation.json | 2 +- erpnext/stock/doctype/delivery_note/delivery_note.json | 2 +- erpnext/stock/doctype/item/item.py | 2 +- erpnext/stock/doctype/purchase_receipt/purchase_receipt.json | 2 +- .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json index 27f24bff05..e954ce2a54 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json @@ -2661,7 +2661,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2018-05-28 02:45:48.616334", + "modified": "2018-06-13 19:07:49.545062", "modified_by": "Administrator", "module": "Buying", "name": "Supplier Quotation", diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 33a7913363..d667c3533c 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -539,8 +539,8 @@ erpnext.patches.v11_0.create_department_records_for_each_company erpnext.patches.v11_0.make_location_from_warehouse erpnext.patches.v11_0.make_asset_finance_book_against_old_entries erpnext.patches.v11_0.check_buying_selling_in_currency_exchange -erpnext.patches.v11_0.refactor_erpnext_shopify erpnext.patches.v11_0.move_item_defaults_to_child_table_for_multicompany +erpnext.patches.v11_0.refactor_erpnext_shopify erpnext.patches.v11_0.rename_overproduction_percent_field erpnext.patches.v11_0.update_backflush_subcontract_rm_based_on_bom erpnext.patches.v10_0.update_status_in_purchase_receipt diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index 6dc2c00e9c..43c2bddb4c 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -3035,7 +3035,7 @@ "istable": 0, "max_attachments": 1, "menu_index": 0, - "modified": "2018-05-28 03:23:15.354674", + "modified": "2018-06-13 19:07:17.343682", "modified_by": "Administrator", "module": "Selling", "name": "Quotation", diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index 12e5b394de..9dde2c38e0 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -3881,7 +3881,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2018-05-28 03:03:35.035396", + "modified": "2018-06-13 19:07:27.314521", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note", diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 90d77fea15..b1e97ada4d 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -728,7 +728,7 @@ class Item(WebsiteGenerator): if self.variant_of and self.variant_based_on == 'Item Attribute': args = {} for d in self.attributes: - if not d.attribute_value: + if cstr(d.attribute_value).strip() == '': frappe.throw(_("Please specify Attribute Value for attribute {0}").format(d.attribute)) args[d.attribute] = d.attribute_value diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json index f94e5a5928..ac3ecdd6b4 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json @@ -3436,7 +3436,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2018-05-28 02:59:59.609643", + "modified": "2018-06-13 19:07:37.183239", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt", diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index e4342339e0..77f5f4131d 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -269,7 +269,7 @@ class StockReconciliation(StockController): @frappe.whitelist() def get_items(warehouse, posting_date, posting_time, company): - items = frappe.get_list("Bin", fields=["item_code"], filters={"warehouse": warehouse}, as_list=1) + items = [d.item_code for d in frappe.get_list("Bin", fields=["item_code"], filters={"warehouse": warehouse})] items += frappe.db.sql_list('''select i.name from `tabItem` i, `tabItem Default` id where i.name = id.parent and i.is_stock_item=1 and i.has_serial_no=0 and i.has_batch_no=0 and i.has_variants=0 and i.disabled=0