patch fixes
This commit is contained in:
parent
b8b79173e5
commit
ebc4ae7892
@ -85,7 +85,6 @@ execute:frappe.delete_doc("DocType", "Purchase Request Item")
|
||||
erpnext.patches.v4_2.recalculate_bom_cost
|
||||
erpnext.patches.v4_2.fix_gl_entries_for_stock_transactions
|
||||
erpnext.patches.v4_2.update_requested_and_ordered_qty
|
||||
erpnext.patches.v4_2.party_model
|
||||
erpnext.patches.v4_4.make_email_accounts
|
||||
execute:frappe.delete_doc("DocType", "Contact Control")
|
||||
erpnext.patches.v4_2.reset_bom_costs
|
||||
@ -98,6 +97,8 @@ execute:frappe.rename_doc("DocType", "Support Ticket", "Issue", force=True)
|
||||
erpnext.patches.v5_0.set_default_company_in_bom
|
||||
erpnext.patches.v5_0.capacity_planning
|
||||
erpnext.patches.v5_0.rename_table_fieldnames
|
||||
erpnext.patches.v5_0.recalculate_total_amount_in_jv
|
||||
execute:frappe.db.sql("update `tabJournal Entry` set voucher_type='Journal Entry' where ifnull(voucher_type, '')=''")
|
||||
erpnext.patches.v4_2.party_model
|
||||
erpnext.patches.v4_1.fix_jv_remarks
|
||||
erpnext.patches.v5_0.recalculate_total_amount_in_jv
|
||||
erpnext.patches.v5_0.remove_shopping_cart_app
|
||||
|
@ -7,8 +7,8 @@ import frappe
|
||||
def execute():
|
||||
frappe.reload_doc("accounts", "doctype", "account")
|
||||
frappe.reload_doc("setup", "doctype", "company")
|
||||
frappe.reload_doc("accounts", "doctype", "journal_entry_account")
|
||||
frappe.reload_doc("accounts", "doctype", "gl_entry")
|
||||
frappe.reload_doc("accounts", "doctype", "journal_entry_account")
|
||||
receivable_payable_accounts = create_receivable_payable_account()
|
||||
if receivable_payable_accounts:
|
||||
set_party_in_jv_and_gl_entry(receivable_payable_accounts)
|
||||
|
@ -2,14 +2,24 @@
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
import frappe
|
||||
from frappe.utils import money_in_words
|
||||
|
||||
def execute():
|
||||
for d in frappe.db.sql("""select name from `tabJournal Entry` where docstatus < 2 """, as_dict=1):
|
||||
try:
|
||||
jv = frappe.get_doc('Journal Entry', d.name)
|
||||
jv.ignore_validate_update_after_submit = True
|
||||
jv.set_print_format_fields()
|
||||
jv.save()
|
||||
frappe.db.commit()
|
||||
except:
|
||||
frappe.db.rollback()
|
||||
company_currency = dict(frappe.db.sql("select name, default_currency from `tabCompany`"))
|
||||
bank_or_cash_accounts = frappe.db.sql_list("""select name from `tabAccount`
|
||||
where account_type in ('Bank', 'Cash') and docstatus < 2""")
|
||||
|
||||
for je in frappe.db.sql_list("""select name from `tabJournal Entry` where docstatus < 2"""):
|
||||
total_amount = 0
|
||||
total_amount_in_words = ""
|
||||
|
||||
je_doc = frappe.get_doc('Journal Entry', je)
|
||||
for d in je_doc.get("accounts"):
|
||||
if (d.party_type and d.party) or d.account in bank_or_cash_accounts:
|
||||
total_amount = d.debit or d.credit
|
||||
if total_amount:
|
||||
total_amount_in_words = money_in_words(total_amount, company_currency.get(je_doc.company))
|
||||
|
||||
if total_amount:
|
||||
frappe.db.sql("""update `tabJournal Entry` set total_amount=%s, total_amount_in_words=%s
|
||||
where name = %s""", (total_amount, total_amount_in_words, je))
|
||||
|
6
erpnext/patches/v5_0/remove_shopping_cart_app.py
Normal file
6
erpnext/patches/v5_0/remove_shopping_cart_app.py
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
def execute():
|
||||
from frappe.installer import remove_from_installed_apps
|
||||
remove_from_installed_apps("shopping_cart")
|
@ -233,7 +233,13 @@ def execute():
|
||||
if "tab"+new_dt not in tables:
|
||||
frappe.rename_doc("DocType", old_dt, new_dt, force=True)
|
||||
|
||||
# reload new child doctypes
|
||||
frappe.reload_doc("manufacturing", "doctype", "production_order_operation")
|
||||
frappe.reload_doc("manufacturing", "doctype", "workstation_working_hour")
|
||||
frappe.reload_doc("stock", "doctype", "item_variant")
|
||||
frappe.reload_doc("accounts", "doctype", "party_account")
|
||||
frappe.reload_doc("accounts", "doctype", "fiscal_year_company")
|
||||
frappe.reload_doc("workflow", "doctype", "workflow")
|
||||
|
||||
#rename table fieldnames
|
||||
for dn in rename_map:
|
||||
|
Loading…
Reference in New Issue
Block a user