From 522824b35d05f42917ae2f5ef1ec78472c25beb8 Mon Sep 17 00:00:00 2001 From: jay Date: Wed, 8 Jan 2025 16:22:18 +0530 Subject: [PATCH 1/2] chores: Testcases added in stock module TC_SCK_072, TC_SCK_073, TC_SCK_074 --- .../purchase_receipt/test_purchase_receipt.py | 231 +++++++++++++++++- 1 file changed, 230 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 2880d3fab7a9..15a6b720a393 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -25,7 +25,6 @@ from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse - class TestPurchaseReceipt(FrappeTestCase): def setUp(self): frappe.db.set_single_value("Buying Settings", "allow_multiple_items", 1) @@ -3901,6 +3900,197 @@ def test_batch_no_return_validation(self): batch_return.save() batch_return.submit() + def test_purchase_order_and_receipt_TC_SCK_072(self): + company = "_Test Company" + item1 = make_item("ST-N-001", {"is_stock_item": 1, "gst_hsn_code": "01011010"}) + item2 = make_item("W-N-001", {"is_stock_item": 1, "gst_hsn_code": "01011020"}) + warehouse1 = create_warehouse("Raw Material - Iron Building - _TC", company=company) + warehouse2 = create_warehouse("Woods - _TC", company=company) + posting_date = "2024-12-31" + + # Create Purchase Order + po = frappe.new_doc("Purchase Order") + po.company = company + po.supplier = "_Test Supplier" + po.transaction_date = posting_date + po.schedule_date = "2025-01-02" + item_list = [{"item_code": item1.name, "rate":50 ,"qty": 150, "warehouse": warehouse1}, {"item_code": item2.name,"rate":55 , "qty": 75, "warehouse": warehouse2}] + for row in item_list: + po.append("items", row) + po.insert() + po.submit() + + self.assertEqual(po.items[0].item_code, item1.name) + self.assertEqual(po.items[0].qty, 150) + self.assertEqual(po.items[0].warehouse, warehouse1) + self.assertEqual(po.items[1].item_code, item2.name) + self.assertEqual(po.items[1].qty, 75) + self.assertEqual(po.items[1].warehouse, warehouse2) + + # Check PO status + self.assertEqual(po.status, "To Receive and Bill") + + # Create Purchase Receipt + pr = make_purchase_receipt_with_multiple_items( + purchase_order=po.name, + company=company, + supplier=po.supplier, + posting_date=posting_date, + items=item_list + ) + + self.assertEqual(pr.items[0].item_code, item1.name) + self.assertEqual(pr.items[0].qty, 150) + self.assertEqual(pr.items[0].warehouse, warehouse1) + self.assertEqual(pr.items[1].item_code, item2.name) + self.assertEqual(pr.items[1].qty, 75) + self.assertEqual(pr.items[1].warehouse, warehouse2) + + # Check PR status + self.assertEqual(pr.status, "To Bill") + + # Check Stock Ledger Entries + sl_entries = get_sl_entries("Purchase Receipt", pr.name) + self.assertEqual(len(sl_entries), 2) + self.assertEqual(sl_entries[0].warehouse, warehouse1) + self.assertEqual(sl_entries[1].warehouse, warehouse2) + + def test_purchase_order_and_receipt_TC_SCK_073(self): + company = "_Test Indian Registered Company" + item1 = make_item("ST-N-001", {"is_stock_item": 1, "gst_hsn_code": "01011010"}) + item2 = make_item("W-N-001", {"is_stock_item": 1, "gst_hsn_code": "01011020"}) + warehouse1 = create_warehouse("Raw Material - Iron Building - _TIRC", company=company) + warehouse2 = create_warehouse("Woods - _TIRC", company=company) + rejected_warehouse = create_warehouse("Rejection / Scrap - _TIRC", company=company) + posting_date = "2024-12-31" + + # Create Purchase Order + po = frappe.new_doc("Purchase Order") + po.company = company + po.supplier = "_Test Supplier" + po.transaction_date = posting_date + po.schedule_date = "2025-01-02" + item_list = [{"item_code": item1.name, "rate":50 ,"qty": 150, "warehouse": warehouse1}, {"item_code": item2.name,"rate":55 , "qty": 75, "warehouse": warehouse2}] + for row in item_list: + po.append("items", row) + po.insert() + po.submit() + + self.assertEqual(po.items[0].item_code, item1.name) + self.assertEqual(po.items[0].qty, 150) + self.assertEqual(po.items[0].warehouse, warehouse1) + self.assertEqual(po.items[1].item_code, item2.name) + self.assertEqual(po.items[1].qty, 75) + self.assertEqual(po.items[1].warehouse, warehouse2) + + # Check PO status + self.assertEqual(po.status, "To Receive and Bill") + + item_list[0]["qty"] = 100 + item_list[0]["rejected_qty"] = 50 + item_list[0]["rejected_warehouse"] = rejected_warehouse + item_list[1]["qty"] = 50 + item_list[1]["rejected_qty"] = 25 + item_list[1]["rejected_warehouse"] = rejected_warehouse + + # Create Purchase Receipt + pr = make_purchase_receipt_with_multiple_items( + purchase_order=po.name, + company=company, + supplier=po.supplier, + posting_date=posting_date, + items=item_list, + ) + pr.save() + pr.submit() + + self.assertEqual(pr.items[0].item_code, item1.name) + self.assertEqual(pr.items[0].qty, 100) + self.assertEqual(pr.items[0].warehouse, warehouse1) + self.assertEqual(pr.items[0].rejected_qty, 50) + self.assertEqual(pr.items[0].rejected_warehouse, rejected_warehouse) + self.assertEqual(pr.items[1].item_code, item2.name) + self.assertEqual(pr.items[1].qty, 50) + self.assertEqual(pr.items[1].warehouse, warehouse2) + self.assertEqual(pr.items[1].rejected_qty, 25) + self.assertEqual(pr.items[1].rejected_warehouse, rejected_warehouse) + + # Check PR status + self.assertEqual(pr.status, "To Bill") + + # Check Stock Ledger Entries + sl_entries = get_sl_entries("Purchase Receipt", pr.name) + self.assertEqual(len(sl_entries), 4) + self.assertEqual(sl_entries[0].warehouse, warehouse1) + self.assertEqual(sl_entries[1].warehouse, rejected_warehouse) + self.assertEqual(sl_entries[2].warehouse, warehouse2) + self.assertEqual(sl_entries[3].warehouse, rejected_warehouse) + + def test_purchase_order_and_receipt_TC_SCK_074(self): + company = "_Test Indian Registered Company" + item1 = make_item("ST-N-001", {"is_stock_item": 1, "gst_hsn_code": "01011010"}) + item2 = make_item("W-N-001", {"is_stock_item": 1, "gst_hsn_code": "01011020"}) + warehouse1 = create_warehouse("Raw Material - Iron Building - _TIRC", company=company) + warehouse2 = create_warehouse("Woods - _TIRC", company=company) + rejected_warehouse = create_warehouse("Rejection / Scrap - _TIRC", company=company) + posting_date = "2024-12-31" + + # Create Purchase Order + po = frappe.new_doc("Purchase Order") + po.company = company + po.supplier = "_Test Supplier" + po.transaction_date = posting_date + po.schedule_date = "2025-01-02" + item_list = [{"item_code": item1.name, "rate":50 ,"qty": 150, "warehouse": warehouse1}, {"item_code": item2.name,"rate":55 , "qty": 75, "warehouse": warehouse2}] + for row in item_list: + po.append("items", row) + po.insert() + po.submit() + + self.assertEqual(po.items[0].item_code, item1.name) + self.assertEqual(po.items[0].qty, 150) + self.assertEqual(po.items[0].warehouse, warehouse1) + self.assertEqual(po.items[1].item_code, item2.name) + self.assertEqual(po.items[1].qty, 75) + self.assertEqual(po.items[1].warehouse, warehouse2) + + # Check PO status + self.assertEqual(po.status, "To Receive and Bill") + item_list[0]["qty"] = 0 + item_list[0]["rejected_qty"] = 150 + item_list[0]["rejected_warehouse"] = rejected_warehouse + item_list[1]["qty"] = 0 + item_list[1]["rejected_qty"] = 75 + item_list[1]["rejected_warehouse"] = rejected_warehouse + + # Create Purchase Receipt + pr = make_purchase_receipt_with_multiple_items( + purchase_order=po.name, + company=company, + supplier=po.supplier, + posting_date=posting_date, + items=item_list, + ) + pr.save() + pr.submit() + + self.assertEqual(pr.items[0].item_code, item1.name) + self.assertEqual(pr.items[0].qty, 0) + self.assertEqual(pr.items[0].rejected_qty, 150) + self.assertEqual(pr.items[0].rejected_warehouse, rejected_warehouse) + self.assertEqual(pr.items[1].item_code, item2.name) + self.assertEqual(pr.items[1].qty, 0) + self.assertEqual(pr.items[1].rejected_qty, 75) + self.assertEqual(pr.items[1].rejected_warehouse, rejected_warehouse) + + # Check PR status + self.assertEqual(pr.status, "Completed") + + # Check Stock Ledger Entries + sl_entries = get_sl_entries("Purchase Receipt", pr.name) + self.assertEqual(len(sl_entries), 2) + self.assertEqual(sl_entries[0].warehouse, rejected_warehouse) + self.assertEqual(sl_entries[1].warehouse, rejected_warehouse) def prepare_data_for_internal_transfer(): from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier @@ -4147,6 +4337,45 @@ def make_purchase_receipt(**args): return pr +def make_purchase_receipt_with_multiple_items(**args): + if not frappe.db.exists("Location", "Test Location"): + frappe.get_doc({"doctype": "Location", "location_name": "Test Location"}).insert() + + frappe.db.set_single_value("Buying Settings", "allow_multiple_items", 1) + pr = frappe.new_doc("Purchase Receipt") + args = frappe._dict(args) + pr.posting_date = args.posting_date or today() + if args.posting_time: + pr.posting_time = args.posting_time + if args.posting_date or args.posting_time: + pr.set_posting_time = 1 + pr.company = args.company or "_Test Company" + pr.supplier = args.supplier or "_Test Supplier" + pr.is_subcontracted = args.is_subcontracted or 0 + pr.supplier_warehouse = args.supplier_warehouse or "_Test Warehouse 1 - _TC" + pr.currency = args.currency or "INR" + pr.is_return = args.is_return + pr.return_against = args.return_against + pr.apply_putaway_rule = args.apply_putaway_rule + + items = args["items"] or get_items(warehouse=args.warehouse, cost_center=args.cost_center) + for item in items: + if args.purchase_order: + item["purchase_order"] = args.purchase_order + pr.append("items", item) + + if args.get_taxes_and_charges: + for tax in get_taxes(): + pr.append("taxes", tax) + + if not args.do_not_save: + pr.insert() + if not args.do_not_submit: + pr.submit() + pr.load_from_db() + + return pr + test_dependencies = ["BOM", "Item Price", "Location"] test_records = frappe.get_test_records("Purchase Receipt") From 1279e23c0bc02adf4ff8cef750fc49b8d1dae217 Mon Sep 17 00:00:00 2001 From: jay Date: Wed, 15 Jan 2025 16:26:07 +0530 Subject: [PATCH 2/2] fix: supplier custom fileds moved from Erpnext to Erpnext_india app --- erpnext/buying/custom_fields/supplier.json | 530 -------- erpnext/buying/doctype/supplier/supplier.json | 1106 ++++++++--------- erpnext/hooks.py | 2 +- erpnext/setup/install.py | 20 +- 4 files changed, 564 insertions(+), 1094 deletions(-) delete mode 100644 erpnext/buying/custom_fields/supplier.json diff --git a/erpnext/buying/custom_fields/supplier.json b/erpnext/buying/custom_fields/supplier.json deleted file mode 100644 index bcd7a215ce6f..000000000000 --- a/erpnext/buying/custom_fields/supplier.json +++ /dev/null @@ -1,530 +0,0 @@ -{ - "Supplier":[ - { - "label":"Date Last", - "fieldname":"custom_date_last", - "insert_after":"custom_column_break_gpq6w", - "fieldtype":"Date", - "module": "Buying" - }, - { - "fieldname":"custom_column_break_gpq6w", - "insert_after":"custom_place", - "fieldtype":"Column Break", - "module": "Buying" - }, - { - "label":"TAN (Mention No Here)", - "fieldname":"custom_tan_mention_no_here", - "insert_after":"custom_tan", - "fieldtype":"Data", - "translatable":1, - "module": "Buying" - }, - { - "fieldname":"custom_column_break_4hgq2", - "insert_after":"custom_place", - "fieldtype":"Column Break", - "module": "Buying" - }, - { - "fieldname": "custom_attach_iso_certificate_if_any", - "fieldtype": "Attach", - "insert_after": "custom_attach_article_of_association", - "label": "Attach ISO Certificate (If any)", - "module": "Buying" - }, - { - "fieldname": "custom_spoc_email", - "fieldtype": "Link", - "insert_after": "country", - "label": "Spoc Email", - "options":"User", - "mandatory_depends_on": "eval:doc.workflow_state=='Draft'", - "module": "Buying" - }, - { - "fieldname": "custom_spoc", - "fieldtype": "Data", - "insert_after": "custom_spoc_email", - "label": "Spoc", - "module": "Buying" - }, - { - "fieldname": "custom_nature_of_business_short_description", - "fieldtype": "Data", - "insert_after": "custom_spoc", - "label": "Nature of Business (short description)", - "module": "Buying" - }, - { - "fieldname": "custom_entity_type", - "fieldtype": "Select", - "insert_after": "is_transporter", - "label": "Entity Type", - "module": "Buying", - "options": "\nPublic limited Company\nPrivate limited Company\nJoint venture Company\nOne person Company\nSection 8 Company\nLimited Liability Partnership\nPartnership Firm\nSole Proprietorship\nNon-government organization (NGO)\nAssociation of Person/ Body of Individual\nLocal Authority\nArtificial Juridical Person" - }, - { - "fieldname": "custom_brand_name_trademark", - "fieldtype": "Data", - "insert_after": "custom_entity_type", - "label": "Brand Name/ Trademark", - "module": "Buying" - }, - { - "fieldname": "custom_section_break_vtita", - "fieldtype": "Section Break", - "insert_after": "custom_brand_name_trademark", - "label": null, - "module": "Buying" - }, - { - "fieldname": "custom_date_of_incorporation", - "fieldtype": "Date", - "insert_after": "custom_section_break_vtita", - "label": "Date of Incorporation", - "module": "Buying" - }, - { - "fieldname": "custom_employee_strength_slab", - "fieldtype": "Select", - "insert_after": "custom_date_of_incorporation", - "label": "Employee Strength Slab", - "module": "Buying", - "options": "\n0 to 10\n11 to 50\n51 to 100\n101 to 200\n201 to 500\n501 to 1000\nAbove 1000" - }, - { - "fieldname": "custom_column_break_iniy0", - "fieldtype": "Column Break", - "insert_after": "custom_employee_strength_slab", - "label": null, - "module": "Buying" - }, - { - "fieldname": "custom_turnover_slab_in_inr", - "fieldtype": "Select", - "insert_after": "custom_column_break_iniy0", - "label": "Turnover Slab (in INR)", - "module": "Buying", - "options": "\nUpto 20 Lakhs\n20 Lakhs to 1 Crores\n1.1 Crores to 5 Crores\n5.1 Crores to 10 Crores\n10.1 Crores to 50 Crores\n50.1 Crores to 100 Crores\n100.1 Crores to 500 Crores\n500.1 Crores to 1000 Crores" - }, - { - "fieldname": "custom_nationality", - "fieldtype": "Select", - "insert_after": "default_bank_account", - "label": "Nationality", - "module": "Buying", - "options": "\nIndian\nForeign" - }, - { - "fieldname": "custom_website", - "fieldtype": "Data", - "insert_after": "default_price_list", - "label": "Website", - "module": "Buying" - }, - { - "description": "I / We hereby confirm that: - 1. Our firm is a legally registered entity operating in accordance with all local laws in the Jurisdiction. 2. Our firm possesses the necessary technical expertise, qualifications and experience to deliver as per specifications of KEF. 3. Our firm adheres to quality management practices and standards to ensure the delivery of high quality products/services in compliance with the contract requirements. 4. Our firm conducts business with integrity, transparency and in compliance with ethical standards. 5. Our firm has not made any false or misleading information or declaration and submitted copies of forged / falsified documents for registering with KEF. 6. Our firm has not been declared bankrupt or insolvent/wound up or taken into liquidation/ banned / barred or black listed by Government Agencies or Statutory bodies, Registrar of Companies and PSUs. 7. Our firm is not involved in any illegal activities/unethical practices/serious complaints from any organization. 8. The Proprietor / Directors / Partners of our firm are not part of any other firm or company which is banned / barred or blacklisted by Government Agencies or Statutory bodies, Registrar of Companies and PSUs. 9. Our firm will not indulge in providing gifts, favours, courtesies, or entertainment to KEF including its employees and other personnel to gain advantage or influence over KEF. 10. Our firm will safeguard confidential information of KEF and ensure data security. 11. Our firm adheres to applicable domestic and local labour laws regarding wages, working hours, forced labour, human trafficking and child labour. 12. Our firm adheres to applicable occupational, health and safety standards and ensures compliance with all the applicable environmental rules and regulations in our jurisdiction. 13. KEF reserves the right to disqualify / terminate the vendor registration at any point of the time, if our firm fails to abide by the terms and conditions under which the registration has been granted and for failure to inform KEF of any change in our status such that we no longer meet the registration qualification criteria. 14. Notice must be given of any change in status impacting the information provided within ten (10) days of said change. 15. Our firm does not have any conflict of interest with KEF and will implement adequate steps to prevent any conflict of interest in the operations conducted with KEF.", - "fieldname": "custom_declaration", - "fieldtype": "Section Break", - "insert_after": "language", - "label": "Declaration", - "module": "Buying" - }, - { - "fieldname": "custom_i_agree", - "fieldtype": "Check", - "insert_after": "custom_declaration", - "label": "I agree", - "module": "Buying" - }, - { - "fieldname": "custom_section_break_fxktg", - "fieldtype": "Section Break", - "insert_after": "custom_i_agree", - "label": null, - "module": "Buying" - }, - { - "fieldname": "custom_name", - "fieldtype": "Data", - "insert_after": "custom_section_break_fxktg", - "label": "Name", - "module": "Buying" - }, - { - "fieldname": "custom_column_break_opxeh", - "fieldtype": "Column Break", - "insert_after": "custom_name", - "label": null, - "module": "Buying" - }, - { - "fieldname": "custom_place", - "fieldtype": "Data", - "insert_after": "custom_column_break_opxeh", - "label": "Place", - "module": "Buying" - }, - { - "fieldname": "custom_gst_registered", - "fieldtype": "Select", - "insert_after": "tax_details_section", - "label": "GST Registered", - "module": "Buying", - "options": "\nYes\nNo" - }, - { - "fieldname": "custom_attach_gst_registration_", - "fieldtype": "Attach", - "insert_after": "custom_gst_registered", - "label": "Attach GST Registration ", - "module": "Buying" - }, - { - "fieldname": "custom_pan_applicable", - "fieldtype": "Select", - "insert_after": "gstin", - "label": "PAN Applicable", - "module": "Buying", - "options": "\nYes\nNo" - }, - { - "fieldname": "custom_panaadhar_linking_status", - "fieldtype": "Select", - "insert_after": "pan", - "label": "PAN/Aadhar Linking status", - "module": "Buying", - "options": "\nYes\nNo" - }, - { - "fieldname": "custom_is_e_invoice_applicable", - "fieldtype": "Select", - "insert_after": "is_reverse_charge_applicable", - "label": "Is E invoice applicable", - "module": "Buying", - "options": "\nYes\nNo" - }, - { - "fieldname": "custom_declaration_incase_e_invoice_not_applicable", - "fieldtype": "Check", - "insert_after": "custom_is_e_invoice_applicable", - "label": "Declaration incase E invoice not applicable", - "mandatory_depends_on": "eval:doc.custom_is_e_invoice_applicable=='No'", - "module": "Buying" - }, - { - "depends_on": "eval:doc.custom_pan_applicable=='Yes'", - "fieldname": "custom_attach_pan", - "fieldtype": "Attach", - "insert_after": "custom_declaration_incase_e_invoice_not_applicable", - "label": "Attach PAN", - "module": "Buying" - }, - { - "depends_on": "eval:doc.custom_panaadhar_linking_status=='Yes'", - "fieldname": "custom_panaadhar_linking_doc", - "fieldtype": "Attach", - "insert_after": "custom_attach_pan", - "label": "Pan/Aadhar linking doc", - "module": "Buying" - }, - { - "fieldname": "custom_income_tax", - "fieldtype": "Section Break", - "insert_after": "custom_panaadhar_linking_doc", - "label": "Income Tax", - "module": "Buying" - }, - { - "fieldname": "custom_tan", - "fieldtype": "Select", - "insert_after": "custom_income_tax", - "label": "TAN", - "module": "Buying", - "options": "\nYes\nNo" - }, - { - "depends_on": "eval:doc.custom_tan=='Yes'", - "fieldname": "custom_attach_tan", - "fieldtype": "Attach", - "insert_after": "custom_tan", - "label": "Attach TAN", - "module": "Buying" - }, - { - "fieldname": "custom_itr_filed_for_latest_financial_year", - "fieldtype": "Select", - "insert_after": "custom_attach_tan", - "label": "ITR filed for latest financial year", - "module": "Buying", - "options": "\nYes\nNo" - }, - { - "depends_on": "eval:doc.custom_itr_filed_for_latest_financial_year=='Yes'", - "fieldname": "custom_attach_itr_acknowledgement", - "fieldtype": "Attach", - "insert_after": "custom_itr_filed_for_latest_financial_year", - "label": "Attach ITR Acknowledgement", - "module": "Buying" - }, - { - "depends_on": "eval:doc.custom_nationality=='Foreign'", - "fieldname": "custom_country_of_tax_residence", - "fieldtype": "Data", - "insert_after": "custom_attach_itr_acknowledgement", - "label": "Country of Tax Residence", - "module": "Buying" - }, - { - "depends_on": "eval:doc.custom_nationality=='Foreign'", - "fieldname": "custom_tax_identification_number_tin", - "fieldtype": "Data", - "insert_after": "custom_country_of_tax_residence", - "label": "Tax Identification Number (TIN)", - "module": "Buying" - }, - { - "fieldname": "custom_column_break_eg8n1", - "fieldtype": "Column Break", - "insert_after": "custom_tax_identification_number_tin", - "label": null, - "module": "Buying" - }, - { - "depends_on": "eval:doc.custom_nationality=='Foreign'", - "fieldname": "custom_pe_certificate", - "fieldtype": "Attach", - "insert_after": "custom_column_break_eg8n1", - "label": "PE Certificate", - "module": "Buying" - }, - { - "depends_on": "eval:doc.custom_nationality=='Foreign'", - "fieldname": "custom_tax_residency_certificate_trc", - "fieldtype": "Data", - "insert_after": "custom_pe_certificate", - "label": "Tax Residency Certificate (TRC)", - "module": "Buying" - }, - { - "depends_on": "eval:doc.custom_nationality=='Foreign'", - "fieldname": "custom_form_10f_generated_on_indian_income_tax_portal", - "fieldtype": "Data", - "insert_after": "custom_tax_residency_certificate_trc", - "label": "Form 10F (Generated on Indian Income Tax Portal)", - "module": "Buying" - }, - { - "fieldname": "custom_column_break_ul4xf", - "fieldtype": "Column Break", - "label": null, - "module": "Buying" - }, - { - "fieldname": "custom_lower_tds_deduction_applicable", - "fieldtype": "Select", - "insert_after": "custom_column_break_ul4xf", - "label": "Lower TDS Deduction Applicable", - "module": "Buying", - "options": "\nYes\nNo" - }, - { - "depends_on": "eval:doc.custom_lower_tds_deduction_applicable=='Yes'", - "fieldname": "custom_from_date", - "fieldtype": "Date", - "insert_after": "custom_lower_tds_deduction_applicable", - "label": "From Date", - "module": "Buying" - }, - { - "depends_on": "eval:doc.custom_lower_tds_deduction_applicable=='Yes'", - "fieldname": "custom_to_date", - "fieldtype": "Date", - "insert_after": "custom_from_date", - "label": "To Date", - "module": "Buying" - }, - { - "depends_on": "eval:doc.custom_lower_tds_deduction_applicable=='Yes'", - "fieldname": "custom_amount", - "fieldtype": "Currency", - "insert_after": "custom_to_date", - "label": "Amount", - "module": "Buying" - }, - { - "depends_on": "eval:doc.custom_lower_tds_deduction_applicable=='Yes'", - "fieldname": "custom_ldc_upload", - "fieldtype": "Attach", - "insert_after": "custom_amount", - "label": "LDC Upload", - "module": "Buying" - }, - { - "fieldname": "custom_regulatory_information", - "fieldtype": "Section Break", - "insert_after": "custom_ldc_upload", - "label": "Regulatory Information", - "module": "Buying" - }, - { - "fieldname": "custom_are_you_registered_as_msme", - "fieldtype": "Select", - "insert_after": "custom_regulatory_information", - "label": "Are you registered as MSME", - "module": "Buying", - "options": "\nYes\nNo" - }, - { - "depends_on": "eval:doc.custom_are_you_registered_as_msme=='Yes'", - "fieldname": "custom_msme_certificate_no", - "fieldtype": "Data", - "insert_after": "custom_are_you_registered_as_msme", - "label": "MSME Certificate No.", - "module": "Buying" - }, - { - "depends_on": "eval:doc.custom_are_you_registered_as_msme=='Yes'", - "fieldname": "custom_msme_type", - "fieldtype": "Select", - "insert_after": "custom_msme_certificate_no", - "label": "MSME Type", - "module": "Buying", - "options": "\nMicro\nSmall\nMedium" - }, - { - "depends_on": "eval:doc.custom_are_you_registered_as_msme=='Yes'", - "fieldname": "custom_attach_msme_certificate", - "fieldtype": "Attach", - "insert_after": "custom_msme_type", - "label": "Attach MSME Certificate", - "module": "Buying" - }, - { - "depends_on": "eval:doc.custom_are_you_registered_as_msme=='No'", - "description": "We declare that our entity has not been registered as MSME as on date of declaration. If our Company registers as MSME in future, the details of the same will be shared with onboarding company. Until the information is shared with onboarding company, our entity does not hold onboarding company as responsible for any issues related to MSME. ", - "fieldname": "custom_declaration_incase_msme_not_applicable", - "fieldtype": "Check", - "insert_after": "custom_attach_msme_certificate", - "label": "Declaration incase MSME not applicable", - "mandatory_depends_on": "eval:doc.custom_are_you_registered_as_msme=='No'", - "module": "Buying" - }, - { - "fieldname": "custom_column_break_rt84j", - "fieldtype": "Column Break", - "insert_after": "custom_declaration_incase_msme_not_applicable", - "label": null, - "module": "Buying" - }, - { - "depends_on": "eval:doc.entity_type=='Public limited Company' || doc.entity_type=='Private limited Company' || doc.entity_type=='Joint venture Company' || doc.entity_type=='One person Company' || doc.custom_entity_type=='Section 8 Company'|| doc.custom_entity_type=='Limited Liability Partnership'", - "fieldname": "custom_corporatelimited_liability_identification_no_cinllin", - "fieldtype": "Data", - "insert_after": "custom_column_break_rt84j", - "label": "Corporate/Limited Liability Identification No. (CIN/LLIN)", - "module": "Buying" - }, - { - "depends_on": "eval:doc.entity_type=='Public limited Company' || doc.entity_type=='Private limited Company' || doc.entity_type=='Joint venture Company' || doc.custom_entity_type=='One person Company' || doc.custom_entity_type=='Section 8 Company'|| doc.entity_type=='Limited Liability Partnership'", - "fieldname": "custom_attach_certificate_of_incorporation", - "fieldtype": "Attach", - "insert_after": "custom_corporatelimited_liability_identification_no_cinllin", - "label": "Attach Certificate of Incorporation", - "module": "Buying" - }, - { - "fieldname": "custom_attachment_if_any", - "fieldtype": "Section Break", - "insert_after": "custom_attach_certificate_of_incorporation", - "label": "Attachment If Any", - "module": "Buying" - }, - { - "fieldname": "custom_attach_memorandum_of_association", - "fieldtype": "Attach", - "insert_after": "custom_attachment_if_any", - "label": "Attach Memorandum of Association", - "module": "Buying" - }, - { - "fieldname": "custom_attach_last_3_years_annual_report", - "fieldtype": "Attach", - "insert_after": "custom_attach_memorandum_of_association", - "label": "Attach Last 3 years Annual Report", - "module": "Buying" - }, - { - "fieldname": "custom_column_break_tx2qa", - "fieldtype": "Column Break", - "insert_after": "custom_attach_last_3_years_annual_report", - "label": null, - "module": "Buying" - }, - { - "fieldname": "custom_partnership_deed_incase_of_firms", - "fieldtype": "Data", - "insert_after": "custom_column_break_tx2qa", - "label": "Partnership Deed (Incase of Firms)", - "module": "Buying", - "translatable": 1 - }, - { - "fieldname": "custom_attach_article_of_association", - "fieldtype": "Attach", - "insert_after": "custom_partnership_deed_incase_of_firms", - "label": "Attach Article of Association", - "module": "Buying" - }, - { - "fieldname":"custom_section_break_ku0n6", - "insert_after":"custom_i_agree", - "fieldtype":"Section Break", - "module": "Buying" - }, - { - "fieldname":"custom_column_break_pcdjo", - "insert_after":"custom_tax_identification_number_tin", - "fieldtype":"Column Break", - "module": "Buying" - }, - { - "fieldname":"custom_column_break_akfv6", - "insert_after":"custom_name", - "fieldtype":"Column Break", - "module": "Buying" - }, - { - "fieldname":"custom_column_break_jblaw", - "insert_after":"custom_attach_last_3_years_annual_report", - "fieldtype":"Column Break", - "module": "Buying" - }, - { - "fieldname":"custom_column_break_y4dxl", - "insert_after":"custom_declaration_incase_msme_not_applicable", - "fieldtype":"Column Break", - "module": "Buying" - }, - { - "fieldname":"custom_column_break_2t9bl", - "insert_after":"custom_form_10f_generated_on_indian_income_tax_portal", - "fieldtype":"Column Break", - "module": "Buying" - }, - { - "fieldname":"custom_column_break_omthn", - "insert_after":"custom_employee_strength_slab", - "fieldtype":"Column Break", - "module": "Buying" - }, - { - "fieldname":"custom_section_break_4upzr", - "insert_after":"custom_brand_name_trademark", - "fieldtype":"Section Break", - "module": "Buying" - } - ] -} \ No newline at end of file diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json index 57d1436f766f..d751e96ea938 100644 --- a/erpnext/buying/doctype/supplier/supplier.json +++ b/erpnext/buying/doctype/supplier/supplier.json @@ -1,554 +1,554 @@ { - "actions": [], - "allow_events_in_timeline": 1, - "allow_import": 1, - "allow_rename": 1, - "autoname": "naming_series:", - "creation": "2013-01-10 16:34:11", - "description": "Supplier of Goods or Services.", - "doctype": "DocType", - "document_type": "Setup", - "engine": "InnoDB", - "field_order": [ - "naming_series", - "supplier_name", - "country", - "column_break0", - "supplier_group", - "supplier_type", - "is_transporter", - "image", - "defaults_section", - "default_currency", - "default_bank_account", - "column_break_10", - "default_price_list", - "internal_supplier_section", - "is_internal_supplier", - "represents_company", - "column_break_16", - "companies", - "column_break2", - "supplier_details", - "column_break_30", - "website", - "language", - "dashboard_tab", - "tax_tab", - "tax_id", - "column_break_27", - "tax_category", - "tax_withholding_category", - "contact_and_address_tab", - "address_contacts", - "address_html", - "column_break1", - "contact_html", - "primary_address_and_contact_detail_section", - "column_break_44", - "supplier_primary_address", - "primary_address", - "column_break_mglr", - "supplier_primary_contact", - "mobile_no", - "email_id", - "accounting_tab", - "payment_terms", - "default_accounts_section", - "accounts", - "settings_tab", - "allow_purchase_invoice_creation_without_purchase_order", - "allow_purchase_invoice_creation_without_purchase_receipt", - "column_break_54", - "is_frozen", - "disabled", - "warn_rfqs", - "warn_pos", - "prevent_rfqs", - "prevent_pos", - "block_supplier_section", - "on_hold", - "hold_type", - "column_break_59", - "release_date", - "portal_users_tab", - "portal_users", - "column_break_1mqv" - ], - "fields": [ - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "SUP-.YYYY.-", - "set_only_once": 1 - }, - { - "bold": 1, - "fieldname": "supplier_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Supplier Name", - "no_copy": 1, - "oldfieldname": "supplier_name", - "oldfieldtype": "Data", - "reqd": 1 - }, - { - "fieldname": "country", - "fieldtype": "Link", - "label": "Country", - "options": "Country" - }, - { - "fieldname": "default_bank_account", - "fieldtype": "Link", - "label": "Default Company Bank Account", - "options": "Bank Account" - }, - { - "fieldname": "tax_id", - "fieldtype": "Data", - "label": "Tax ID" - }, - { - "fieldname": "tax_category", - "fieldtype": "Link", - "label": "Tax Category", - "options": "Tax Category" - }, - { - "fieldname": "tax_withholding_category", - "fieldtype": "Link", - "label": "Tax Withholding Category", - "options": "Tax Withholding Category" - }, - { - "default": "0", - "fieldname": "is_transporter", - "fieldtype": "Check", - "label": "Is Transporter" - }, - { - "default": "0", - "fieldname": "is_internal_supplier", - "fieldtype": "Check", - "label": "Is Internal Supplier" - }, - { - "depends_on": "is_internal_supplier", - "fieldname": "represents_company", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Represents Company", - "options": "Company" - }, - { - "fieldname": "image", - "fieldtype": "Attach Image", - "hidden": 1, - "label": "Image", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "column_break0", - "fieldtype": "Column Break", - "width": "50%" - }, - { - "fieldname": "supplier_group", - "fieldtype": "Link", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Supplier Group", - "oldfieldname": "supplier_type", - "oldfieldtype": "Link", - "options": "Supplier Group" - }, - { - "default": "Company", - "fieldname": "supplier_type", - "fieldtype": "Select", - "label": "Supplier Type", - "options": "Company\nIndividual\nPartnership", - "reqd": 1 - }, - { - "fieldname": "language", - "fieldtype": "Link", - "label": "Print Language", - "options": "Language" - }, - { - "bold": 1, - "default": "0", - "fieldname": "disabled", - "fieldtype": "Check", - "label": "Disabled" - }, - { - "default": "0", - "fieldname": "warn_rfqs", - "fieldtype": "Check", - "hidden": 1, - "label": "Warn RFQs", - "read_only": 1 - }, - { - "default": "0", - "fieldname": "warn_pos", - "fieldtype": "Check", - "hidden": 1, - "label": "Warn POs", - "read_only": 1 - }, - { - "default": "0", - "fieldname": "prevent_rfqs", - "fieldtype": "Check", - "hidden": 1, - "label": "Prevent RFQs", - "read_only": 1 - }, - { - "default": "0", - "fieldname": "prevent_pos", - "fieldtype": "Check", - "hidden": 1, - "label": "Prevent POs", - "read_only": 1 - }, - { - "depends_on": "represents_company", - "fieldname": "companies", - "fieldtype": "Table", - "label": "Allowed To Transact With", - "options": "Allowed To Transact With" - }, - { - "fieldname": "default_currency", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Billing Currency", - "no_copy": 1, - "options": "Currency" - }, - { - "fieldname": "column_break_10", - "fieldtype": "Column Break" - }, - { - "fieldname": "default_price_list", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Price List", - "options": "Price List" - }, - { - "fieldname": "payment_terms", - "fieldtype": "Link", - "label": "Default Payment Terms Template", - "options": "Payment Terms Template" - }, - { - "default": "0", - "fieldname": "on_hold", - "fieldtype": "Check", - "label": "Block Supplier" - }, - { - "depends_on": "eval:doc.on_hold", - "fieldname": "hold_type", - "fieldtype": "Select", - "label": "Hold Type", - "options": "\nAll\nInvoices\nPayments" - }, - { - "depends_on": "eval:doc.on_hold", - "description": "Leave blank if the Supplier is blocked indefinitely", - "fieldname": "release_date", - "fieldtype": "Date", - "label": "Release Date" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "address_contacts", - "fieldtype": "Section Break", - "label": "Address and Contacts", - "oldfieldtype": "Column Break", - "options": "fa fa-map-marker" - }, - { - "fieldname": "address_html", - "fieldtype": "HTML", - "label": "Address HTML", - "read_only": 1 - }, - { - "fieldname": "column_break1", - "fieldtype": "Column Break", - "width": "50%" - }, - { - "fieldname": "contact_html", - "fieldtype": "HTML", - "label": "Contact HTML", - "read_only": 1 - }, - { - "description": "Mention if non-standard payable account", - "fieldname": "accounts", - "fieldtype": "Table", - "label": "Accounts", - "options": "Party Account" - }, - { - "collapsible": 1, - "collapsible_depends_on": "supplier_details", - "fieldname": "column_break2", - "fieldtype": "Section Break", - "label": "More Information", - "width": "50%" - }, - { - "fieldname": "website", - "fieldtype": "Data", - "label": "Website", - "oldfieldname": "website", - "oldfieldtype": "Data" - }, - { - "description": "Statutory info and other general information about your Supplier", - "fieldname": "supplier_details", - "fieldtype": "Text", - "label": "Supplier Details", - "oldfieldname": "supplier_details", - "oldfieldtype": "Code" - }, - { - "fieldname": "column_break_30", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "is_frozen", - "fieldtype": "Check", - "label": "Is Frozen" - }, - { - "default": "0", - "fieldname": "allow_purchase_invoice_creation_without_purchase_order", - "fieldtype": "Check", - "label": "Allow Purchase Invoice Creation Without Purchase Order" - }, - { - "default": "0", - "fieldname": "allow_purchase_invoice_creation_without_purchase_receipt", - "fieldtype": "Check", - "label": "Allow Purchase Invoice Creation Without Purchase Receipt" - }, - { - "fieldname": "primary_address_and_contact_detail_section", - "fieldtype": "Section Break", - "label": "Primary Address and Contact" - }, - { - "description": "Reselect, if the chosen contact is edited after save", - "fieldname": "supplier_primary_contact", - "fieldtype": "Link", - "label": "Supplier Primary Contact", - "options": "Contact" - }, - { - "fetch_from": "supplier_primary_contact.mobile_no", - "fieldname": "mobile_no", - "fieldtype": "Read Only", - "label": "Mobile No" - }, - { - "fetch_from": "supplier_primary_contact.email_id", - "fieldname": "email_id", - "fieldtype": "Read Only", - "label": "Email Id" - }, - { - "fieldname": "column_break_44", - "fieldtype": "Column Break" - }, - { - "fieldname": "primary_address", - "fieldtype": "Text", - "label": "Primary Address", - "read_only": 1 - }, - { - "description": "Reselect, if the chosen address is edited after save", - "fieldname": "supplier_primary_address", - "fieldtype": "Link", - "label": "Supplier Primary Address", - "options": "Address" - }, - { - "fieldname": "dashboard_tab", - "fieldtype": "Tab Break", - "label": "Dashboard", - "show_dashboard": 1 - }, - { - "fieldname": "settings_tab", - "fieldtype": "Tab Break", - "label": "Settings" - }, - { - "fieldname": "contact_and_address_tab", - "fieldtype": "Tab Break", - "label": "Address & Contact" - }, - { - "fieldname": "accounting_tab", - "fieldtype": "Tab Break", - "label": "Accounting" - }, - { - "fieldname": "defaults_section", - "fieldtype": "Section Break", - "label": "Defaults" - }, - { - "fieldname": "tax_tab", - "fieldtype": "Tab Break", - "label": "Tax" - }, - { - "collapsible": 1, - "fieldname": "internal_supplier_section", - "fieldtype": "Section Break", - "label": "Internal Supplier" - }, - { - "fieldname": "column_break_16", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_27", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_54", - "fieldtype": "Column Break" - }, - { - "fieldname": "block_supplier_section", - "fieldtype": "Section Break", - "label": "Block Supplier" - }, - { - "fieldname": "column_break_59", - "fieldtype": "Column Break" - }, - { - "fieldname": "default_accounts_section", - "fieldtype": "Section Break", - "label": "Default Accounts" - }, - { - "fieldname": "portal_users_tab", - "fieldtype": "Tab Break", - "label": "Portal Users" - }, - { - "fieldname": "portal_users", - "fieldtype": "Table", - "label": "Supplier Portal Users", - "options": "Portal User" - }, - { - "fieldname": "column_break_1mqv", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_mglr", - "fieldtype": "Column Break" - } - ], - "icon": "fa fa-user", - "idx": 370, - "image_field": "image", - "links": [ - { - "group": "Allowed Items", - "link_doctype": "Party Specific Item", - "link_fieldname": "party" - } - ], - "modified": "2025-01-03 18:08:09.387046", - "modified_by": "Administrator", - "module": "Buying", - "name": "Supplier", - "naming_rule": "By \"Naming Series\" field", - "owner": "Administrator", - "permissions": [ - { - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Purchase User" - }, - { - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Purchase Manager", - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "import": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Purchase Master Manager", - "share": 1, - "write": 1 - }, - { - "read": 1, - "role": "Stock User" - }, - { - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock Manager" - }, - { - "read": 1, - "role": "Accounts User" - }, - { - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts Manager" - } - ], - "quick_entry": 1, - "search_fields": "supplier_group", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "ASC", - "states": [], - "title_field": "supplier_name", - "track_changes": 1 -} \ No newline at end of file + "actions": [], + "allow_events_in_timeline": 1, + "allow_import": 1, + "allow_rename": 1, + "autoname": "naming_series:", + "creation": "2013-01-10 16:34:11", + "description": "Supplier of Goods or Services.", + "doctype": "DocType", + "document_type": "Setup", + "engine": "InnoDB", + "field_order": [ + "naming_series", + "supplier_name", + "country", + "column_break0", + "supplier_group", + "supplier_type", + "is_transporter", + "image", + "defaults_section", + "default_currency", + "default_bank_account", + "column_break_10", + "default_price_list", + "internal_supplier_section", + "is_internal_supplier", + "represents_company", + "column_break_16", + "companies", + "column_break2", + "supplier_details", + "column_break_30", + "website", + "language", + "dashboard_tab", + "tax_tab", + "tax_id", + "column_break_27", + "tax_category", + "tax_withholding_category", + "contact_and_address_tab", + "address_contacts", + "address_html", + "column_break1", + "contact_html", + "primary_address_and_contact_detail_section", + "column_break_44", + "supplier_primary_address", + "primary_address", + "column_break_mglr", + "supplier_primary_contact", + "mobile_no", + "email_id", + "accounting_tab", + "payment_terms", + "default_accounts_section", + "accounts", + "settings_tab", + "allow_purchase_invoice_creation_without_purchase_order", + "allow_purchase_invoice_creation_without_purchase_receipt", + "column_break_54", + "is_frozen", + "disabled", + "warn_rfqs", + "warn_pos", + "prevent_rfqs", + "prevent_pos", + "block_supplier_section", + "on_hold", + "hold_type", + "column_break_59", + "release_date", + "portal_users_tab", + "portal_users", + "column_break_1mqv" + ], + "fields": [ + { + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Series", + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "SUP-.YYYY.-", + "set_only_once": 1 + }, + { + "bold": 1, + "fieldname": "supplier_name", + "fieldtype": "Data", + "in_global_search": 1, + "label": "Supplier Name", + "no_copy": 1, + "oldfieldname": "supplier_name", + "oldfieldtype": "Data", + "reqd": 1 + }, + { + "fieldname": "country", + "fieldtype": "Link", + "label": "Country", + "options": "Country" + }, + { + "fieldname": "default_bank_account", + "fieldtype": "Link", + "label": "Default Company Bank Account", + "options": "Bank Account" + }, + { + "fieldname": "tax_id", + "fieldtype": "Data", + "label": "Tax ID" + }, + { + "fieldname": "tax_category", + "fieldtype": "Link", + "label": "Tax Category", + "options": "Tax Category" + }, + { + "fieldname": "tax_withholding_category", + "fieldtype": "Link", + "label": "Tax Withholding Category", + "options": "Tax Withholding Category" + }, + { + "default": "0", + "fieldname": "is_transporter", + "fieldtype": "Check", + "label": "Is Transporter" + }, + { + "default": "0", + "fieldname": "is_internal_supplier", + "fieldtype": "Check", + "label": "Is Internal Supplier" + }, + { + "depends_on": "is_internal_supplier", + "fieldname": "represents_company", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Represents Company", + "options": "Company" + }, + { + "fieldname": "image", + "fieldtype": "Attach Image", + "hidden": 1, + "label": "Image", + "no_copy": 1, + "print_hide": 1 + }, + { + "fieldname": "column_break0", + "fieldtype": "Column Break", + "width": "50%" + }, + { + "fieldname": "supplier_group", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Supplier Group", + "oldfieldname": "supplier_type", + "oldfieldtype": "Link", + "options": "Supplier Group" + }, + { + "default": "Company", + "fieldname": "supplier_type", + "fieldtype": "Select", + "label": "Supplier Type", + "options": "Company\nIndividual\nPartnership", + "reqd": 1 + }, + { + "fieldname": "language", + "fieldtype": "Link", + "label": "Print Language", + "options": "Language" + }, + { + "bold": 1, + "default": "0", + "fieldname": "disabled", + "fieldtype": "Check", + "label": "Disabled" + }, + { + "default": "0", + "fieldname": "warn_rfqs", + "fieldtype": "Check", + "hidden": 1, + "label": "Warn RFQs", + "read_only": 1 + }, + { + "default": "0", + "fieldname": "warn_pos", + "fieldtype": "Check", + "hidden": 1, + "label": "Warn POs", + "read_only": 1 + }, + { + "default": "0", + "fieldname": "prevent_rfqs", + "fieldtype": "Check", + "hidden": 1, + "label": "Prevent RFQs", + "read_only": 1 + }, + { + "default": "0", + "fieldname": "prevent_pos", + "fieldtype": "Check", + "hidden": 1, + "label": "Prevent POs", + "read_only": 1 + }, + { + "depends_on": "represents_company", + "fieldname": "companies", + "fieldtype": "Table", + "label": "Allowed To Transact With", + "options": "Allowed To Transact With" + }, + { + "fieldname": "default_currency", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Billing Currency", + "no_copy": 1, + "options": "Currency" + }, + { + "fieldname": "column_break_10", + "fieldtype": "Column Break" + }, + { + "fieldname": "default_price_list", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Price List", + "options": "Price List" + }, + { + "fieldname": "payment_terms", + "fieldtype": "Link", + "label": "Default Payment Terms Template", + "options": "Payment Terms Template" + }, + { + "default": "0", + "fieldname": "on_hold", + "fieldtype": "Check", + "label": "Block Supplier" + }, + { + "depends_on": "eval:doc.on_hold", + "fieldname": "hold_type", + "fieldtype": "Select", + "label": "Hold Type", + "options": "\nAll\nInvoices\nPayments" + }, + { + "depends_on": "eval:doc.on_hold", + "description": "Leave blank if the Supplier is blocked indefinitely", + "fieldname": "release_date", + "fieldtype": "Date", + "label": "Release Date" + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "address_contacts", + "fieldtype": "Section Break", + "label": "Address and Contacts", + "oldfieldtype": "Column Break", + "options": "fa fa-map-marker" + }, + { + "fieldname": "address_html", + "fieldtype": "HTML", + "label": "Address HTML", + "read_only": 1 + }, + { + "fieldname": "column_break1", + "fieldtype": "Column Break", + "width": "50%" + }, + { + "fieldname": "contact_html", + "fieldtype": "HTML", + "label": "Contact HTML", + "read_only": 1 + }, + { + "description": "Mention if non-standard payable account", + "fieldname": "accounts", + "fieldtype": "Table", + "label": "Accounts", + "options": "Party Account" + }, + { + "collapsible": 1, + "collapsible_depends_on": "supplier_details", + "fieldname": "column_break2", + "fieldtype": "Section Break", + "label": "More Information", + "width": "50%" + }, + { + "fieldname": "website", + "fieldtype": "Data", + "label": "Website", + "oldfieldname": "website", + "oldfieldtype": "Data" + }, + { + "description": "Statutory info and other general information about your Supplier", + "fieldname": "supplier_details", + "fieldtype": "Text", + "label": "Supplier Details", + "oldfieldname": "supplier_details", + "oldfieldtype": "Code" + }, + { + "fieldname": "column_break_30", + "fieldtype": "Column Break" + }, + { + "default": "0", + "fieldname": "is_frozen", + "fieldtype": "Check", + "label": "Is Frozen" + }, + { + "default": "0", + "fieldname": "allow_purchase_invoice_creation_without_purchase_order", + "fieldtype": "Check", + "label": "Allow Purchase Invoice Creation Without Purchase Order" + }, + { + "default": "0", + "fieldname": "allow_purchase_invoice_creation_without_purchase_receipt", + "fieldtype": "Check", + "label": "Allow Purchase Invoice Creation Without Purchase Receipt" + }, + { + "fieldname": "primary_address_and_contact_detail_section", + "fieldtype": "Section Break", + "label": "Primary Address and Contact" + }, + { + "description": "Reselect, if the chosen contact is edited after save", + "fieldname": "supplier_primary_contact", + "fieldtype": "Link", + "label": "Supplier Primary Contact", + "options": "Contact" + }, + { + "fetch_from": "supplier_primary_contact.mobile_no", + "fieldname": "mobile_no", + "fieldtype": "Read Only", + "label": "Mobile No" + }, + { + "fetch_from": "supplier_primary_contact.email_id", + "fieldname": "email_id", + "fieldtype": "Read Only", + "label": "Email Id" + }, + { + "fieldname": "column_break_44", + "fieldtype": "Column Break" + }, + { + "fieldname": "primary_address", + "fieldtype": "Text", + "label": "Primary Address", + "read_only": 1 + }, + { + "description": "Reselect, if the chosen address is edited after save", + "fieldname": "supplier_primary_address", + "fieldtype": "Link", + "label": "Supplier Primary Address", + "options": "Address" + }, + { + "fieldname": "dashboard_tab", + "fieldtype": "Tab Break", + "label": "Dashboard", + "show_dashboard": 1 + }, + { + "fieldname": "settings_tab", + "fieldtype": "Tab Break", + "label": "Settings" + }, + { + "fieldname": "contact_and_address_tab", + "fieldtype": "Tab Break", + "label": "Address & Contact" + }, + { + "fieldname": "accounting_tab", + "fieldtype": "Tab Break", + "label": "Accounting" + }, + { + "fieldname": "defaults_section", + "fieldtype": "Section Break", + "label": "Defaults" + }, + { + "fieldname": "tax_tab", + "fieldtype": "Tab Break", + "label": "Tax" + }, + { + "collapsible": 1, + "fieldname": "internal_supplier_section", + "fieldtype": "Section Break", + "label": "Internal Supplier" + }, + { + "fieldname": "column_break_16", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_27", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_54", + "fieldtype": "Column Break" + }, + { + "fieldname": "block_supplier_section", + "fieldtype": "Section Break", + "label": "Block Supplier" + }, + { + "fieldname": "column_break_59", + "fieldtype": "Column Break" + }, + { + "fieldname": "default_accounts_section", + "fieldtype": "Section Break", + "label": "Default Accounts" + }, + { + "fieldname": "portal_users_tab", + "fieldtype": "Tab Break", + "label": "Portal Users" + }, + { + "fieldname": "portal_users", + "fieldtype": "Table", + "label": "Supplier Portal Users", + "options": "Portal User" + }, + { + "fieldname": "column_break_1mqv", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_mglr", + "fieldtype": "Column Break" + } + ], + "icon": "fa fa-user", + "idx": 370, + "image_field": "image", + "links": [ + { + "group": "Allowed Items", + "link_doctype": "Party Specific Item", + "link_fieldname": "party" + } + ], + "modified": "2025-01-03 18:08:09.387046", + "modified_by": "Administrator", + "module": "Buying", + "name": "Supplier", + "naming_rule": "By \"Naming Series\" field", + "owner": "Administrator", + "permissions": [ + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Purchase User" + }, + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Purchase Manager", + "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "import": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Purchase Master Manager", + "share": 1, + "write": 1 + }, + { + "read": 1, + "role": "Stock User" + }, + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock Manager" + }, + { + "read": 1, + "role": "Accounts User" + }, + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager" + } + ], + "quick_entry": 1, + "search_fields": "supplier_group", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "ASC", + "states": [], + "title_field": "supplier_name", + "track_changes": 1 + } \ No newline at end of file diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 09d8e790bae0..3b895ad7ad65 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -654,7 +654,7 @@ fields_for_group_similar_items = ["qty", "amount"] -after_migrate = ["erpnext.accounts.install.after_migrate","erpnext.setup.install.after_migrate"] +after_migrate = ["erpnext.accounts.install.after_migrate"] fixtures =[ diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index fe28a7720b86..00f959ad7843 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -39,8 +39,8 @@ def after_install(): update_roles() frappe.db.commit() -def after_migrate(): - generate_custom_fields() +# def after_migrate(): +# generate_custom_fields() def check_setup_wizard_not_completed(): @@ -253,14 +253,14 @@ def create_default_role_profiles(): role_profile.insert(ignore_permissions=True) -def generate_custom_fields(): - CUSTOM_FIELDS = {} - print("Creating/Updating Custom Fields For Erpnext....") - path = os.path.join(os.path.dirname(__file__), "../buying/custom_fields") - for file in os.listdir(path): - with open(os.path.join(path, file), "r") as f: - CUSTOM_FIELDS.update(json.load(f)) - make_custom_fields(CUSTOM_FIELDS) +# def generate_custom_fields(): +# CUSTOM_FIELDS = {} +# print("Creating/Updating Custom Fields For Erpnext....") +# path = os.path.join(os.path.dirname(__file__), "../buying/custom_fields") +# for file in os.listdir(path): +# with open(os.path.join(path, file), "r") as f: +# CUSTOM_FIELDS.update(json.load(f)) +# make_custom_fields(CUSTOM_FIELDS) DEFAULT_ROLE_PROFILES = {