Merge pull request #35328 from rohitwaghchaure/fixed-create-reposting-entry-for-cancelled-documents
fix: force to do reposting for cancelled document
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index 5c9168b..ab7884d 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -303,7 +303,7 @@
apply_tds(frm) {
var me = this;
-
+ me.frm.set_value("tax_withheld_vouchers", []);
if (!me.frm.doc.apply_tds) {
me.frm.set_value("tax_withholding_category", '');
me.frm.set_df_property("tax_withholding_category", "hidden", 1);
diff --git a/erpnext/setup/doctype/employee/employee.py b/erpnext/setup/doctype/employee/employee.py
index ece5a7d..566392c 100755
--- a/erpnext/setup/doctype/employee/employee.py
+++ b/erpnext/setup/doctype/employee/employee.py
@@ -257,7 +257,9 @@
def get_holiday_list_for_employee(employee, raise_exception=True):
if employee:
- holiday_list, company = frappe.db.get_value("Employee", employee, ["holiday_list", "company"])
+ holiday_list, company = frappe.get_cached_value(
+ "Employee", employee, ["holiday_list", "company"]
+ )
else:
holiday_list = ""
company = frappe.db.get_single_value("Global Defaults", "default_company")
diff --git a/erpnext/setup/doctype/holiday_list/holiday_list.py b/erpnext/setup/doctype/holiday_list/holiday_list.py
index fad827a..84d0d35 100644
--- a/erpnext/setup/doctype/holiday_list/holiday_list.py
+++ b/erpnext/setup/doctype/holiday_list/holiday_list.py
@@ -115,6 +115,8 @@
if date is None:
date = today()
if holiday_list:
- return bool(frappe.get_all("Holiday List", dict(name=holiday_list, holiday_date=date)))
+ return bool(
+ frappe.db.exists("Holiday", {"parent": holiday_list, "holiday_date": date}, cache=True)
+ )
else:
return False
diff --git a/erpnext/setup/module_onboarding/home/home.json b/erpnext/setup/module_onboarding/home/home.json
index f02fc45..516f122 100644
--- a/erpnext/setup/module_onboarding/home/home.json
+++ b/erpnext/setup/module_onboarding/home/home.json
@@ -22,25 +22,19 @@
"creation": "2021-11-22 12:19:15.888642",
"docstatus": 0,
"doctype": "Module Onboarding",
- "documentation_url": "https://docs.erpnext.com/docs/v13/user/manual/en/setting-up/company-setup",
+ "documentation_url": "https://docs.erpnext.com/docs/v14/user/manual/en/setting-up/company-setup",
"idx": 0,
"is_complete": 0,
- "modified": "2022-06-07 14:31:00.575193",
+ "modified": "2023-05-16 13:13:24.043792",
"modified_by": "Administrator",
"module": "Setup",
"name": "Home",
"owner": "Administrator",
"steps": [
{
- "step": "Company Set Up"
- },
- {
"step": "Navigation Help"
},
{
- "step": "Data import"
- },
- {
"step": "Create an Item"
},
{
@@ -51,12 +45,9 @@
},
{
"step": "Create a Quotation"
- },
- {
- "step": "Letterhead"
}
],
- "subtitle": "Company, Item, Customer, Supplier, Navigation Help, Data Import, Letter Head, Quotation",
- "success_message": "Masters are all set up!",
- "title": "Let's Set Up Some Masters"
+ "subtitle": "Item, Customer, Supplier, Navigation Help and Quotation",
+ "success_message": "You're ready to start your journey with ERPNext",
+ "title": "Let's begin your journey with ERPNext"
}
\ No newline at end of file
diff --git a/erpnext/setup/onboarding_step/company_set_up/company_set_up.json b/erpnext/setup/onboarding_step/company_set_up/company_set_up.json
index 6f65832..fae2de0 100644
--- a/erpnext/setup/onboarding_step/company_set_up/company_set_up.json
+++ b/erpnext/setup/onboarding_step/company_set_up/company_set_up.json
@@ -5,11 +5,11 @@
"description": "# Set Up a Company\n\nA company is a legal entity for which you will set up your books of account and create accounting transactions. In ERPNext, you can create multiple companies, and establish relationships (group/subsidiary) among them.\n\nWithin the company master, you can capture various default accounts for that Company and set crucial settings related to the accounting methodology followed for a company.\n",
"docstatus": 0,
"doctype": "Onboarding Step",
- "idx": 0,
+ "idx": 1,
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2021-12-15 14:22:18.317423",
+ "modified": "2023-05-15 09:18:42.895537",
"modified_by": "Administrator",
"name": "Company Set Up",
"owner": "Administrator",
diff --git a/erpnext/setup/onboarding_step/create_a_customer/create_a_customer.json b/erpnext/setup/onboarding_step/create_a_customer/create_a_customer.json
index f74d745..e1a8f90 100644
--- a/erpnext/setup/onboarding_step/create_a_customer/create_a_customer.json
+++ b/erpnext/setup/onboarding_step/create_a_customer/create_a_customer.json
@@ -5,17 +5,17 @@
"description": "# Create a Customer\n\nThe Customer master is at the heart of your sales transactions. Customers are linked in Quotations, Sales Orders, Invoices, and Payments. Customers can be either numbered or identified by name (you would typically do this based on the number of customers you have).\n\nThrough Customer\u2019s master, you can effectively track essentials like:\n - Customer\u2019s multiple address and contacts\n - Account Receivables\n - Credit Limit and Credit Period\n",
"docstatus": 0,
"doctype": "Onboarding Step",
- "idx": 0,
+ "idx": 1,
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2021-12-15 14:20:31.197564",
+ "modified": "2023-05-16 12:54:54.112364",
"modified_by": "Administrator",
"name": "Create a Customer",
"owner": "Administrator",
"reference_document": "Customer",
"show_form_tour": 0,
"show_full_form": 0,
- "title": "Manage Customers",
+ "title": "Create a Customer",
"validate_action": 1
}
\ No newline at end of file
diff --git a/erpnext/setup/onboarding_step/create_a_quotation/create_a_quotation.json b/erpnext/setup/onboarding_step/create_a_quotation/create_a_quotation.json
index 8bdb621..92b45b4 100644
--- a/erpnext/setup/onboarding_step/create_a_quotation/create_a_quotation.json
+++ b/erpnext/setup/onboarding_step/create_a_quotation/create_a_quotation.json
@@ -5,11 +5,11 @@
"description": "# Create a Quotation\n\nLet\u2019s get started with business transactions by creating your first Quotation. You can create a Quotation for an existing customer or a prospect. It will be an approved document, with items you sell and the proposed price + taxes applied. After completing the instructions, you will get a Quotation in a ready to share print format.",
"docstatus": 0,
"doctype": "Onboarding Step",
- "idx": 0,
+ "idx": 1,
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2021-12-15 14:21:31.675330",
+ "modified": "2023-05-15 09:18:42.984170",
"modified_by": "Administrator",
"name": "Create a Quotation",
"owner": "Administrator",
diff --git a/erpnext/setup/onboarding_step/create_a_supplier/create_a_supplier.json b/erpnext/setup/onboarding_step/create_a_supplier/create_a_supplier.json
index 9574141..ef493fe 100644
--- a/erpnext/setup/onboarding_step/create_a_supplier/create_a_supplier.json
+++ b/erpnext/setup/onboarding_step/create_a_supplier/create_a_supplier.json
@@ -5,17 +5,17 @@
"description": "# Create a Supplier\n\nAlso known as Vendor, is a master at the center of your purchase transactions. Suppliers are linked in Request for Quotation, Purchase Orders, Receipts, and Payments. Suppliers can be either numbered or identified by name.\n\nThrough Supplier\u2019s master, you can effectively track essentials like:\n - Supplier\u2019s multiple address and contacts\n - Account Receivables\n - Credit Limit and Credit Period\n",
"docstatus": 0,
"doctype": "Onboarding Step",
- "idx": 0,
+ "idx": 1,
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2021-12-15 14:21:23.518301",
+ "modified": "2023-05-16 12:55:08.610113",
"modified_by": "Administrator",
"name": "Create a Supplier",
"owner": "Administrator",
"reference_document": "Supplier",
"show_form_tour": 0,
"show_full_form": 0,
- "title": "Manage Suppliers",
+ "title": "Create a Supplier",
"validate_action": 1
}
\ No newline at end of file
diff --git a/erpnext/setup/onboarding_step/create_an_item/create_an_item.json b/erpnext/setup/onboarding_step/create_an_item/create_an_item.json
index cd29683..15f36be 100644
--- a/erpnext/setup/onboarding_step/create_an_item/create_an_item.json
+++ b/erpnext/setup/onboarding_step/create_an_item/create_an_item.json
@@ -6,18 +6,18 @@
"docstatus": 0,
"doctype": "Onboarding Step",
"form_tour": "Item General",
- "idx": 0,
+ "idx": 1,
"intro_video_url": "",
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2021-12-15 14:19:56.297772",
+ "modified": "2023-05-16 12:56:40.355878",
"modified_by": "Administrator",
"name": "Create an Item",
"owner": "Administrator",
"reference_document": "Item",
"show_form_tour": 1,
- "show_full_form": 1,
- "title": "Manage Items",
+ "show_full_form": 0,
+ "title": "Create an Item",
"validate_action": 1
}
\ No newline at end of file
diff --git a/erpnext/setup/onboarding_step/data_import/data_import.json b/erpnext/setup/onboarding_step/data_import/data_import.json
index 4999a36..e5dd7da 100644
--- a/erpnext/setup/onboarding_step/data_import/data_import.json
+++ b/erpnext/setup/onboarding_step/data_import/data_import.json
@@ -5,11 +5,11 @@
"description": "# Import Data from Spreadsheet\n\nIn ERPNext, you can easily migrate your historical data using spreadsheets. You can use it for migrating not just masters (like Customer, Supplier, Items), but also for transactions like (outstanding invoices, opening stock and accounting entries, etc).",
"docstatus": 0,
"doctype": "Onboarding Step",
- "idx": 0,
+ "idx": 1,
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2022-06-07 14:28:51.390813",
+ "modified": "2023-05-15 09:18:42.962231",
"modified_by": "Administrator",
"name": "Data import",
"owner": "Administrator",
diff --git a/erpnext/setup/onboarding_step/letterhead/letterhead.json b/erpnext/setup/onboarding_step/letterhead/letterhead.json
index 8e1bb8c..584fd48 100644
--- a/erpnext/setup/onboarding_step/letterhead/letterhead.json
+++ b/erpnext/setup/onboarding_step/letterhead/letterhead.json
@@ -5,11 +5,11 @@
"description": "# Create a Letter Head\n\nA Letter Head contains your organization's name, logo, address, etc which appears at the header and footer portion in documents. You can learn more about Setting up Letter Head in ERPNext here.\n",
"docstatus": 0,
"doctype": "Onboarding Step",
- "idx": 0,
+ "idx": 1,
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2021-12-15 14:21:39.037742",
+ "modified": "2023-05-15 09:18:42.995184",
"modified_by": "Administrator",
"name": "Letterhead",
"owner": "Administrator",
diff --git a/erpnext/setup/onboarding_step/navigation_help/navigation_help.json b/erpnext/setup/onboarding_step/navigation_help/navigation_help.json
index cf07968..f57818b 100644
--- a/erpnext/setup/onboarding_step/navigation_help/navigation_help.json
+++ b/erpnext/setup/onboarding_step/navigation_help/navigation_help.json
@@ -2,14 +2,14 @@
"action": "Watch Video",
"action_label": "Learn about Navigation options",
"creation": "2021-11-22 12:09:52.233872",
- "description": "# Navigation in ERPNext\n\nEase of navigating and browsing around the ERPNext is one of our core strengths. In the following video, you will learn how to reach a specific feature in ERPNext via module page or awesome bar\u2019s shortcut.\n",
+ "description": "# Navigation in ERPNext\n\nEase of navigating and browsing around the ERPNext is one of our core strengths. In the following video, you will learn how to reach a specific feature in ERPNext via module page or AwesomeBar.",
"docstatus": 0,
"doctype": "Onboarding Step",
- "idx": 0,
+ "idx": 1,
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2022-06-07 14:28:00.901082",
+ "modified": "2023-05-16 12:53:25.939908",
"modified_by": "Administrator",
"name": "Navigation Help",
"owner": "Administrator",