[patch] Update refdoc in Landed Cost Voucher
This commit is contained in:
parent
185110159e
commit
3c364dd5b8
@ -306,3 +306,4 @@ erpnext.patches.v7_0.calculate_total_costing_amount
|
||||
erpnext.patches.v7_0.fix_nonwarehouse_ledger_gl_entries_for_transactions
|
||||
erpnext.patches.v7_0.remove_old_earning_deduction_doctypes
|
||||
erpnext.patches.v7_0.make_guardian
|
||||
erpnext.patches.v7_0.update_refdoc_in_landed_cost_voucher
|
15
erpnext/patches/v7_0/update_refdoc_in_landed_cost_voucher.py
Normal file
15
erpnext/patches/v7_0/update_refdoc_in_landed_cost_voucher.py
Normal file
@ -0,0 +1,15 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
if "purchase_receipt" not in frappe.db.get_table_columns("Landed Cost Purchase Receipt"):
|
||||
return
|
||||
|
||||
frappe.reload_doctype("Landed Cost Purchase Receipt")
|
||||
|
||||
frappe.db.sql("""
|
||||
update `tabLanded Cost Purchase Receipt`
|
||||
set receipt_document_type = 'Purchase Receipt', receipt_document = purchase_receipt
|
||||
where (receipt_document is null or receipt_document = '')
|
||||
and (purchase_receipt is not null and purchase_receipt != '')
|
||||
""")
|
Loading…
Reference in New Issue
Block a user