From 37909b292f6ea45fbdb0f96b506100281e35e103 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 6 May 2014 16:15:56 +0530 Subject: [PATCH 1/2] Remove India specific fields --- erpnext/hr/doctype/employee/employee.js | 2 - erpnext/hr/doctype/employee/employee.json | 32 +- .../hr/doctype/salary_slip/salary_slip.json | 20 +- erpnext/hr/doctype/salary_slip/salary_slip.py | 4 +- .../salary_structure/salary_structure.py | 6 +- erpnext/patches.txt | 1 + .../4_0/remove_india_specific_fields.py | 23 + .../purchase_receipt/purchase_receipt.js | 36 +- .../purchase_receipt/purchase_receipt.json | 1344 ++++++++--------- .../purchase_receipt/purchase_receipt.py | 10 - 10 files changed, 703 insertions(+), 775 deletions(-) create mode 100644 erpnext/patches/4_0/remove_india_specific_fields.py diff --git a/erpnext/hr/doctype/employee/employee.js b/erpnext/hr/doctype/employee/employee.js index 39e0c70298..581eaccc3a 100644 --- a/erpnext/hr/doctype/employee/employee.js +++ b/erpnext/hr/doctype/employee/employee.js @@ -12,8 +12,6 @@ erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({ onload: function() { this.setup_leave_approver_select(); - this.frm.toggle_display(["esic_card_no", "gratuity_lic_id", "pan_number", "pf_number"], - frappe.boot.sysdefaults.country==="India"); if(this.frm.doc.__islocal) this.frm.set_value("employee_name", ""); }, diff --git a/erpnext/hr/doctype/employee/employee.json b/erpnext/hr/doctype/employee/employee.json index 2d90afa538..525234359c 100644 --- a/erpnext/hr/doctype/employee/employee.json +++ b/erpnext/hr/doctype/employee/employee.json @@ -337,30 +337,6 @@ "oldfieldtype": "Data", "permlevel": 0 }, - { - "fieldname": "esic_card_no", - "fieldtype": "Data", - "label": "ESIC CARD No", - "oldfieldname": "esic_card_no", - "oldfieldtype": "Data", - "permlevel": 0 - }, - { - "fieldname": "pf_number", - "fieldtype": "Data", - "label": "PF Number", - "oldfieldname": "pf_number", - "oldfieldtype": "Data", - "permlevel": 0 - }, - { - "fieldname": "gratuity_lic_id", - "fieldtype": "Data", - "label": "Gratuity LIC ID", - "oldfieldname": "gratuity_lic_id", - "oldfieldtype": "Data", - "permlevel": 0 - }, { "fieldname": "organization_profile", "fieldtype": "Section Break", @@ -497,12 +473,6 @@ "permlevel": 0, "width": "50%" }, - { - "fieldname": "pan_number", - "fieldtype": "Data", - "label": "PAN Number", - "permlevel": 0 - }, { "fieldname": "passport_number", "fieldtype": "Data", @@ -711,7 +681,7 @@ ], "icon": "icon-user", "idx": 1, - "modified": "2014-04-30 09:03:10.879762", + "modified": "2014-04-30 09:03:11.879762", "modified_by": "Administrator", "module": "HR", "name": "Employee", diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.json b/erpnext/hr/doctype/salary_slip/salary_slip.json index 43a1543ee5..66bf41dea8 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.json +++ b/erpnext/hr/doctype/salary_slip/salary_slip.json @@ -71,24 +71,6 @@ "read_only": 1, "search_index": 0 }, - { - "fieldname": "pf_no", - "fieldtype": "Data", - "label": "PF No.", - "oldfieldname": "pf_no", - "oldfieldtype": "Data", - "permlevel": 0, - "read_only": 1 - }, - { - "fieldname": "esic_no", - "fieldtype": "Data", - "label": "ESIC No.", - "oldfieldname": "esic_no", - "oldfieldtype": "Data", - "permlevel": 0, - "read_only": 1 - }, { "fieldname": "letter_head", "fieldtype": "Link", @@ -343,7 +325,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2014-05-01 04:21:14.543092", + "modified": "2014-05-01 04:22:14.543092", "modified_by": "Administrator", "module": "HR", "name": "Salary Slip", diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index 029c84e870..9ae394b97c 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -38,12 +38,10 @@ class SalarySlip(TransactionBase): def pull_emp_details(self): emp = frappe.db.get_value("Employee", self.employee, - ["bank_name", "bank_ac_no", "esic_card_no", "pf_number"], as_dict=1) + ["bank_name", "bank_ac_no"], as_dict=1) if emp: self.bank_name = emp.bank_name self.bank_account_no = emp.bank_ac_no - self.esic_no = emp.esic_card_no - self.pf_no = emp.pf_number def get_leave_details(self, lwp=None): if not self.fiscal_year: diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.py b/erpnext/hr/doctype/salary_structure/salary_structure.py index 07cbb5e11d..d170d0564e 100644 --- a/erpnext/hr/doctype/salary_structure/salary_structure.py +++ b/erpnext/hr/doctype/salary_structure/salary_structure.py @@ -29,12 +29,10 @@ class SalaryStructure(Document): return ret def get_ss_values(self,employee): - basic_info = frappe.db.sql("""select bank_name, bank_ac_no, esic_card_no, pf_number + basic_info = frappe.db.sql("""select bank_name, bank_ac_no from `tabEmployee` where name =%s""", employee) ret = {'bank_name': basic_info and basic_info[0][0] or '', - 'bank_ac_no': basic_info and basic_info[0][1] or '', - 'esic_no': basic_info and basic_info[0][2] or '', - 'pf_no': basic_info and basic_info[0][3] or ''} + 'bank_ac_no': basic_info and basic_info[0][1] or ''} return ret def make_table(self, doct_name, tab_fname, tab_name): diff --git a/erpnext/patches.txt b/erpnext/patches.txt index e1a01ab2f7..2af08800b9 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -37,3 +37,4 @@ execute:frappe.delete_doc("Page", "Financial Statements") execute:frappe.delete_doc("DocType", "Stock Ledger") execute:frappe.db.sql("update `tabJournal Voucher` set voucher_type='Journal Entry' where ifnull(voucher_type, '')=''") execute:frappe.delete_doc("DocType", "Grade") +erpnext.patches.4_0.remove_india_specific_fields diff --git a/erpnext/patches/4_0/remove_india_specific_fields.py b/erpnext/patches/4_0/remove_india_specific_fields.py new file mode 100644 index 0000000000..63bd4cb740 --- /dev/null +++ b/erpnext/patches/4_0/remove_india_specific_fields.py @@ -0,0 +1,23 @@ +# 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 +from frappe.core.doctype.custom_field.custom_field import create_custom_field_if_values_exist + +def execute(): + docfields = { + ("Purchase Receipt", "challan_no"): frappe.get_meta("Purchase Receipt").get_field("challan_no"), + ("Purchase Receipt", "challan_date"): frappe.get_meta("Purchase Receipt").get_field("challan_date"), + ("Employee", "pf_number"): frappe.get_meta("Employee").get_field("pf_number"), + ("Employee", "pan_number"): frappe.get_meta("Employee").get_field("pan_number"), + ("Employee", "gratuity_lic_id"): frappe.get_meta("Employee").get_field("gratuity_lic_id"), + ("Employee", "esic_card_no"): frappe.get_meta("Employee").get_field("esic_card_no"), + ("Salary Slip", "esic_no"): frappe.get_meta("Salary Slip").get_field("esic_no"), + ("Salary Slip", "pf_no"): frappe.get_meta("Salary Slip").get_field("pf_no") + } + + for (doctype, fieldname), df in docfields.items(): + frappe.delete_doc("DocField", df.name) + frappe.clear_cache(doctype=doctype) + create_custom_field_if_values_exist(doctype, df.as_dict()) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js index ac90ec15e2..b23b041b33 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js @@ -14,18 +14,18 @@ frappe.provide("erpnext.stock"); erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend({ refresh: function() { this._super(); - + if(this.frm.doc.docstatus == 1) { if(!this.frm.doc.__billing_complete) { - cur_frm.add_custom_button(__('Make Purchase Invoice'), + cur_frm.add_custom_button(__('Make Purchase Invoice'), this.make_purchase_invoice); } cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); - + this.show_stock_ledger(); this.show_general_ledger(); } else { - cur_frm.add_custom_button(__(__('From Purchase Order')), + cur_frm.add_custom_button(__(__('From Purchase Order')), function() { frappe.model.map_current_doc({ method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_receipt", @@ -40,12 +40,8 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend }) }); } - - if(frappe.boot.sysdefaults.country == 'India') { - unhide_field(['challan_no', 'challan_date']); - } }, - + received_qty: function(doc, cdt, cdn) { var item = frappe.get_doc(cdt, cdn); frappe.model.round_floats_in(item, ["qty", "received_qty"]); @@ -53,30 +49,30 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend item.qty = (item.qty < item.received_qty) ? item.qty : item.received_qty; this.qty(doc, cdt, cdn); }, - + qty: function(doc, cdt, cdn) { var item = frappe.get_doc(cdt, cdn); frappe.model.round_floats_in(item, ["qty", "received_qty"]); - + if(!(item.received_qty || item.rejected_qty) && item.qty) { item.received_qty = item.qty; } - + if(item.qty > item.received_qty) { - msgprint(__("Error: {0} > {1}", [__(frappe.meta.get_label(item.doctype, "qty", item.name)), + msgprint(__("Error: {0} > {1}", [__(frappe.meta.get_label(item.doctype, "qty", item.name)), __(frappe.meta.get_label(item.doctype, "received_qty", item.name))])) item.qty = item.rejected_qty = 0.0; } else { item.rejected_qty = flt(item.received_qty - item.qty, precision("rejected_qty", item)); } - + this._super(); }, - + rejected_qty: function(doc, cdt, cdn) { var item = frappe.get_doc(cdt, cdn); frappe.model.round_floats_in(item, ["received_qty", "rejected_qty"]); - + if(item.rejected_qty > item.received_qty) { msgprint(__("Error: {0} > {1}", [__(frappe.meta.get_label(item.doctype, "rejected_qty", item.name)), __(frappe.meta.get_label(item.doctype, "received_qty", item.name))])); @@ -84,21 +80,21 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend } else { item.qty = flt(item.received_qty - item.rejected_qty, precision("qty", item)); } - + this.qty(doc, cdt, cdn); }, - + make_purchase_invoice: function() { frappe.model.open_mapped_doc({ method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_purchase_invoice", source_name: cur_frm.doc.name }) - }, + }, tc_name: function() { this.get_terms(); }, - + }); // for backward compatibility: combine new and previous states diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json index 0d9e9e1d49..1bf2f35f56 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json @@ -1,846 +1,818 @@ { - "allow_attach": 1, - "autoname": "naming_series:", - "creation": "2013-05-21 16:16:39.000000", - "docstatus": 0, - "doctype": "DocType", - "document_type": "Transaction", + "allow_attach": 1, + "autoname": "naming_series:", + "creation": "2013-05-21 16:16:39.000000", + "docstatus": 0, + "doctype": "DocType", + "document_type": "Transaction", "fields": [ { - "fieldname": "supplier_section", - "fieldtype": "Section Break", - "label": "Supplier", - "options": "icon-user", + "fieldname": "supplier_section", + "fieldtype": "Section Break", + "label": "Supplier", + "options": "icon-user", "permlevel": 0 - }, + }, { - "fieldname": "column_break0", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_width": "50%", + "fieldname": "column_break0", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_width": "50%", "width": "50%" - }, + }, { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "\nGRN", - "permlevel": 0, - "print_hide": 1, + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Series", + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "\nGRN", + "permlevel": 0, + "print_hide": 1, "reqd": 1 - }, + }, { - "allow_on_submit": 0, - "fieldname": "supplier", - "fieldtype": "Link", - "in_filter": 1, - "label": "Supplier", - "oldfieldname": "supplier", - "oldfieldtype": "Link", - "options": "Supplier", - "permlevel": 0, - "print_hide": 1, - "print_width": "150px", - "reqd": 1, - "search_index": 1, + "allow_on_submit": 0, + "fieldname": "supplier", + "fieldtype": "Link", + "in_filter": 1, + "label": "Supplier", + "oldfieldname": "supplier", + "oldfieldtype": "Link", + "options": "Supplier", + "permlevel": 0, + "print_hide": 1, + "print_width": "150px", + "reqd": 1, + "search_index": 1, "width": "150px" - }, + }, { - "depends_on": "supplier", - "fieldname": "supplier_name", - "fieldtype": "Data", - "hidden": 0, - "in_list_view": 1, - "label": "Supplier Name", - "permlevel": 0, + "depends_on": "supplier", + "fieldname": "supplier_name", + "fieldtype": "Data", + "hidden": 0, + "in_list_view": 1, + "label": "Supplier Name", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "address_display", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Address", - "permlevel": 0, + "fieldname": "address_display", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Address", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "contact_display", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Contact", - "permlevel": 0, + "fieldname": "contact_display", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Contact", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "contact_mobile", - "fieldtype": "Text", - "hidden": 1, - "label": "Mobile No", - "permlevel": 0, + "fieldname": "contact_mobile", + "fieldtype": "Text", + "hidden": 1, + "label": "Mobile No", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "contact_email", - "fieldtype": "Text", - "hidden": 1, - "label": "Contact Email", - "permlevel": 0, - "print_hide": 1, + "fieldname": "contact_email", + "fieldtype": "Text", + "hidden": 1, + "label": "Contact Email", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_width": "50%", + "fieldname": "column_break1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_width": "50%", "width": "50%" - }, + }, { - "fieldname": "posting_date", - "fieldtype": "Date", - "in_filter": 1, - "label": "Posting Date", - "no_copy": 1, - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 1, - "print_width": "100px", - "reqd": 1, - "search_index": 1, + "fieldname": "posting_date", + "fieldtype": "Date", + "in_filter": 1, + "label": "Posting Date", + "no_copy": 1, + "oldfieldname": "posting_date", + "oldfieldtype": "Date", + "permlevel": 0, + "print_hide": 1, + "print_width": "100px", + "reqd": 1, + "search_index": 1, "width": "100px" - }, + }, { - "description": "Time at which materials were received", - "fieldname": "posting_time", - "fieldtype": "Time", - "in_filter": 0, - "label": "Posting Time", - "no_copy": 1, - "oldfieldname": "posting_time", - "oldfieldtype": "Time", - "permlevel": 0, - "print_hide": 1, - "print_width": "100px", - "reqd": 1, - "search_index": 0, + "description": "Time at which materials were received", + "fieldname": "posting_time", + "fieldtype": "Time", + "in_filter": 0, + "label": "Posting Time", + "no_copy": 1, + "oldfieldname": "posting_time", + "oldfieldtype": "Time", + "permlevel": 0, + "print_hide": 1, + "print_width": "100px", + "reqd": 1, + "search_index": 0, "width": "100px" - }, + }, { - "fieldname": "challan_no", - "fieldtype": "Data", - "hidden": 1, - "label": "Supplier Shipment No", - "no_copy": 1, - "oldfieldname": "challan_no", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "print_width": "100px", - "reqd": 0, - "width": "100px" - }, - { - "fieldname": "challan_date", - "fieldtype": "Date", - "hidden": 1, - "label": "Supplier Shipment Date", - "no_copy": 1, - "oldfieldname": "challan_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "print_width": "100px", - "reqd": 0, - "width": "100px" - }, - { - "fieldname": "currency_price_list", - "fieldtype": "Section Break", - "label": "Currency and Price List", - "options": "icon-tag", + "fieldname": "currency_price_list", + "fieldtype": "Section Break", + "label": "Currency and Price List", + "options": "icon-tag", "permlevel": 0 - }, + }, { - "fieldname": "currency", - "fieldtype": "Link", - "label": "Currency", - "oldfieldname": "currency", - "oldfieldtype": "Select", - "options": "Currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "currency", + "fieldtype": "Link", + "label": "Currency", + "oldfieldname": "currency", + "oldfieldtype": "Select", + "options": "Currency", + "permlevel": 0, + "print_hide": 1, "reqd": 1 - }, + }, { - "description": "Rate at which supplier's currency is converted to company's base currency", - "fieldname": "conversion_rate", - "fieldtype": "Float", - "label": "Exchange Rate", - "oldfieldname": "conversion_rate", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 1, + "description": "Rate at which supplier's currency is converted to company's base currency", + "fieldname": "conversion_rate", + "fieldtype": "Float", + "label": "Exchange Rate", + "oldfieldname": "conversion_rate", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 1, "reqd": 1 - }, + }, { - "fieldname": "column_break2", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_width": "50%", + "fieldname": "column_break2", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_width": "50%", "width": "50%" - }, + }, { - "fieldname": "buying_price_list", - "fieldtype": "Link", - "label": "Price List", - "options": "Price List", - "permlevel": 0, + "fieldname": "buying_price_list", + "fieldtype": "Link", + "label": "Price List", + "options": "Price List", + "permlevel": 0, "print_hide": 1 - }, + }, { - "depends_on": "buying_price_list", - "fieldname": "price_list_currency", - "fieldtype": "Link", - "hidden": 0, - "label": "Price List Currency", - "options": "Currency", - "permlevel": 0, - "print_hide": 1, + "depends_on": "buying_price_list", + "fieldname": "price_list_currency", + "fieldtype": "Link", + "hidden": 0, + "label": "Price List Currency", + "options": "Currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "depends_on": "buying_price_list", - "fieldname": "plc_conversion_rate", - "fieldtype": "Float", - "label": "Price List Exchange Rate", - "permlevel": 0, + "depends_on": "buying_price_list", + "fieldname": "plc_conversion_rate", + "fieldtype": "Float", + "label": "Price List Exchange Rate", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "items", - "fieldtype": "Section Break", - "label": "Items", - "oldfieldtype": "Section Break", - "options": "icon-shopping-cart", + "fieldname": "items", + "fieldtype": "Section Break", + "label": "Items", + "oldfieldtype": "Section Break", + "options": "icon-shopping-cart", "permlevel": 0 - }, + }, { - "allow_on_submit": 1, - "fieldname": "purchase_receipt_details", - "fieldtype": "Table", - "label": "Purchase Receipt Items", - "oldfieldname": "purchase_receipt_details", - "oldfieldtype": "Table", - "options": "Purchase Receipt Item", - "permlevel": 0, - "print_hide": 0, + "allow_on_submit": 1, + "fieldname": "purchase_receipt_details", + "fieldtype": "Table", + "label": "Purchase Receipt Items", + "oldfieldname": "purchase_receipt_details", + "oldfieldtype": "Table", + "options": "Purchase Receipt Item", + "permlevel": 0, + "print_hide": 0, "reqd": 0 - }, + }, { - "fieldname": "section_break0", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", + "fieldname": "section_break0", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", "permlevel": 0 - }, + }, { - "fieldname": "net_total_import", - "fieldtype": "Currency", - "label": "Net Total", - "oldfieldname": "net_total_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, + "fieldname": "net_total_import", + "fieldtype": "Currency", + "label": "Net Total", + "oldfieldname": "net_total_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, "read_only": 1 - }, + }, { - "fieldname": "get_current_stock", - "fieldtype": "Button", - "label": "Get Current Stock", - "oldfieldtype": "Button", - "options": "get_current_stock", - "permlevel": 0, + "fieldname": "get_current_stock", + "fieldtype": "Button", + "label": "Get Current Stock", + "oldfieldtype": "Button", + "options": "get_current_stock", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "column_break_27", - "fieldtype": "Column Break", + "fieldname": "column_break_27", + "fieldtype": "Column Break", "permlevel": 0 - }, + }, { - "fieldname": "net_total", - "fieldtype": "Currency", - "label": "Net Total (Company Currency)", - "oldfieldname": "net_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "print_width": "150px", - "read_only": 1, - "reqd": 1, + "fieldname": "net_total", + "fieldtype": "Currency", + "label": "Net Total (Company Currency)", + "oldfieldname": "net_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "print_width": "150px", + "read_only": 1, + "reqd": 1, "width": "150px" - }, + }, { - "description": "Add / Edit Taxes and Charges", - "fieldname": "taxes", - "fieldtype": "Section Break", - "label": "Taxes and Charges", - "oldfieldtype": "Section Break", - "options": "icon-money", + "description": "Add / Edit Taxes and Charges", + "fieldname": "taxes", + "fieldtype": "Section Break", + "label": "Taxes and Charges", + "oldfieldtype": "Section Break", + "options": "icon-money", "permlevel": 0 - }, + }, { - "description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.", - "fieldname": "taxes_and_charges", - "fieldtype": "Link", - "label": "Taxes and Charges", - "oldfieldname": "purchase_other_charges", - "oldfieldtype": "Link", - "options": "Purchase Taxes and Charges Master", - "permlevel": 0, + "description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.", + "fieldname": "taxes_and_charges", + "fieldtype": "Link", + "label": "Taxes and Charges", + "oldfieldname": "purchase_other_charges", + "oldfieldtype": "Link", + "options": "Purchase Taxes and Charges Master", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "other_charges", - "fieldtype": "Table", - "label": "Purchase Taxes and Charges", - "oldfieldname": "purchase_tax_details", - "oldfieldtype": "Table", - "options": "Purchase Taxes and Charges", + "fieldname": "other_charges", + "fieldtype": "Table", + "label": "Purchase Taxes and Charges", + "oldfieldname": "purchase_tax_details", + "oldfieldtype": "Table", + "options": "Purchase Taxes and Charges", "permlevel": 0 - }, + }, { - "fieldname": "other_charges_calculation", - "fieldtype": "HTML", - "label": "Taxes and Charges Calculation", - "oldfieldtype": "HTML", - "permlevel": 0, + "fieldname": "other_charges_calculation", + "fieldtype": "HTML", + "label": "Taxes and Charges Calculation", + "oldfieldtype": "HTML", + "permlevel": 0, "print_hide": 1 - }, + }, { - "description": "Detailed Breakup of the totals", - "fieldname": "totals", - "fieldtype": "Section Break", - "label": "Totals", - "oldfieldtype": "Section Break", - "options": "icon-money", + "description": "Detailed Breakup of the totals", + "fieldname": "totals", + "fieldtype": "Section Break", + "label": "Totals", + "oldfieldtype": "Section Break", + "options": "icon-money", "permlevel": 0 - }, + }, { - "fieldname": "other_charges_added_import", - "fieldtype": "Currency", - "label": "Taxes and Charges Added", - "oldfieldname": "other_charges_added_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "other_charges_added_import", + "fieldtype": "Currency", + "label": "Taxes and Charges Added", + "oldfieldname": "other_charges_added_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "other_charges_deducted_import", - "fieldtype": "Currency", - "label": "Taxes and Charges Deducted", - "oldfieldname": "other_charges_deducted_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "other_charges_deducted_import", + "fieldtype": "Currency", + "label": "Taxes and Charges Deducted", + "oldfieldname": "other_charges_deducted_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "grand_total_import", - "fieldtype": "Currency", - "label": "Grand Total", - "oldfieldname": "grand_total_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, + "fieldname": "grand_total_import", + "fieldtype": "Currency", + "label": "Grand Total", + "oldfieldname": "grand_total_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, "read_only": 1 - }, + }, { - "fieldname": "in_words_import", - "fieldtype": "Data", - "label": "In Words", - "oldfieldname": "in_words_import", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, + "fieldname": "in_words_import", + "fieldtype": "Data", + "label": "In Words", + "oldfieldname": "in_words_import", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, "read_only": 1 - }, + }, { - "fieldname": "column_break3", - "fieldtype": "Column Break", - "permlevel": 0, - "print_width": "50%", + "fieldname": "column_break3", + "fieldtype": "Column Break", + "permlevel": 0, + "print_width": "50%", "width": "50%" - }, + }, { - "fieldname": "other_charges_added", - "fieldtype": "Currency", - "label": "Taxes and Charges Added (Company Currency)", - "oldfieldname": "other_charges_added", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "other_charges_added", + "fieldtype": "Currency", + "label": "Taxes and Charges Added (Company Currency)", + "oldfieldname": "other_charges_added", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "other_charges_deducted", - "fieldtype": "Currency", - "label": "Taxes and Charges Deducted (Company Currency)", - "oldfieldname": "other_charges_deducted", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "other_charges_deducted", + "fieldtype": "Currency", + "label": "Taxes and Charges Deducted (Company Currency)", + "oldfieldname": "other_charges_deducted", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "total_tax", - "fieldtype": "Currency", - "label": "Total Tax (Company Currency)", - "oldfieldname": "total_tax", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "total_tax", + "fieldtype": "Currency", + "label": "Total Tax (Company Currency)", + "oldfieldname": "total_tax", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "grand_total", - "fieldtype": "Currency", - "label": "Grand Total (Company Currency)", - "oldfieldname": "grand_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "grand_total", + "fieldtype": "Currency", + "label": "Grand Total (Company Currency)", + "oldfieldname": "grand_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total (Company Currency)", - "oldfieldname": "rounded_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "rounded_total", + "fieldtype": "Currency", + "label": "Rounded Total (Company Currency)", + "oldfieldname": "rounded_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "description": "In Words will be visible once you save the Purchase Receipt.", - "fieldname": "in_words", - "fieldtype": "Data", - "label": "In Words (Company Currency)", - "oldfieldname": "in_words", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 1, + "description": "In Words will be visible once you save the Purchase Receipt.", + "fieldname": "in_words", + "fieldtype": "Data", + "label": "In Words (Company Currency)", + "oldfieldname": "in_words", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "terms_section_break", - "fieldtype": "Section Break", - "label": "Terms and Conditions", - "oldfieldtype": "Section Break", - "options": "icon-legal", + "fieldname": "terms_section_break", + "fieldtype": "Section Break", + "label": "Terms and Conditions", + "oldfieldtype": "Section Break", + "options": "icon-legal", "permlevel": 0 - }, + }, { - "fieldname": "tc_name", - "fieldtype": "Link", - "label": "Terms", - "oldfieldname": "tc_name", - "oldfieldtype": "Link", - "options": "Terms and Conditions", - "permlevel": 0, + "fieldname": "tc_name", + "fieldtype": "Link", + "label": "Terms", + "oldfieldname": "tc_name", + "oldfieldtype": "Link", + "options": "Terms and Conditions", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "terms", - "fieldtype": "Text Editor", - "label": "Terms and Conditions1", - "oldfieldname": "terms", - "oldfieldtype": "Text Editor", + "fieldname": "terms", + "fieldtype": "Text Editor", + "label": "Terms and Conditions1", + "oldfieldname": "terms", + "oldfieldtype": "Text Editor", "permlevel": 0 - }, + }, { - "depends_on": "supplier", - "fieldname": "contact_section", - "fieldtype": "Section Break", - "label": "Contact Info", - "options": "icon-bullhorn", + "depends_on": "supplier", + "fieldname": "contact_section", + "fieldtype": "Section Break", + "label": "Contact Info", + "options": "icon-bullhorn", "permlevel": 0 - }, + }, { - "fieldname": "supplier_address", - "fieldtype": "Link", - "label": "Supplier Address", - "options": "Address", - "permlevel": 0, + "fieldname": "supplier_address", + "fieldtype": "Link", + "label": "Supplier Address", + "options": "Address", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "column_break_57", - "fieldtype": "Column Break", + "fieldname": "column_break_57", + "fieldtype": "Column Break", "permlevel": 0 - }, + }, { - "fieldname": "contact_person", - "fieldtype": "Link", - "label": "Contact Person", - "options": "Contact", - "permlevel": 0, + "fieldname": "contact_person", + "fieldtype": "Link", + "label": "Contact Person", + "options": "Contact", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "more_info", - "fieldtype": "Section Break", - "label": "More Info", - "oldfieldtype": "Section Break", - "options": "icon-file-text", + "fieldname": "more_info", + "fieldtype": "Section Break", + "label": "More Info", + "oldfieldtype": "Section Break", + "options": "icon-file-text", "permlevel": 0 - }, + }, { - "fieldname": "status", - "fieldtype": "Select", - "in_filter": 1, - "label": "Status", - "no_copy": 1, - "oldfieldname": "status", - "oldfieldtype": "Select", - "options": "\nDraft\nSubmitted\nCancelled", - "permlevel": 0, - "print_hide": 1, - "print_width": "150px", - "read_only": 1, - "reqd": 1, - "search_index": 1, + "fieldname": "status", + "fieldtype": "Select", + "in_filter": 1, + "label": "Status", + "no_copy": 1, + "oldfieldname": "status", + "oldfieldtype": "Select", + "options": "\nDraft\nSubmitted\nCancelled", + "permlevel": 0, + "print_hide": 1, + "print_width": "150px", + "read_only": 1, + "reqd": 1, + "search_index": 1, "width": "150px" - }, + }, { - "default": "No", - "description": "Select \"Yes\" for sub - contracting items", - "fieldname": "is_subcontracted", - "fieldtype": "Select", - "label": "Is Subcontracted", - "oldfieldname": "is_subcontracted", - "oldfieldtype": "Select", - "options": "\nYes\nNo", - "permlevel": 0, + "default": "No", + "description": "Select \"Yes\" for sub - contracting items", + "fieldname": "is_subcontracted", + "fieldtype": "Select", + "label": "Is Subcontracted", + "oldfieldname": "is_subcontracted", + "oldfieldtype": "Select", + "options": "\nYes\nNo", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "amended_from", - "fieldtype": "Data", - "hidden": 1, - "ignore_restrictions": 1, - "label": "Amended From", - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Data", - "options": "Purchase Receipt", - "permlevel": 0, - "print_hide": 1, - "print_width": "150px", - "read_only": 1, + "fieldname": "amended_from", + "fieldtype": "Data", + "hidden": 1, + "ignore_restrictions": 1, + "label": "Amended From", + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Data", + "options": "Purchase Receipt", + "permlevel": 0, + "print_hide": 1, + "print_width": "150px", + "read_only": 1, "width": "150px" - }, + }, { - "fieldname": "range", - "fieldtype": "Data", - "hidden": 1, - "label": "Range", - "oldfieldname": "range", - "oldfieldtype": "Data", - "permlevel": 0, + "fieldname": "range", + "fieldtype": "Data", + "hidden": 1, + "label": "Range", + "oldfieldname": "range", + "oldfieldtype": "Data", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "bill_no", - "fieldtype": "Data", - "hidden": 1, - "label": "Bill No", - "oldfieldname": "bill_no", - "oldfieldtype": "Data", - "permlevel": 0, + "fieldname": "bill_no", + "fieldtype": "Data", + "hidden": 1, + "label": "Bill No", + "oldfieldname": "bill_no", + "oldfieldtype": "Data", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "bill_date", - "fieldtype": "Date", - "hidden": 1, - "label": "Bill Date", - "oldfieldname": "bill_date", - "oldfieldtype": "Date", - "permlevel": 0, + "fieldname": "bill_date", + "fieldtype": "Date", + "hidden": 1, + "label": "Bill Date", + "oldfieldname": "bill_date", + "oldfieldtype": "Date", + "permlevel": 0, "print_hide": 1 - }, + }, { - "allow_on_submit": 1, - "fieldname": "letter_head", - "fieldtype": "Select", - "label": "Letter Head", - "options": "link:Letter Head", - "permlevel": 0, + "allow_on_submit": 1, + "fieldname": "letter_head", + "fieldtype": "Select", + "label": "Letter Head", + "options": "link:Letter Head", + "permlevel": 0, "print_hide": 1 - }, + }, { - "allow_on_submit": 1, - "fieldname": "select_print_heading", - "fieldtype": "Link", - "label": "Print Heading", - "no_copy": 1, - "oldfieldname": "select_print_heading", - "oldfieldtype": "Link", - "options": "Print Heading", - "permlevel": 0, - "print_hide": 1, + "allow_on_submit": 1, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "label": "Print Heading", + "no_copy": 1, + "oldfieldname": "select_print_heading", + "oldfieldtype": "Link", + "options": "Print Heading", + "permlevel": 0, + "print_hide": 1, "report_hide": 1 - }, + }, { - "description": "Select the relevant company name if you have multiple companies", - "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, - "print_width": "150px", - "reqd": 1, - "search_index": 1, + "description": "Select the relevant company name if you have multiple companies", + "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, + "print_width": "150px", + "reqd": 1, + "search_index": 1, "width": "150px" - }, + }, { - "fieldname": "fiscal_year", - "fieldtype": "Select", - "in_filter": 1, - "label": "Fiscal Year", - "oldfieldname": "fiscal_year", - "oldfieldtype": "Select", - "options": "link:Fiscal Year", - "permlevel": 0, - "print_hide": 1, - "print_width": "150px", - "reqd": 1, - "search_index": 1, + "fieldname": "fiscal_year", + "fieldtype": "Select", + "in_filter": 1, + "label": "Fiscal Year", + "oldfieldname": "fiscal_year", + "oldfieldtype": "Select", + "options": "link:Fiscal Year", + "permlevel": 0, + "print_hide": 1, + "print_width": "150px", + "reqd": 1, + "search_index": 1, "width": "150px" - }, + }, { - "fieldname": "column_break4", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 1, - "print_width": "50%", + "fieldname": "column_break4", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 1, + "print_width": "50%", "width": "50%" - }, + }, { - "fieldname": "other_details", - "fieldtype": "HTML", - "hidden": 1, - "label": "Other Details", - "oldfieldtype": "HTML", - "options": "
Other Details
", - "permlevel": 0, - "print_hide": 1, - "print_width": "30%", - "reqd": 0, + "fieldname": "other_details", + "fieldtype": "HTML", + "hidden": 1, + "label": "Other Details", + "oldfieldtype": "HTML", + "options": "
Other Details
", + "permlevel": 0, + "print_hide": 1, + "print_width": "30%", + "reqd": 0, "width": "30%" - }, + }, { - "description": "Warehouse where you are maintaining stock of rejected items", - "fieldname": "rejected_warehouse", - "fieldtype": "Link", - "label": "Rejected Warehouse", - "no_copy": 1, - "oldfieldname": "rejected_warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", - "permlevel": 0, - "print_hide": 1, + "description": "Warehouse where you are maintaining stock of rejected items", + "fieldname": "rejected_warehouse", + "fieldtype": "Link", + "label": "Rejected Warehouse", + "no_copy": 1, + "oldfieldname": "rejected_warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "permlevel": 0, + "print_hide": 1, "reqd": 0 - }, + }, { - "description": "Supplier warehouse where you have issued raw materials for sub - contracting", - "fieldname": "supplier_warehouse", - "fieldtype": "Link", - "label": "Supplier Warehouse", - "no_copy": 1, - "oldfieldname": "supplier_warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", - "permlevel": 0, - "print_hide": 1, - "print_width": "50px", + "description": "Supplier warehouse where you have issued raw materials for sub - contracting", + "fieldname": "supplier_warehouse", + "fieldtype": "Link", + "label": "Supplier Warehouse", + "no_copy": 1, + "oldfieldname": "supplier_warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "permlevel": 0, + "print_hide": 1, + "print_width": "50px", "width": "50px" - }, + }, { - "fieldname": "instructions", - "fieldtype": "Small Text", - "label": "Instructions", - "oldfieldname": "instructions", - "oldfieldtype": "Text", + "fieldname": "instructions", + "fieldtype": "Small Text", + "label": "Instructions", + "oldfieldname": "instructions", + "oldfieldtype": "Text", "permlevel": 0 - }, + }, { - "fieldname": "remarks", - "fieldtype": "Small Text", - "label": "Remarks", - "permlevel": 0, + "fieldname": "remarks", + "fieldtype": "Small Text", + "label": "Remarks", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "transporter_info", - "fieldtype": "Section Break", - "label": "Transporter Info", - "options": "icon-truck", + "fieldname": "transporter_info", + "fieldtype": "Section Break", + "label": "Transporter Info", + "options": "icon-truck", "permlevel": 0 - }, + }, { - "fieldname": "transporter_name", - "fieldtype": "Data", - "label": "Transporter Name", - "oldfieldname": "transporter_name", - "oldfieldtype": "Data", + "fieldname": "transporter_name", + "fieldtype": "Data", + "label": "Transporter Name", + "oldfieldname": "transporter_name", + "oldfieldtype": "Data", "permlevel": 0 - }, + }, { - "description": "Transporter lorry number", - "fieldname": "lr_no", - "fieldtype": "Data", - "label": "LR No", - "no_copy": 1, - "oldfieldname": "lr_no", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "print_width": "100px", + "description": "Transporter lorry number", + "fieldname": "lr_no", + "fieldtype": "Data", + "label": "LR No", + "no_copy": 1, + "oldfieldname": "lr_no", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "print_width": "100px", "width": "100px" - }, + }, { - "description": "Date on which lorry started from supplier warehouse", - "fieldname": "lr_date", - "fieldtype": "Date", - "label": "LR Date", - "no_copy": 1, - "oldfieldname": "lr_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "print_width": "100px", + "description": "Date on which lorry started from supplier warehouse", + "fieldname": "lr_date", + "fieldtype": "Date", + "label": "LR Date", + "no_copy": 1, + "oldfieldname": "lr_date", + "oldfieldtype": "Date", + "permlevel": 0, + "print_hide": 0, + "print_width": "100px", "width": "100px" - }, + }, { - "fieldname": "column_break5", - "fieldtype": "Column Break", - "permlevel": 0, - "print_width": "50%", + "fieldname": "column_break5", + "fieldtype": "Column Break", + "permlevel": 0, + "print_width": "50%", "width": "50%" - }, + }, { - "description": "Following table will show values if items are sub - contracted. These values will be fetched from the master of \"Bill of Materials\" of sub - contracted items.", - "fieldname": "raw_material_details", - "fieldtype": "Section Break", - "label": "Raw Materials Supplied", - "oldfieldtype": "Section Break", - "options": "icon-table", - "permlevel": 0, - "print_hide": 1, + "description": "Following table will show values if items are sub - contracted. These values will be fetched from the master of \"Bill of Materials\" of sub - contracted items.", + "fieldname": "raw_material_details", + "fieldtype": "Section Break", + "label": "Raw Materials Supplied", + "oldfieldtype": "Section Break", + "options": "icon-table", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "pr_raw_material_details", - "fieldtype": "Table", - "label": "Purchase Receipt Item Supplieds", - "no_copy": 1, - "oldfieldname": "pr_raw_material_details", - "oldfieldtype": "Table", - "options": "Purchase Receipt Item Supplied", - "permlevel": 0, - "print_hide": 1, + "fieldname": "pr_raw_material_details", + "fieldtype": "Table", + "label": "Purchase Receipt Item Supplieds", + "no_copy": 1, + "oldfieldname": "pr_raw_material_details", + "oldfieldtype": "Table", + "options": "Purchase Receipt Item Supplied", + "permlevel": 0, + "print_hide": 1, "read_only": 1 } - ], - "icon": "icon-truck", - "idx": 1, - "is_submittable": 1, - "modified": "2014-02-17 12:01:00.000000", - "modified_by": "Administrator", - "module": "Stock", - "name": "Purchase Receipt", - "owner": "Administrator", + ], + "icon": "icon-truck", + "idx": 1, + "is_submittable": 1, + "modified": "2014-02-17 12:02:00.000000", + "modified_by": "Administrator", + "module": "Stock", + "name": "Purchase Receipt", + "owner": "Administrator", "permissions": [ { - "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 - }, + }, { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Material User", - "submit": 1, + "amend": 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, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Purchase User", - "submit": 1, + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Purchase User", + "submit": 1, "write": 1 - }, + }, { - "cancel": 0, - "delete": 0, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, + "cancel": 0, + "delete": 0, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, "role": "Supplier" } - ], - "read_only_onload": 1, + ], + "read_only_onload": 1, "search_fields": "status, posting_date, supplier" -} \ No newline at end of file +} diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 253586000b..7f7dd56b7d 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -53,7 +53,6 @@ class PurchaseReceipt(BuyingController): self.validate_inspection() self.validate_uom_is_integer("uom", ["qty", "received_qty"]) self.validate_uom_is_integer("stock_uom", "stock_qty") - self.validate_challan_no() pc_obj = frappe.get_doc('Purchase Common') pc_obj.validate_for_items(self) @@ -89,15 +88,6 @@ class PurchaseReceipt(BuyingController): frappe.throw(_("Accepted + Rejected Qty must be equal to Received quantity for Item {0}").format(d.item_code)) - def validate_challan_no(self): - "Validate if same challan no exists for same supplier in a submitted purchase receipt" - if self.challan_no: - exists = frappe.db.sql_list("""select name from `tabPurchase Receipt` - where docstatus=1 and name!=%s and supplier=%s and challan_no=%s - and fiscal_year=%s""", (self.name, self.supplier, self.challan_no, self.doc.fiscal_year)) - if exists: - frappe.throw(_("Supplier delivery number duplicate in {0}").format(exists)) - def validate_with_previous_doc(self): super(PurchaseReceipt, self).validate_with_previous_doc(self.tname, { "Purchase Order": { From 4b7a6b13ec489f78b0401b703a467b3e6c634013 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 6 May 2014 16:41:31 +0530 Subject: [PATCH 2/2] Additions to remove India specific fields --- erpnext/patches/4_0/remove_india_specific_fields.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/4_0/remove_india_specific_fields.py b/erpnext/patches/4_0/remove_india_specific_fields.py index 63bd4cb740..68592cb463 100644 --- a/erpnext/patches/4_0/remove_india_specific_fields.py +++ b/erpnext/patches/4_0/remove_india_specific_fields.py @@ -18,6 +18,10 @@ def execute(): } for (doctype, fieldname), df in docfields.items(): + opts = df.as_dict() + if df.idx >= 2: + opts["insert_after"] = frappe.get_meta(doctype).get("fields")[df.idx - 2].fieldname + frappe.delete_doc("DocField", df.name) frappe.clear_cache(doctype=doctype) - create_custom_field_if_values_exist(doctype, df.as_dict()) + create_custom_field_if_values_exist(doctype, opts)