15 lines
469 B
Python
15 lines
469 B
Python
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
import frappe
|
|
|
|
def execute():
|
|
for d in frappe.db.sql("""select name from `tabJournal Voucher` where docstatus < 2 """, as_dict=1):
|
|
try:
|
|
jv = frappe.get_doc('Journal Voucher', d.name)
|
|
jv.ignore_validate_update_after_submit = True
|
|
jv.set_print_format_fields()
|
|
jv.save()
|
|
frappe.db.commit()
|
|
except:
|
|
frappe.db.rollback() |