brotherton-erpnext/erpnext/patches/v10_0/update_status_in_purchase_receipt.py

8 lines
250 B
Python

from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("stock", "doctype", "purchase_receipt")
frappe.db.sql('''
UPDATE `tabPurchase Receipt` SET status = "Completed" WHERE per_billed = 100 AND docstatus = 1
''')