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

This commit is contained in:
Ritwik Puri 2023-01-20 18:53:39 +05:30 committed by GitHub
parent cceb7922a5
commit 17045f88a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"actions": [],
"autoname": "autoincrement",
"autoname": "hash",
"creation": "2022-09-13 16:18:59.404842",
"doctype": "DocType",
"editable_grid": 1,
@ -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",

View File

@ -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

View File

@ -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)")