-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use hash based naming for tax withheld vouchers child table (bac…
…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
1 parent
1a33324
commit cf6d454
Showing
3 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
erpnext/patches/v14_0/change_autoname_for_tax_withheld_vouchers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)") |