Skip to content

Commit

Permalink
fix: use hash based naming for tax withheld vouchers child table (bac…
Browse files Browse the repository at this point in the history
…kport #33643) (#33748)

fix: use hash based naming for tax withheld vouchers child table (#33643)

(cherry picked from commit 17045f8)

Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>
  • Loading branch information
mergify[bot] and phot0n committed Jan 20, 2023
1 parent 1a33324 commit cf6d454
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"actions": [],
"autoname": "autoincrement",
"autoname": "hash",
"creation": "2022-09-13 16:18:59.404842",
"doctype": "DocType",
"editable_grid": 1,
Expand Down Expand Up @@ -36,11 +36,11 @@
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2022-09-13 23:40:41.479208",
"modified": "2023-01-13 13:40:41.479208",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Tax Withheld Vouchers",
"naming_rule": "Autoincrement",
"naming_rule": "Random",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
Expand Down
1 change: 1 addition & 0 deletions erpnext/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,4 @@ erpnext.patches.v14_0.create_incoterms_and_migrate_shipment
erpnext.patches.v14_0.setup_clear_repost_logs
erpnext.patches.v14_0.create_accounting_dimensions_for_payment_request
erpnext.patches.v14_0.update_entry_type_for_journal_entry
erpnext.patches.v14_0.change_autoname_for_tax_withheld_vouchers
12 changes: 12 additions & 0 deletions erpnext/patches/v14_0/change_autoname_for_tax_withheld_vouchers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import frappe


def execute():
if (
frappe.db.sql(
"""select data_type FROM information_schema.columns
where column_name = 'name' and table_name = 'tabTax Withheld Vouchers'"""
)[0][0]
== "bigint"
):
frappe.db.change_column_type("Tax Withheld Vouchers", "name", "varchar(140)")

0 comments on commit cf6d454

Please sign in to comment.