diff --git a/india_compliance/gst_india/doctype/gst_inward_supply/gst_inward_supply.json b/india_compliance/gst_india/doctype/gst_inward_supply/gst_inward_supply.json index d038c74ca..9fdeaa599 100644 --- a/india_compliance/gst_india/doctype/gst_inward_supply/gst_inward_supply.json +++ b/india_compliance/gst_india/doctype/gst_inward_supply/gst_inward_supply.json @@ -254,7 +254,7 @@ "fieldtype": "Select", "in_standard_filter": 1, "label": "Action", - "options": "No Action\nAccept My Values\nAccept Supplier Values\nIgnore\nPending" + "options": "No Action\nAccept\nIgnore\nPending" }, { "fieldname": "link_doctype", diff --git a/india_compliance/gst_india/doctype/purchase_reconciliation_tool/purchase_reconciliation_tool.js b/india_compliance/gst_india/doctype/purchase_reconciliation_tool/purchase_reconciliation_tool.js index 92fd0e000..b23583393 100644 --- a/india_compliance/gst_india/doctype/purchase_reconciliation_tool/purchase_reconciliation_tool.js +++ b/india_compliance/gst_india/doctype/purchase_reconciliation_tool/purchase_reconciliation_tool.js @@ -107,7 +107,7 @@ frappe.ui.form.on("Purchase Reconciliation Tool", { ); frm.add_custom_button(__("dropdown-divider"), () => {}, __("Actions")); } - ["Accept My Values", "Accept Supplier Values", "Pending", "Ignore"].forEach( + ["Accept", "Pending", "Ignore"].forEach( action => frm.add_custom_button( __(action), @@ -346,8 +346,7 @@ class PurchaseReconciliationTool { fieldtype: "Select", options: [ "No Action", - "Accept My Values", - "Accept Supplier Values", + "Accept", "Ignore", "Pending", ], @@ -976,8 +975,7 @@ class DetailViewDialog { else actions.push( "Unlink", - "Accept My Values", - "Accept Supplier Values", + "Accept", "Pending" ); @@ -1027,8 +1025,7 @@ class DetailViewDialog { if (action == "Ignore") return "btn-secondary"; if (action == "Create") return "btn-primary not-grey"; if (action == "Link") return "btn-primary not-grey btn-link disabled"; - if (action == "Accept My Values") return "btn-primary not-grey"; - if (action == "Accept Supplier Values") return "btn-primary not-grey"; + if (action == "Accept") return "btn-primary not-grey"; } toggle_link_btn(disabled) { diff --git a/india_compliance/gst_india/doctype/purchase_reconciliation_tool/purchase_reconciliation_tool.py b/india_compliance/gst_india/doctype/purchase_reconciliation_tool/purchase_reconciliation_tool.py index fa9291611..3e420fefd 100644 --- a/india_compliance/gst_india/doctype/purchase_reconciliation_tool/purchase_reconciliation_tool.py +++ b/india_compliance/gst_india/doctype/purchase_reconciliation_tool/purchase_reconciliation_tool.py @@ -38,8 +38,7 @@ ) STATUS_MAP = { - "Accept My Values": "Reconciled", - "Accept Supplier Values": "Reconciled", + "Accept": "Reconciled", "Pending": "Unreconciled", "Ignore": "Ignored", } diff --git a/india_compliance/patches.txt b/india_compliance/patches.txt index eb89d491a..0dbcf136c 100644 --- a/india_compliance/patches.txt +++ b/india_compliance/patches.txt @@ -60,3 +60,4 @@ india_compliance.patches.v14.delete_not_generated_gstr_import_log india_compliance.patches.v14.enable_sales_through_ecommerce_operator execute:from india_compliance.gst_india.setup import set_default_print_settings; set_default_print_settings() india_compliance.patches.v15.migrate_gstr1_log_to_returns_log +india_compliance.patches.v15.update_action_for_gst_inward_supply \ No newline at end of file diff --git a/india_compliance/patches/v15/update_action_for_gst_inward_supply.py b/india_compliance/patches/v15/update_action_for_gst_inward_supply.py new file mode 100644 index 000000000..f5928ea0f --- /dev/null +++ b/india_compliance/patches/v15/update_action_for_gst_inward_supply.py @@ -0,0 +1,12 @@ +import frappe + + +def execute(): + docs = frappe.get_all( + "GST Inward Supply", + filters={"action": ["in", ["Accept My Values", "Accept Supplier Values"]]}, + pluck="name", + ) + + for doc in docs: + frappe.db.set_value("GST Inward Supply", doc, "action", "Accept")