From 4c058f405614cecf03a5d4a076ab327b30e6cf24 Mon Sep 17 00:00:00 2001 From: Aditya Duggal Date: Mon, 29 Sep 2014 17:41:19 +0530 Subject: [PATCH 1/9] Added the dynamic link and removed the link column --- .../report/accounts_receivable/accounts_receivable.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 2891b053f0..34dccd0ce0 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -21,7 +21,7 @@ class AccountsReceivableReport(object): def get_columns(self, customer_naming_by): columns = [ _("Posting Date") + ":Date:80", _("Account") + ":Link/Account:150", - _("Voucher Type") + "::110", _("Voucher No") + "::120", "::30", + _("Voucher Type") + "::110", _("Voucher No") + ":Dynamic Link/Voucher Type:120", _("Due Date") + ":Date:80", _("Invoiced Amount") + ":Currency:100", _("Payment Received") + ":Currency:100", _("Outstanding Amount") + ":Currency:100", _("Age") + ":Int:50", "0-30:Currency:100", @@ -64,9 +64,9 @@ class AccountsReceivableReport(object): row += [self.get_territory(gle.account), gle.remarks] data.append(row) - for i in range(0, len(data)): - data[i].insert(4, """""" \ - % ("/".join(["#Form", data[i][2], data[i][3]]),)) + #for i in range(0, len(data)): + # data[i].insert(4, """""" \ + # % ("/".join(["#Form", data[i][2], data[i][3]]),)) return data From a2c9d35efb4acb3f9cd5aaf75dcdc9dea1375fe7 Mon Sep 17 00:00:00 2001 From: Aditya Duggal Date: Mon, 29 Sep 2014 17:44:28 +0530 Subject: [PATCH 2/9] Added the dynamic link field. --- .../report/accounts_receivable/accounts_receivable.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 34dccd0ce0..3a0fb31dea 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -63,11 +63,6 @@ class AccountsReceivableReport(object): row += [self.get_territory(gle.account), gle.remarks] data.append(row) - - #for i in range(0, len(data)): - # data[i].insert(4, """""" \ - # % ("/".join(["#Form", data[i][2], data[i][3]]),)) - return data def get_entries_after(self, report_date): From 3b90de558f93d7956af8936297be9ae211a73f69 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Tue, 30 Sep 2014 12:57:09 +0530 Subject: [PATCH 3/9] Has Batch No field should be freezed #2023 --- erpnext/stock/doctype/batch/batch.py | 11 +++++++++-- erpnext/stock/doctype/batch/test_batch.py | 14 ++++++++++++++ erpnext/stock/doctype/item/item.js | 4 ++-- erpnext/stock/doctype/item/item.py | 5 +++-- .../stock/doctype/item_price/test_item_price.py | 2 +- 5 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 erpnext/stock/doctype/batch/test_batch.py diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 365cb38b60..8b6aed7560 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -3,8 +3,15 @@ from __future__ import unicode_literals import frappe - +from frappe import _ from frappe.model.document import Document class Batch(Document): - pass \ No newline at end of file + + def validate(self): + self.item_has_batch_enabled() + + def item_has_batch_enabled(self): + has_batch_no = frappe.db.get_value("Item",self.item,"has_batch_no") + if has_batch_no =='No': + frappe.throw(_("The selected item cannot have Batch")) \ No newline at end of file diff --git a/erpnext/stock/doctype/batch/test_batch.py b/erpnext/stock/doctype/batch/test_batch.py new file mode 100644 index 0000000000..d664721ba7 --- /dev/null +++ b/erpnext/stock/doctype/batch/test_batch.py @@ -0,0 +1,14 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +import frappe +from frappe.exceptions import ValidationError +import unittest + +class TestBatch(unittest.TestCase): + def test_item_has_batch_enabled(self): + self.assertRaises(ValidationError, frappe.get_doc({ + "doctype": "Batch", + "name": "_test Batch", + "item": "_Test Item" + }).save) \ No newline at end of file diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index c80d19ec9c..fce8dfaf5b 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -19,7 +19,7 @@ cur_frm.cscript.refresh = function(doc) { cur_frm.cscript.edit_prices_button(); if (!doc.__islocal && doc.is_stock_item == 'Yes') { - cur_frm.toggle_enable(['has_serial_no', 'is_stock_item', 'valuation_method'], + cur_frm.toggle_enable(['has_serial_no', 'is_stock_item', 'valuation_method', 'has_batch_no'], (doc.__onload && doc.__onload.sle_exists=="exists") ? false : true); } @@ -185,4 +185,4 @@ cur_frm.cscript.image = function() { else { msgprint(__("You may need to update: {0}", [frappe.meta.get_docfield(cur_frm.doc.doctype, "description_html").label])); } -} +} \ No newline at end of file diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 17fe0ae0a0..b8a31909ce 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -187,13 +187,14 @@ class Item(WebsiteGenerator): def cant_change(self): if not self.get("__islocal"): vals = frappe.db.get_value("Item", self.name, - ["has_serial_no", "is_stock_item", "valuation_method"], as_dict=True) + ["has_serial_no", "is_stock_item", "valuation_method", "has_batch_no"], as_dict=True) if vals and ((self.is_stock_item == "No" and vals.is_stock_item == "Yes") or vals.has_serial_no != self.has_serial_no or + vals.has_batch_no != self.has_batch_no or cstr(vals.valuation_method) != cstr(self.valuation_method)): if self.check_if_sle_exists() == "exists": - frappe.throw(_("As there are existing stock transactions for this item, you can not change the values of 'Has Serial No', 'Is Stock Item' and 'Valuation Method'")) + frappe.throw(_("As there are existing stock transactions for this item, you can not change the values of 'Has Serial No', 'Has Batch No', 'Is Stock Item' and 'Valuation Method'")) def validate_item_type_for_reorder(self): if self.re_order_level or len(self.get("item_reorder", {"material_request_type": "Purchase"})): diff --git a/erpnext/stock/doctype/item_price/test_item_price.py b/erpnext/stock/doctype/item_price/test_item_price.py index 1a430bf9f0..7106a5364e 100644 --- a/erpnext/stock/doctype/item_price/test_item_price.py +++ b/erpnext/stock/doctype/item_price/test_item_price.py @@ -9,6 +9,6 @@ class TestItem(unittest.TestCase): def test_duplicate_item(self): from erpnext.stock.doctype.item_price.item_price import ItemPriceDuplicateItem doc = frappe.copy_doc(test_records[0]) - self.assertRaises(ItemPriceDuplicateItem, doc.insert) + self.assertRaises(ItemPriceDuplicateItem, doc.save) test_records = frappe.get_test_records('Item Price') \ No newline at end of file From 29d1a1c593f38b57b024b8c4a930ab65b10d2bdd Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Tue, 16 Sep 2014 12:28:24 +0530 Subject: [PATCH 4/9] manufacturing and repack sepreted, test cases fixed, patch fixed --- .../production_order/production_order.js | 2 +- .../production_order/production_order.json | 18 +- .../production_order/production_order.py | 4 +- .../production_order/test_production_order.py | 4 +- ...issued_items_against_production_order.json | 4 +- erpnext/patches.txt | 3 +- .../v4_2/seprate_manufacture_and_repack.py | 9 + .../stock/doctype/stock_entry/stock_entry.js | 11 +- .../doctype/stock_entry/stock_entry.json | 1124 ++++++++--------- .../stock/doctype/stock_entry/stock_entry.py | 34 +- .../doctype/stock_entry/stock_entry_list.html | 3 +- .../doctype/stock_entry/test_records.json | 2 +- .../doctype/stock_entry/test_stock_entry.py | 2 +- 13 files changed, 617 insertions(+), 603 deletions(-) create mode 100644 erpnext/patches/v4_2/seprate_manufacture_and_repack.py diff --git a/erpnext/manufacturing/doctype/production_order/production_order.js b/erpnext/manufacturing/doctype/production_order/production_order.js index 89ef846212..fbb9a269c1 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.js +++ b/erpnext/manufacturing/doctype/production_order/production_order.js @@ -96,7 +96,7 @@ cur_frm.cscript['Transfer Raw Materials'] = function() { } cur_frm.cscript['Update Finished Goods'] = function() { - cur_frm.cscript.make_se('Manufacture/Repack'); + cur_frm.cscript.make_se('Manufacture'); } cur_frm.fields_dict['production_item'].get_query = function(doc) { diff --git a/erpnext/manufacturing/doctype/production_order/production_order.json b/erpnext/manufacturing/doctype/production_order/production_order.json index 3c17973f45..b8f65cd0ec 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.json +++ b/erpnext/manufacturing/doctype/production_order/production_order.json @@ -109,15 +109,15 @@ "permlevel": 0 }, { - "depends_on": "eval:doc.docstatus==1", - "description": "Automatically updated via Stock Entry of type Manufacture/Repack", - "fieldname": "produced_qty", - "fieldtype": "Float", - "label": "Manufactured Qty", - "no_copy": 1, - "oldfieldname": "produced_qty", - "oldfieldtype": "Currency", - "permlevel": 0, + "depends_on": "eval:doc.docstatus==1", + "description": "Automatically updated via Stock Entry of type Manufacture or Repack", + "fieldname": "produced_qty", + "fieldtype": "Float", + "label": "Manufactured Qty", + "no_copy": 1, + "oldfieldname": "produced_qty", + "oldfieldtype": "Currency", + "permlevel": 0, "read_only": 1 }, { diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py index 03fdf79ec7..309f47c388 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.py +++ b/erpnext/manufacturing/doctype/production_order/production_order.py @@ -103,7 +103,7 @@ class ProductionOrder(Document): status = "Submitted" if stock_entries: status = "In Process" - produced_qty = stock_entries.get("Manufacture/Repack") + produced_qty = stock_entries.get("Manufacture") if flt(produced_qty) == flt(self.qty): status = "Completed" @@ -113,7 +113,7 @@ class ProductionOrder(Document): def update_produced_qty(self): produced_qty = frappe.db.sql("""select sum(fg_completed_qty) from `tabStock Entry` where production_order=%s and docstatus=1 - and purpose='Manufacture/Repack'""", self.name) + and purpose='Manufacture'""", self.name) produced_qty = flt(produced_qty[0][0]) if produced_qty else 0 if produced_qty > self.qty: diff --git a/erpnext/manufacturing/doctype/production_order/test_production_order.py b/erpnext/manufacturing/doctype/production_order/test_production_order.py index 55125cf848..a9975c1e6f 100644 --- a/erpnext/manufacturing/doctype/production_order/test_production_order.py +++ b/erpnext/manufacturing/doctype/production_order/test_production_order.py @@ -31,7 +31,7 @@ class TestProductionOrder(unittest.TestCase): s.submit() # from wip to fg - s = frappe.get_doc(make_stock_entry(pro_doc.name, "Manufacture/Repack", 4)) + s = frappe.get_doc(make_stock_entry(pro_doc.name, "Manufacture", 4)) s.insert() s.submit() @@ -49,7 +49,7 @@ class TestProductionOrder(unittest.TestCase): test_stock_entry.make_stock_entry("_Test Item", None, "_Test Warehouse - _TC", 100, 100) test_stock_entry.make_stock_entry("_Test Item Home Desktop 100", None, "_Test Warehouse - _TC", 100, 100) - s = frappe.get_doc(make_stock_entry(pro_doc.name, "Manufacture/Repack", 7)) + s = frappe.get_doc(make_stock_entry(pro_doc.name, "Manufacture", 7)) s.insert() self.assertRaises(StockOverProductionError, s.submit) diff --git a/erpnext/manufacturing/report/issued_items_against_production_order/issued_items_against_production_order.json b/erpnext/manufacturing/report/issued_items_against_production_order/issued_items_against_production_order.json index cf539036b5..fe73859298 100644 --- a/erpnext/manufacturing/report/issued_items_against_production_order/issued_items_against_production_order.json +++ b/erpnext/manufacturing/report/issued_items_against_production_order/issued_items_against_production_order.json @@ -6,12 +6,12 @@ "doctype": "Report", "idx": 1, "is_standard": "Yes", - "modified": "2014-06-03 07:18:17.082436", + "modified": "2014-09-17 12:41:55.740299", "modified_by": "Administrator", "module": "Manufacturing", "name": "Issued Items Against Production Order", "owner": "Administrator", - "query": "select\n ste.production_order as \"Production Order:Link/Production Order:120\",\n ste.posting_date as \"Issue Date:Date:140\",\n ste_item.item_code as \"Item Code:Link/Item:120\",\n\tste_item.description as \"Description::150\",\n\tste_item.transfer_qty as \"Qty:Float:100\",\n\tste_item.stock_uom as \"UOM:Link/UOM:80\",\n\tste_item.amount as \"Amount:Currency:120\",\n\tste_item.serial_no as \"Serial No:Link/Serial No:80\",\n\tste_item.s_warehouse as \"Source Warehouse:Link/Warehouse:120\",\n\tste_item.t_warehouse as \"Target Warehouse:Link/Warehouse:120\",\n\tpro.production_item as \"Finished Goods:Link/Item:120\", \n\tste.name as \"Stock Entry:Link/Stock Entry:120\"\nfrom\n\t`tabStock Entry` ste, `tabStock Entry Detail` ste_item, `tabProduction Order` pro\nwhere\n\tifnull(ste.production_order, '') != '' and ste.name = ste_item.parent \n\tand ste.production_order = pro.name and ste.docstatus = 1 \n\tand ste.purpose = 'Manufacture/Repack'\norder by ste.posting_date, ste.production_order, ste_item.item_code", + "query": "select\n ste.production_order as \"Production Order:Link/Production Order:120\",\n ste.posting_date as \"Issue Date:Date:140\",\n ste_item.item_code as \"Item Code:Link/Item:120\",\n\tste_item.description as \"Description::150\",\n\tste_item.transfer_qty as \"Qty:Float:100\",\n\tste_item.stock_uom as \"UOM:Link/UOM:80\",\n\tste_item.amount as \"Amount:Currency:120\",\n\tste_item.serial_no as \"Serial No:Link/Serial No:80\",\n\tste_item.s_warehouse as \"Source Warehouse:Link/Warehouse:120\",\n\tste_item.t_warehouse as \"Target Warehouse:Link/Warehouse:120\",\n\tpro.production_item as \"Finished Goods:Link/Item:120\", \n\tste.name as \"Stock Entry:Link/Stock Entry:120\"\nfrom\n\t`tabStock Entry` ste, `tabStock Entry Detail` ste_item, `tabProduction Order` pro\nwhere\n\tifnull(ste.production_order, '') != '' and ste.name = ste_item.parent \n\tand ste.production_order = pro.name and ste.docstatus = 1 \n\tand ste.purpose = 'Manufacture' or 'Repack'\norder by ste.posting_date, ste.production_order, ste_item.item_code", "ref_doctype": "Production Order", "report_name": "Issued Items Against Production Order", "report_type": "Query Report" diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 2f0dd2ef5e..29049f7def 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -80,4 +80,5 @@ execute:frappe.delete_doc("DocType", "Landed Cost Wizard") erpnext.patches.v4_2.default_website_style erpnext.patches.v4_2.set_company_country erpnext.patches.v4_2.update_sales_order_invoice_field_name -erpnext.patches.v4_2.cost_of_production_cycle \ No newline at end of file +erpnext.patches.v4_2.cost_of_production_cycle +erpnext.patches.v4_2.seprate_manufacture_and_repack \ No newline at end of file diff --git a/erpnext/patches/v4_2/seprate_manufacture_and_repack.py b/erpnext/patches/v4_2/seprate_manufacture_and_repack.py new file mode 100644 index 0000000000..68cb4303cd --- /dev/null +++ b/erpnext/patches/v4_2/seprate_manufacture_and_repack.py @@ -0,0 +1,9 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + frappe.db.sql("""update `tabStock Entry` set purpose='Manufacture' where purpose='Manufacture/Repack' and production_order ifnull(purpose,"")!="" """) + frappe.db.sql("""update `tabStock Entry` set purpose='Repack' where purpose='Manufacture/Repack' and production_order ifnull(purpose,"")="" """) \ No newline at end of file diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 2faa28830c..96dee3da4f 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -120,7 +120,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({ clean_up: function() { // Clear Production Order record from locals, because it is updated via Stock Entry if(this.frm.doc.production_order && - this.frm.doc.purpose == "Manufacture/Repack") { + this.frm.doc.purpose == "Manufacture") { frappe.model.remove_from_locals("Production Order", this.frm.doc.production_order); } @@ -162,7 +162,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({ }, toggle_enable_bom: function() { - this.frm.toggle_enable("bom_no", !this.frm.doc.production_order); + this.frm.toggle_enable("bom_no", this.frm.doc.purpose!="Manufacture"); }, get_doctype_docname: function() { @@ -339,6 +339,8 @@ cur_frm.cscript.toggle_related_fields = function(doc) { cur_frm.fields_dict["mtn_details"].grid.set_column_disp("s_warehouse", !disable_from_warehouse); cur_frm.fields_dict["mtn_details"].grid.set_column_disp("t_warehouse", !disable_to_warehouse); + cur_frm.cscript.toggle_enable_bom(); + if(doc.purpose == 'Purchase Return') { doc.customer = doc.customer_name = doc.customer_address = doc.delivery_note_no = doc.sales_invoice_no = null; @@ -351,6 +353,8 @@ cur_frm.cscript.toggle_related_fields = function(doc) { doc.delivery_note_no = doc.sales_invoice_no = doc.supplier = doc.supplier_name = doc.supplier_address = doc.purchase_receipt_no = null; } + + } cur_frm.fields_dict['production_order'].get_query = function(doc) { @@ -457,4 +461,5 @@ cur_frm.fields_dict.customer.get_query = function(doc, cdt, cdn) { cur_frm.fields_dict.supplier.get_query = function(doc, cdt, cdn) { return { query: "erpnext.controllers.queries.supplier_query" } } -cur_frm.add_fetch('production_order', 'total_fixed_cost', 'total_fixed_cost'); \ No newline at end of file +cur_frm.add_fetch('production_order', 'total_fixed_cost', 'total_fixed_cost'); +cur_frm.add_fetch('bom_no', 'total_fixed_cost', 'total_fixed_cost'); \ No newline at end of file diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json index ad4d9ddce1..5f78758c6c 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.json +++ b/erpnext/stock/doctype/stock_entry/stock_entry.json @@ -1,658 +1,658 @@ { - "allow_copy": 0, - "allow_import": 1, - "allow_rename": 0, - "autoname": "naming_series:", - "creation": "2013-04-09 11:43:55", - "docstatus": 0, - "doctype": "DocType", + "allow_copy": 0, + "allow_import": 1, + "allow_rename": 0, + "autoname": "naming_series:", + "creation": "2013-04-09 11:43:55", + "docstatus": 0, + "doctype": "DocType", "fields": [ { - "fieldname": "col1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_width": "50%", - "read_only": 0, + "fieldname": "col1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_width": "50%", + "read_only": 0, "width": "50%" - }, + }, { - "allow_on_submit": 0, - "fieldname": "naming_series", - "fieldtype": "Select", - "hidden": 0, - "in_filter": 0, - "label": "Series", - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "STE-", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 1, + "allow_on_submit": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "hidden": 0, + "in_filter": 0, + "label": "Series", + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "STE-", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 1, "search_index": 0 - }, + }, { - "allow_on_submit": 0, - "default": "Material Issue", - "fieldname": "purpose", - "fieldtype": "Select", - "hidden": 0, - "in_filter": 1, - "in_list_view": 1, - "label": "Purpose", - "no_copy": 0, - "oldfieldname": "purpose", - "oldfieldtype": "Select", - "options": "Material Issue\nMaterial Receipt\nMaterial Transfer\nManufacture/Repack\nSubcontract\nSales Return\nPurchase Return", - "permlevel": 0, - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 1, + "allow_on_submit": 0, + "default": "Material Issue", + "fieldname": "purpose", + "fieldtype": "Select", + "hidden": 0, + "in_filter": 1, + "in_list_view": 1, + "label": "Purpose", + "no_copy": 0, + "oldfieldname": "purpose", + "oldfieldtype": "Select", + "options": "Material Issue\nMaterial Receipt\nMaterial Transfer\nManufacture\nRepack\nSubcontract\nSales Return\nPurchase Return", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, "search_index": 0 - }, + }, { - "allow_on_submit": 0, - "depends_on": "eval:doc.purpose==\"Sales Return\"", - "fieldname": "delivery_note_no", - "fieldtype": "Link", - "hidden": 0, - "in_filter": 0, - "label": "Delivery Note No", - "no_copy": 1, - "oldfieldname": "delivery_note_no", - "oldfieldtype": "Link", - "options": "Delivery Note", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "depends_on": "eval:doc.purpose==\"Sales Return\"", + "fieldname": "delivery_note_no", + "fieldtype": "Link", + "hidden": 0, + "in_filter": 0, + "label": "Delivery Note No", + "no_copy": 1, + "oldfieldname": "delivery_note_no", + "oldfieldtype": "Link", + "options": "Delivery Note", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 1 - }, + }, { - "depends_on": "eval:doc.purpose==\"Sales Return\"", - "fieldname": "sales_invoice_no", - "fieldtype": "Link", - "hidden": 0, - "label": "Sales Invoice No", - "no_copy": 1, - "options": "Sales Invoice", - "permlevel": 0, - "print_hide": 1, + "depends_on": "eval:doc.purpose==\"Sales Return\"", + "fieldname": "sales_invoice_no", + "fieldtype": "Link", + "hidden": 0, + "label": "Sales Invoice No", + "no_copy": 1, + "options": "Sales Invoice", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "allow_on_submit": 0, - "depends_on": "eval:doc.purpose==\"Purchase Return\"", - "fieldname": "purchase_receipt_no", - "fieldtype": "Link", - "hidden": 0, - "in_filter": 0, - "label": "Purchase Receipt No", - "no_copy": 1, - "oldfieldname": "purchase_receipt_no", - "oldfieldtype": "Link", - "options": "Purchase Receipt", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "depends_on": "eval:doc.purpose==\"Purchase Return\"", + "fieldname": "purchase_receipt_no", + "fieldtype": "Link", + "hidden": 0, + "in_filter": 0, + "label": "Purchase Receipt No", + "no_copy": 1, + "oldfieldname": "purchase_receipt_no", + "oldfieldtype": "Link", + "options": "Purchase Receipt", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 1 - }, + }, { - "fieldname": "col2", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_width": "50%", - "read_only": 0, + "fieldname": "col2", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_width": "50%", + "read_only": 0, "width": "50%" - }, + }, { - "allow_on_submit": 0, - "default": "Today", - "fieldname": "posting_date", - "fieldtype": "Date", - "hidden": 0, - "in_filter": 1, - "in_list_view": 0, - "label": "Posting Date", - "no_copy": 1, - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 1, + "allow_on_submit": 0, + "default": "Today", + "fieldname": "posting_date", + "fieldtype": "Date", + "hidden": 0, + "in_filter": 1, + "in_list_view": 0, + "label": "Posting Date", + "no_copy": 1, + "oldfieldname": "posting_date", + "oldfieldtype": "Date", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, "search_index": 1 - }, + }, { - "allow_on_submit": 0, - "fieldname": "posting_time", - "fieldtype": "Time", - "hidden": 0, - "in_filter": 0, - "label": "Posting Time", - "no_copy": 1, - "oldfieldname": "posting_time", - "oldfieldtype": "Time", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 1, + "allow_on_submit": 0, + "fieldname": "posting_time", + "fieldtype": "Time", + "hidden": 0, + "in_filter": 0, + "label": "Posting Time", + "no_copy": 1, + "oldfieldname": "posting_time", + "oldfieldtype": "Time", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 1, "search_index": 0 - }, + }, { - "fieldname": "items_section", - "fieldtype": "Section Break", - "label": "Items", - "oldfieldtype": "Section Break", - "permlevel": 0, + "fieldname": "items_section", + "fieldtype": "Section Break", + "label": "Items", + "oldfieldtype": "Section Break", + "permlevel": 0, "read_only": 0 - }, + }, { - "allow_on_submit": 0, - "fieldname": "from_warehouse", - "fieldtype": "Link", - "hidden": 0, - "in_filter": 0, - "in_list_view": 1, - "label": "Default Source Warehouse", - "no_copy": 1, - "oldfieldname": "from_warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "fieldname": "from_warehouse", + "fieldtype": "Link", + "hidden": 0, + "in_filter": 0, + "in_list_view": 1, + "label": "Default Source Warehouse", + "no_copy": 1, + "oldfieldname": "from_warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "fieldname": "cb0", - "fieldtype": "Column Break", - "permlevel": 0, + "fieldname": "cb0", + "fieldtype": "Column Break", + "permlevel": 0, "read_only": 0 - }, + }, { - "allow_on_submit": 0, - "fieldname": "to_warehouse", - "fieldtype": "Link", - "hidden": 0, - "in_filter": 0, - "in_list_view": 1, - "label": "Default Target Warehouse", - "no_copy": 1, - "oldfieldname": "to_warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "fieldname": "to_warehouse", + "fieldtype": "Link", + "hidden": 0, + "in_filter": 0, + "in_list_view": 1, + "label": "Default Target Warehouse", + "no_copy": 1, + "oldfieldname": "to_warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "fieldname": "sb0", - "fieldtype": "Section Break", - "options": "Simple", - "permlevel": 0, + "fieldname": "sb0", + "fieldtype": "Section Break", + "options": "Simple", + "permlevel": 0, "read_only": 0 - }, + }, { - "allow_on_submit": 0, - "fieldname": "mtn_details", - "fieldtype": "Table", - "hidden": 0, - "in_filter": 0, - "label": "MTN Details", - "no_copy": 0, - "oldfieldname": "mtn_details", - "oldfieldtype": "Table", - "options": "Stock Entry Detail", - "permlevel": 0, - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "fieldname": "mtn_details", + "fieldtype": "Table", + "hidden": 0, + "in_filter": 0, + "label": "MTN Details", + "no_copy": 0, + "oldfieldname": "mtn_details", + "oldfieldtype": "Table", + "options": "Stock Entry Detail", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "description": "Get valuation rate and available stock at source/target warehouse on mentioned posting date-time. If serialized item, please press this button after entering serial nos.", - "fieldname": "get_stock_and_rate", - "fieldtype": "Button", - "label": "Get Stock and Rate", - "oldfieldtype": "Button", - "options": "get_stock_and_rate", - "permlevel": 0, - "print_hide": 1, + "description": "Get valuation rate and available stock at source/target warehouse on mentioned posting date-time. If serialized item, please press this button after entering serial nos.", + "fieldname": "get_stock_and_rate", + "fieldtype": "Button", + "label": "Get Stock and Rate", + "oldfieldtype": "Button", + "options": "get_stock_and_rate", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "fieldname": "fold", - "fieldtype": "Fold", + "fieldname": "fold", + "fieldtype": "Fold", "permlevel": 0 - }, + }, { - "depends_on": "eval:(doc.purpose!==\"Sales Return\" && doc.purpose!==\"Purchase Return\")", - "fieldname": "sb1", - "fieldtype": "Section Break", - "label": "From Bill of Materials", - "permlevel": 0, + "depends_on": "eval:(doc.purpose!==\"Sales Return\" && doc.purpose!==\"Purchase Return\")", + "fieldname": "sb1", + "fieldtype": "Section Break", + "label": "From Bill of Materials", + "permlevel": 0, "read_only": 0 - }, + }, { - "allow_on_submit": 0, - "depends_on": "eval:inList([\"Material Transfer\", \"Manufacture/Repack\"], doc.purpose)", - "fieldname": "production_order", - "fieldtype": "Link", - "hidden": 0, - "in_filter": 1, - "label": "Production Order", - "no_copy": 0, - "oldfieldname": "production_order", - "oldfieldtype": "Link", - "options": "Production Order", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "depends_on": "eval:inList([\"Material Transfer\", \"Manufacture\"], doc.purpose)", + "fieldname": "production_order", + "fieldtype": "Link", + "hidden": 0, + "in_filter": 1, + "label": "Production Order", + "no_copy": 0, + "oldfieldname": "production_order", + "oldfieldtype": "Link", + "options": "Production Order", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 1 - }, + }, { - "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", - "fieldname": "bom_no", - "fieldtype": "Link", - "label": "BOM No", - "options": "BOM", - "permlevel": 0, + "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", + "fieldname": "bom_no", + "fieldtype": "Link", + "label": "BOM No", + "options": "BOM", + "permlevel": 0, "read_only": 0 - }, + }, { - "allow_on_submit": 0, - "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", - "description": "As per Stock UOM", - "fieldname": "fg_completed_qty", - "fieldtype": "Float", - "hidden": 0, - "in_filter": 0, - "label": "Manufacturing Quantity", - "no_copy": 0, - "oldfieldname": "fg_completed_qty", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", + "description": "As per Stock UOM", + "fieldname": "fg_completed_qty", + "fieldtype": "Float", + "hidden": 0, + "in_filter": 0, + "label": "Manufacturing Quantity", + "no_copy": 0, + "oldfieldname": "fg_completed_qty", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "depends_on": "eval:doc.purpose==\"Manufacture/Repack\"", - "fieldname": "total_fixed_cost", - "fieldtype": "Float", - "label": "Total Fixed Cost", - "permlevel": 0, + "depends_on": "eval:inList([\"Manufacture\", \"Repack\"], doc.purpose)", + "fieldname": "total_fixed_cost", + "fieldtype": "Float", + "label": "Total Fixed Cost", + "permlevel": 0, "read_only": 0 - }, + }, { - "fieldname": "cb1", - "fieldtype": "Column Break", - "permlevel": 0, + "fieldname": "cb1", + "fieldtype": "Column Break", + "permlevel": 0, "read_only": 0 - }, + }, { - "default": "1", - "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", - "description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.", - "fieldname": "use_multi_level_bom", - "fieldtype": "Check", - "label": "Use Multi-Level BOM", - "permlevel": 0, - "print_hide": 1, + "default": "1", + "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", + "description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.", + "fieldname": "use_multi_level_bom", + "fieldtype": "Check", + "label": "Use Multi-Level BOM", + "permlevel": 0, + "print_hide": 1, "read_only": 0 - }, + }, { - "allow_on_submit": 0, - "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", - "fieldname": "get_items", - "fieldtype": "Button", - "hidden": 0, - "in_filter": 0, - "label": "Get Items", - "no_copy": 0, - "oldfieldtype": "Button", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "depends_on": "eval:!inList([\"Sales Return\", \"Purchase Return\"], doc.purpose)", + "fieldname": "get_items", + "fieldtype": "Button", + "hidden": 0, + "in_filter": 0, + "label": "Get Items", + "no_copy": 0, + "oldfieldtype": "Button", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "depends_on": "eval:(doc.purpose==\"Sales Return\" || doc.purpose==\"Purchase Return\")", - "fieldname": "contact_section", - "fieldtype": "Section Break", - "label": "Contact Info", - "permlevel": 0, + "depends_on": "eval:(doc.purpose==\"Sales Return\" || doc.purpose==\"Purchase Return\")", + "fieldname": "contact_section", + "fieldtype": "Section Break", + "label": "Contact Info", + "permlevel": 0, "read_only": 0 - }, + }, { - "allow_on_submit": 0, - "depends_on": "eval:doc.purpose==\"Purchase Return\"", - "fieldname": "supplier", - "fieldtype": "Link", - "hidden": 0, - "in_filter": 0, - "label": "Supplier", - "no_copy": 1, - "oldfieldname": "supplier", - "oldfieldtype": "Link", - "options": "Supplier", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "depends_on": "eval:doc.purpose==\"Purchase Return\"", + "fieldname": "supplier", + "fieldtype": "Link", + "hidden": 0, + "in_filter": 0, + "label": "Supplier", + "no_copy": 1, + "oldfieldname": "supplier", + "oldfieldtype": "Link", + "options": "Supplier", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "allow_on_submit": 0, - "depends_on": "eval:doc.purpose==\"Purchase Return\"", - "fieldname": "supplier_name", - "fieldtype": "Data", - "hidden": 0, - "in_filter": 0, - "label": "Supplier Name", - "no_copy": 1, - "oldfieldname": "supplier_name", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "read_only": 1, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "depends_on": "eval:doc.purpose==\"Purchase Return\"", + "fieldname": "supplier_name", + "fieldtype": "Data", + "hidden": 0, + "in_filter": 0, + "label": "Supplier Name", + "no_copy": 1, + "oldfieldname": "supplier_name", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "allow_on_submit": 0, - "depends_on": "eval:doc.purpose==\"Purchase Return\"", - "fieldname": "supplier_address", - "fieldtype": "Small Text", - "hidden": 0, - "in_filter": 0, - "label": "Supplier Address", - "no_copy": 1, - "oldfieldname": "supplier_address", - "oldfieldtype": "Small Text", - "permlevel": 0, - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "depends_on": "eval:doc.purpose==\"Purchase Return\"", + "fieldname": "supplier_address", + "fieldtype": "Small Text", + "hidden": 0, + "in_filter": 0, + "label": "Supplier Address", + "no_copy": 1, + "oldfieldname": "supplier_address", + "oldfieldtype": "Small Text", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "allow_on_submit": 0, - "depends_on": "eval:doc.purpose==\"Sales Return\"", - "fieldname": "customer", - "fieldtype": "Link", - "hidden": 0, - "in_filter": 0, - "label": "Customer", - "no_copy": 1, - "oldfieldname": "customer", - "oldfieldtype": "Link", - "options": "Customer", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "depends_on": "eval:doc.purpose==\"Sales Return\"", + "fieldname": "customer", + "fieldtype": "Link", + "hidden": 0, + "in_filter": 0, + "label": "Customer", + "no_copy": 1, + "oldfieldname": "customer", + "oldfieldtype": "Link", + "options": "Customer", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "allow_on_submit": 0, - "depends_on": "eval:doc.purpose==\"Sales Return\"", - "fieldname": "customer_name", - "fieldtype": "Data", - "hidden": 0, - "in_filter": 0, - "label": "Customer Name", - "no_copy": 1, - "oldfieldname": "customer_name", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "read_only": 1, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "depends_on": "eval:doc.purpose==\"Sales Return\"", + "fieldname": "customer_name", + "fieldtype": "Data", + "hidden": 0, + "in_filter": 0, + "label": "Customer Name", + "no_copy": 1, + "oldfieldname": "customer_name", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "allow_on_submit": 0, - "depends_on": "eval:doc.purpose==\"Sales Return\"", - "fieldname": "customer_address", - "fieldtype": "Small Text", - "hidden": 0, - "in_filter": 0, - "label": "Customer Address", - "no_copy": 1, - "oldfieldname": "customer_address", - "oldfieldtype": "Small Text", - "permlevel": 0, - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "depends_on": "eval:doc.purpose==\"Sales Return\"", + "fieldname": "customer_address", + "fieldtype": "Small Text", + "hidden": 0, + "in_filter": 0, + "label": "Customer Address", + "no_copy": 1, + "oldfieldname": "customer_address", + "oldfieldtype": "Small Text", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "fieldname": "more_info", - "fieldtype": "Section Break", - "label": "More Info", - "oldfieldtype": "Section Break", - "permlevel": 0, + "fieldname": "more_info", + "fieldtype": "Section Break", + "label": "More Info", + "oldfieldtype": "Section Break", + "permlevel": 0, "read_only": 0 - }, + }, { - "fieldname": "project_name", - "fieldtype": "Link", - "in_filter": 1, - "label": "Project Name", - "oldfieldname": "project_name", - "oldfieldtype": "Link", - "options": "Project", - "permlevel": 0, + "fieldname": "project_name", + "fieldtype": "Link", + "in_filter": 1, + "label": "Project Name", + "oldfieldname": "project_name", + "oldfieldtype": "Link", + "options": "Project", + "permlevel": 0, "read_only": 0 - }, + }, { - "allow_on_submit": 0, - "fieldname": "remarks", - "fieldtype": "Text", - "hidden": 0, - "in_filter": 0, - "label": "Remarks", - "no_copy": 1, - "oldfieldname": "remarks", - "oldfieldtype": "Text", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "fieldname": "remarks", + "fieldtype": "Text", + "hidden": 0, + "in_filter": 0, + "label": "Remarks", + "no_copy": 1, + "oldfieldname": "remarks", + "oldfieldtype": "Text", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "fieldname": "col5", - "fieldtype": "Column Break", - "permlevel": 0, - "print_width": "50%", - "read_only": 0, + "fieldname": "col5", + "fieldtype": "Column Break", + "permlevel": 0, + "print_width": "50%", + "read_only": 0, "width": "50%" - }, + }, { - "fieldname": "total_amount", - "fieldtype": "Currency", - "label": "Total Amount", - "options": "Company:company:default_currency", - "permlevel": 0, + "fieldname": "total_amount", + "fieldtype": "Currency", + "label": "Total Amount", + "options": "Company:company:default_currency", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "fiscal_year", - "fieldtype": "Link", - "in_filter": 0, - "label": "Fiscal Year", - "options": "Fiscal Year", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, + "fieldname": "fiscal_year", + "fieldtype": "Link", + "in_filter": 0, + "label": "Fiscal Year", + "options": "Fiscal Year", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, "reqd": 1 - }, + }, { - "allow_on_submit": 0, - "fieldname": "company", - "fieldtype": "Link", - "hidden": 0, - "in_filter": 1, - "label": "Company", - "no_copy": 0, - "oldfieldname": "company", - "oldfieldtype": "Link", - "options": "Company", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "report_hide": 0, - "reqd": 1, + "allow_on_submit": 0, + "fieldname": "company", + "fieldtype": "Link", + "hidden": 0, + "in_filter": 1, + "label": "Company", + "no_copy": 0, + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 1, "search_index": 0 - }, + }, { - "allow_on_submit": 1, - "fieldname": "select_print_heading", - "fieldtype": "Link", - "hidden": 0, - "in_filter": 0, - "label": "Print Heading", - "no_copy": 0, - "oldfieldname": "select_print_heading", - "oldfieldtype": "Link", - "options": "Print Heading", - "permlevel": 0, - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 1, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "hidden": 0, + "in_filter": 0, + "label": "Print Heading", + "no_copy": 0, + "oldfieldname": "select_print_heading", + "oldfieldtype": "Link", + "options": "Print Heading", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, "search_index": 0 - }, + }, { - "allow_on_submit": 0, - "fieldname": "amended_from", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "in_filter": 0, - "label": "Amended From", - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Link", - "options": "Stock Entry", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, - "report_hide": 0, - "reqd": 0, + "allow_on_submit": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "in_filter": 0, + "label": "Amended From", + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Link", + "options": "Stock Entry", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, + "report_hide": 0, + "reqd": 0, "search_index": 0 } - ], - "hide_heading": 0, - "hide_toolbar": 0, - "icon": "icon-file-text", - "idx": 1, - "in_create": 0, - "in_dialog": 0, - "is_submittable": 1, - "issingle": 0, - "max_attachments": 0, - "modified": "2014-09-16 05:35:39.352951", - "modified_by": "Administrator", - "module": "Stock", - "name": "Stock Entry", - "owner": "Administrator", + ], + "hide_heading": 0, + "hide_toolbar": 0, + "icon": "icon-file-text", + "idx": 1, + "in_create": 0, + "in_dialog": 0, + "is_submittable": 1, + "issingle": 0, + "max_attachments": 0, + "modified": "2014-09-16 15:56:37.514676", + "modified_by": "Administrator", + "module": "Stock", + "name": "Stock Entry", + "owner": "Administrator", "permissions": [ { - "amend": 1, - "apply_user_permissions": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Material User", - "submit": 1, + "amend": 1, + "apply_user_permissions": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Material User", + "submit": 1, "write": 1 - }, + }, { - "amend": 1, - "apply_user_permissions": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Manufacturing User", - "submit": 1, + "amend": 1, + "apply_user_permissions": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Manufacturing User", + "submit": 1, "write": 1 - }, + }, { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Manufacturing Manager", - "submit": 1, + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Manufacturing Manager", + "submit": 1, "write": 1 - }, + }, { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Material Manager", - "submit": 1, + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Material Manager", + "submit": 1, "write": 1 } - ], - "read_only": 0, - "read_only_onload": 0, - "search_fields": "posting_date, from_warehouse, to_warehouse, purpose, remarks", - "sort_field": "modified", + ], + "read_only": 0, + "read_only_onload": 0, + "search_fields": "posting_date, from_warehouse, to_warehouse, purpose, remarks", + "sort_field": "modified", "sort_order": "DESC" -} +} \ No newline at end of file diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index c3aab6acd7..4f3480c0bb 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -43,7 +43,7 @@ class StockEntry(StockController): self.validate_uom_is_integer("uom", "qty") self.validate_uom_is_integer("stock_uom", "transfer_qty") self.validate_warehouse(pro_obj) - self.validate_production_order(pro_obj) + self.validate_production_order() self.get_stock_and_rate() self.validate_incoming_rate() self.validate_bom() @@ -54,6 +54,7 @@ class StockEntry(StockController): self.validate_valuation_rate() self.set_total_amount() + def on_submit(self): self.update_stock_ledger() @@ -74,7 +75,7 @@ class StockEntry(StockController): def validate_purpose(self): valid_purposes = ["Material Issue", "Material Receipt", "Material Transfer", - "Manufacture/Repack", "Subcontract", "Sales Return", "Purchase Return"] + "Manufacture", "Repack", "Subcontract", "Sales Return", "Purchase Return"] if self.purpose not in valid_purposes: frappe.throw(_("Purpose must be one of {0}").format(comma_or(valid_purposes))) @@ -137,7 +138,7 @@ class StockEntry(StockController): if self.purpose in target_mandatory and not d.t_warehouse: frappe.throw(_("Target warehouse is mandatory for row {0}").format(d.idx)) - if self.purpose == "Manufacture/Repack": + if self.purpose in ["Manufacture", "Repack"]: if validate_for_manufacture_repack: if d.bom_no: d.s_warehouse = None @@ -156,14 +157,11 @@ class StockEntry(StockController): if cstr(d.s_warehouse) == cstr(d.t_warehouse): frappe.throw(_("Source and target warehouse cannot be same for row {0}").format(d.idx)) - def validate_production_order(self, pro_obj=None): - if not pro_obj: - if self.production_order: - pro_obj = frappe.get_doc('Production Order', self.production_order) - else: - return - - if self.purpose == "Manufacture/Repack": + def validate_production_order(self): + if self.purpose == "Manufacture": + # check if production order is entered + if not self.production_order: + frappe.throw(_("Production order number is mandatory for stock entry purpose manufacture")) # check for double entry self.check_duplicate_entry_for_production_order() elif self.purpose != "Material Transfer": @@ -192,7 +190,7 @@ class StockEntry(StockController): + self.production_order + ":" + ", ".join(other_ste), DuplicateEntryForProductionOrderError) def validate_valuation_rate(self): - if self.purpose == "Manufacture/Repack": + if self.purpose in ["Manufacture", "Repack"]: valuation_at_source, valuation_at_target = 0, 0 for d in self.get("mtn_details"): if d.s_warehouse and not d.t_warehouse: @@ -248,7 +246,7 @@ class StockEntry(StockController): raw_material_cost += flt(d.amount) # set incoming rate for fg item - if self.purpose == "Manufacture/Repack": + if self.purpose in ["Manufacture", "Repack"]: number_of_fg_items = len([t.t_warehouse for t in self.get("mtn_details") if t.t_warehouse]) for d in self.get("mtn_details"): if d.bom_no or (d.t_warehouse and number_of_fg_items == 1): @@ -391,7 +389,7 @@ class StockEntry(StockController): pro_doc = frappe.get_doc("Production Order", self.production_order) _validate_production_order(pro_doc) pro_doc.run_method("update_status") - if self.purpose == "Manufacture/Repack": + if self.purpose == "Manufacture": pro_doc.run_method("update_produced_qty") self.update_planned_qty(pro_doc) @@ -463,20 +461,20 @@ class StockEntry(StockController): def get_items(self): self.set('mtn_details', []) + self.validate_production_order() pro_obj = None if self.production_order: # common validations pro_obj = frappe.get_doc('Production Order', self.production_order) if pro_obj: - self.validate_production_order(pro_obj) self.bom_no = pro_obj.bom_no else: # invalid production order self.production_order = None if self.bom_no: - if self.purpose in ["Material Issue", "Material Transfer", "Manufacture/Repack", + if self.purpose in ["Material Issue", "Material Transfer", "Manufacture", "Repack", "Subcontract"]: if self.production_order and self.purpose == "Material Transfer": item_dict = self.get_pending_raw_materials(pro_obj) @@ -493,7 +491,7 @@ class StockEntry(StockController): self.add_to_stock_entry_detail(item_dict) # add finished good item to Stock Entry Detail table -- along with bom_no - if self.production_order and self.purpose == "Manufacture/Repack": + if self.production_order and self.purpose == "Manufacture": item = frappe.db.get_value("Item", pro_obj.production_item, ["item_name", "description", "stock_uom", "expense_account", "buying_cost_center"], as_dict=1) self.add_to_stock_entry_detail({ @@ -509,7 +507,7 @@ class StockEntry(StockController): } }, bom_no=pro_obj.bom_no) - elif self.purpose in ["Material Receipt", "Manufacture/Repack"]: + elif self.purpose in ["Material Receipt", "Repack"]: if self.purpose=="Material Receipt": self.from_warehouse = "" diff --git a/erpnext/stock/doctype/stock_entry/stock_entry_list.html b/erpnext/stock/doctype/stock_entry/stock_entry_list.html index 21794cfbef..e59b332607 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry_list.html +++ b/erpnext/stock/doctype/stock_entry/stock_entry_list.html @@ -6,7 +6,8 @@ "Material Issue": "icon-arrow-right", "Material Receipt": "icon-arrow-left", "Material Transfer": "icon-resize-horizontal", - "Manufacture/Repack": "icon-wrench", + "Manufacture": "icon-wrench", + "Repack": "icon-wrench", "Sales Return": "icon-warning-sign", "Purchase Return": "icon-warning-sign", "Subcontract": "icon-truck" diff --git a/erpnext/stock/doctype/stock_entry/test_records.json b/erpnext/stock/doctype/stock_entry/test_records.json index 4a4ca0e65a..f743991eb7 100644 --- a/erpnext/stock/doctype/stock_entry/test_records.json +++ b/erpnext/stock/doctype/stock_entry/test_records.json @@ -108,6 +108,6 @@ ], "posting_date": "2013-01-25", "posting_time": "17:14:24", - "purpose": "Manufacture/Repack" + "purpose": "Repack" } ] \ No newline at end of file diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index b9a6abd7b7..038606cc1d 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -843,7 +843,7 @@ class TestStockEntry(unittest.TestCase): stock_entry = frappe.new_doc("Stock Entry") stock_entry.update({ - "purpose": "Manufacture/Repack", + "purpose": "Manufacture", "production_order": production_order.name, "bom_no": bom_no, "fg_completed_qty": "1", From 3a19a71262939ffbc993e77907b7591c94383602 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Tue, 30 Sep 2014 14:48:38 +0530 Subject: [PATCH 5/9] patch fixed --- erpnext/patches/v4_2/seprate_manufacture_and_repack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v4_2/seprate_manufacture_and_repack.py b/erpnext/patches/v4_2/seprate_manufacture_and_repack.py index 68cb4303cd..5b36289bc9 100644 --- a/erpnext/patches/v4_2/seprate_manufacture_and_repack.py +++ b/erpnext/patches/v4_2/seprate_manufacture_and_repack.py @@ -5,5 +5,5 @@ from __future__ import unicode_literals import frappe def execute(): - frappe.db.sql("""update `tabStock Entry` set purpose='Manufacture' where purpose='Manufacture/Repack' and production_order ifnull(purpose,"")!="" """) - frappe.db.sql("""update `tabStock Entry` set purpose='Repack' where purpose='Manufacture/Repack' and production_order ifnull(purpose,"")="" """) \ No newline at end of file + frappe.db.sql("""update `tabStock Entry` set purpose='Manufacture' where purpose='Manufacture/Repack' and ifnull(production_order,"")!="" """) + frappe.db.sql("""update `tabStock Entry` set purpose='Repack' where purpose='Manufacture/Repack' and ifnull(production_order,"")="" """) \ No newline at end of file From 9e5f319d80bf822570cca44d8daee1de6902b7dd Mon Sep 17 00:00:00 2001 From: ankitjavalkarwork Date: Mon, 6 Oct 2014 12:19:40 +0530 Subject: [PATCH 6/9] [#2253] Rearrange To/From fields and depend on is_recurring in SI,SO,PI,PO --- .../purchase_invoice/purchase_invoice.json | 62 ++++++++-------- .../doctype/sales_invoice/sales_invoice.json | 72 +++++++++---------- .../purchase_order/purchase_order.json | 62 ++++++++-------- .../doctype/sales_order/sales_order.json | 62 ++++++++-------- 4 files changed, 132 insertions(+), 126 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index d91c53ceaa..153b8d89e4 100755 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -142,24 +142,6 @@ "reqd": 0, "search_index": 1 }, - { - "allow_on_submit": 1, - "description": "Start date of current invoice's period", - "fieldname": "from_date", - "fieldtype": "Date", - "label": "From Date", - "no_copy": 1, - "permlevel": 0 - }, - { - "allow_on_submit": 1, - "description": "End date of current invoice's period", - "fieldname": "to_date", - "fieldtype": "Date", - "label": "To Date", - "no_copy": 1, - "permlevel": 0 - }, { "fieldname": "amended_from", "fieldtype": "Link", @@ -798,6 +780,26 @@ "permlevel": 0, "print_hide": 1 }, + { + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "Start date of current invoice's period", + "fieldname": "from_date", + "fieldtype": "Date", + "label": "From Date", + "no_copy": 1, + "permlevel": 0 + }, + { + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "End date of current invoice's period", + "fieldname": "to_date", + "fieldtype": "Date", + "label": "To Date", + "no_copy": 1, + "permlevel": 0 + }, { "allow_on_submit": 1, "depends_on": "eval:doc.is_recurring==1", @@ -821,17 +823,6 @@ "permlevel": 0, "print_hide": 1 }, - { - "depends_on": "eval:doc.is_recurring==1", - "description": "The date on which next invoice will be generated. It is generated on submit.", - "fieldname": "next_date", - "fieldtype": "Date", - "label": "Next Date", - "no_copy": 1, - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, { "allow_on_submit": 1, "depends_on": "eval:doc.is_recurring==1", @@ -850,6 +841,17 @@ "print_hide": 1, "width": "50%" }, + { + "depends_on": "eval:doc.is_recurring==1", + "description": "The date on which next invoice will be generated. It is generated on submit.", + "fieldname": "next_date", + "fieldtype": "Date", + "label": "Next Date", + "no_copy": 1, + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, { "depends_on": "eval:doc.is_recurring==1", "description": "The unique id for tracking all recurring invoices. It is generated on submit.", @@ -876,7 +878,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2014-09-18 03:12:51.994059", + "modified": "2014-10-06 12:57:32.064210", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index 4462ac6566..21c96e745d 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -168,30 +168,6 @@ "reqd": 1, "search_index": 0 }, - { - "allow_on_submit": 1, - "depends_on": "", - "description": "Start date of current invoice's period", - "fieldname": "from_date", - "fieldtype": "Date", - "label": "From Date", - "no_copy": 1, - "permlevel": 0, - "print_hide": 0, - "read_only": 0 - }, - { - "allow_on_submit": 1, - "depends_on": "", - "description": "End date of current invoice's period", - "fieldname": "to_date", - "fieldtype": "Date", - "label": "To Date", - "no_copy": 1, - "permlevel": 0, - "print_hide": 0, - "read_only": 0 - }, { "fieldname": "currency_section", "fieldtype": "Section Break", @@ -1095,6 +1071,30 @@ "print_hide": 1, "read_only": 0 }, + { + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "End date of current invoice's period", + "fieldname": "to_date", + "fieldtype": "Date", + "label": "To Date", + "no_copy": 1, + "permlevel": 0, + "print_hide": 0, + "read_only": 0 + }, + { + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "Start date of current invoice's period", + "fieldname": "from_date", + "fieldtype": "Date", + "label": "From Date", + "no_copy": 1, + "permlevel": 0, + "print_hide": 0, + "read_only": 0 + }, { "allow_on_submit": 1, "depends_on": "eval:doc.is_recurring==1", @@ -1120,17 +1120,6 @@ "print_hide": 1, "read_only": 0 }, - { - "depends_on": "eval:doc.is_recurring==1", - "description": "The date on which next invoice will be generated. It is generated on submit.\n", - "fieldname": "next_date", - "fieldtype": "Date", - "label": "Next Date", - "no_copy": 1, - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, { "allow_on_submit": 1, "depends_on": "eval:doc.is_recurring==1", @@ -1152,6 +1141,17 @@ "read_only": 0, "width": "50%" }, + { + "depends_on": "eval:doc.is_recurring==1", + "description": "The date on which next invoice will be generated. It is generated on submit.\n", + "fieldname": "next_date", + "fieldtype": "Date", + "label": "Next Date", + "no_copy": 1, + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, { "depends_on": "eval:doc.is_recurring==1", "description": "The unique id for tracking all recurring invoices.\u00a0It is generated on submit.", @@ -1192,7 +1192,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2014-09-18 03:17:54.976732", + "modified": "2014-10-06 12:54:42.549361", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index 142781c2bd..8380e864c6 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -101,24 +101,6 @@ "reqd": 1, "search_index": 1 }, - { - "allow_on_submit": 1, - "description": "Start date of current order's period", - "fieldname": "from_date", - "fieldtype": "Date", - "label": "From Date", - "no_copy": 1, - "permlevel": 0 - }, - { - "allow_on_submit": 1, - "description": "End date of current order's period", - "fieldname": "to_date", - "fieldtype": "Date", - "label": "To Date", - "no_copy": 1, - "permlevel": 0 - }, { "fieldname": "amended_from", "fieldtype": "Link", @@ -695,6 +677,26 @@ "permlevel": 0, "print_hide": 1 }, + { + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "Start date of current order's period", + "fieldname": "from_date", + "fieldtype": "Date", + "label": "From Date", + "no_copy": 1, + "permlevel": 0 + }, + { + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "End date of current order's period", + "fieldname": "to_date", + "fieldtype": "Date", + "label": "To Date", + "no_copy": 1, + "permlevel": 0 + }, { "allow_on_submit": 1, "depends_on": "eval:doc.is_recurring==1", @@ -716,17 +718,6 @@ "permlevel": 0, "print_hide": 1 }, - { - "depends_on": "eval:doc.is_recurring==1", - "description": "The date on which next invoice will be generated. It is generated on submit.", - "fieldname": "next_date", - "fieldtype": "Date", - "label": "Next Date", - "no_copy": 1, - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, { "allow_on_submit": 1, "depends_on": "eval:doc.is_recurring==1", @@ -745,6 +736,17 @@ "permlevel": 0, "print_hide": 1 }, + { + "depends_on": "eval:doc.is_recurring==1", + "description": "The date on which next invoice will be generated. It is generated on submit.", + "fieldname": "next_date", + "fieldtype": "Date", + "label": "Next Date", + "no_copy": 1, + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, { "depends_on": "eval:doc.is_recurring==1", "fieldname": "recurring_id", @@ -770,7 +772,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2014-09-18 03:16:06.299317", + "modified": "2014-10-06 12:16:44.453946", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order", diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index c22ed3f48d..5af9a26ed9 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -169,24 +169,6 @@ "search_index": 1, "width": "160px" }, - { - "allow_on_submit": 1, - "description": "Start date of current order's period", - "fieldname": "from_date", - "fieldtype": "Date", - "label": "From Date", - "no_copy": 1, - "permlevel": 0 - }, - { - "allow_on_submit": 1, - "description": "End date of current order's period", - "fieldname": "to_date", - "fieldtype": "Date", - "label": "To Date", - "no_copy": 1, - "permlevel": 0 - }, { "description": "Customer's Purchase Order Number", "fieldname": "po_no", @@ -939,6 +921,26 @@ "permlevel": 0, "print_hide": 1 }, + { + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "Start date of current order's period", + "fieldname": "from_date", + "fieldtype": "Date", + "label": "From Date", + "no_copy": 1, + "permlevel": 0 + }, + { + "allow_on_submit": 1, + "depends_on": "eval:doc.is_recurring==1", + "description": "End date of current order's period", + "fieldname": "to_date", + "fieldtype": "Date", + "label": "To Date", + "no_copy": 1, + "permlevel": 0 + }, { "allow_on_submit": 1, "depends_on": "eval:doc.is_recurring==1", @@ -962,17 +964,6 @@ "permlevel": 0, "print_hide": 1 }, - { - "depends_on": "eval:doc.is_recurring==1", - "description": "The date on which next invoice will be generated. It is generated on submit.", - "fieldname": "next_date", - "fieldtype": "Date", - "label": "Next Date", - "no_copy": 1, - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, { "allow_on_submit": 1, "depends_on": "eval:doc.is_recurring==1", @@ -991,6 +982,17 @@ "permlevel": 0, "print_hide": 1 }, + { + "depends_on": "eval:doc.is_recurring==1", + "description": "The date on which next invoice will be generated. It is generated on submit.", + "fieldname": "next_date", + "fieldtype": "Date", + "label": "Next Date", + "no_copy": 1, + "permlevel": 0, + "print_hide": 1, + "read_only": 1 + }, { "depends_on": "eval:doc.is_recurring==1", "fieldname": "recurring_id", @@ -1018,7 +1020,7 @@ "idx": 1, "is_submittable": 1, "issingle": 0, - "modified": "2014-09-18 03:17:33.241162", + "modified": "2014-10-06 12:16:41.256013", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", From 9974b16c320b09c0c873f101a0a72e011f49d560 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 7 Oct 2014 10:52:05 +0530 Subject: [PATCH 7/9] [fix] packing slip --- erpnext/stock/doctype/packing_slip/packing_slip.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py index 63657b75ab..bd79835d58 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.py +++ b/erpnext/stock/doctype/packing_slip/packing_slip.py @@ -162,8 +162,7 @@ def item_details(doctype, txt, searchfield, start, page_len, filters): from erpnext.controllers.queries import get_match_cond return frappe.db.sql("""select name, item_name, description from `tabItem` where name in ( select item_code FROM `tabDelivery Note Item` - where parent= %s - and ifnull(qty, 0) > ifnull(packed_qty, 0)) + where parent= %s) and %s like "%s" %s limit %s, %s """ % ("%s", searchfield, "%s", get_match_cond(doctype), "%s", "%s"), From b70712dbba2791bdb14fd97e2e39a7d6874a723c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 7 Oct 2014 11:32:37 +0530 Subject: [PATCH 8/9] Voucher dynamic link in general ledger report --- .../accounts/report/general_ledger/general_ledger.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 362f42e5e5..e7180ae5fa 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -35,7 +35,7 @@ def validate_filters(filters, account_details): def get_columns(): return [_("Posting Date") + ":Date:100", _("Account") + ":Link/Account:200", _("Debit") + ":Float:100", - _("Credit") + ":Float:100", _("Voucher Type") + "::120", _("Voucher No") + "::160", _("Link") + "::20", + _("Credit") + ":Float:100", _("Voucher Type") + "::120", _("Voucher No") + ":Dynamic Link/Voucher Type:160", _("Against Account") + "::120", _("Cost Center") + ":Link/Cost Center:100", _("Remarks") + "::400"] def get_result(filters, account_details): @@ -162,15 +162,6 @@ def get_result_as_list(data): for d in data: result.append([d.get("posting_date"), d.get("account"), d.get("debit"), d.get("credit"), d.get("voucher_type"), d.get("voucher_no"), - get_voucher_link(d.get("voucher_type"), d.get("voucher_no")), d.get("against"), d.get("cost_center"), d.get("remarks")]) return result - -def get_voucher_link(voucher_type, voucher_no): - icon = "" - if voucher_type and voucher_no: - icon = """ - """ % ("/".join(["#Form", voucher_type, voucher_no])) - - return icon From 099ad0f5e160913ab8cda4b228b30243307f1762 Mon Sep 17 00:00:00 2001 From: pdvyas Date: Tue, 7 Oct 2014 17:35:32 +0600 Subject: [PATCH 9/9] bumped to version 4.5.2 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index ef6eca3066..d04f92aa34 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.5.1' +__version__ = '4.5.2' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index a8e5732752..bda5c80678 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.5.1" +app_version = "4.5.2" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index 681b6f7e44..8b037432f4 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.5.1" +version = "4.5.2" with open("requirements.txt", "r") as f: install_requires = f.readlines()