mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
Unlink Quality Inspection from PR while cancelling QI
This commit is contained in:
@@ -28,15 +28,12 @@ class QualityInspection(Document):
|
|||||||
frappe.db.sql("""update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2
|
frappe.db.sql("""update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2
|
||||||
set t1.qa_no = %s, t2.modified = %s
|
set t1.qa_no = %s, t2.modified = %s
|
||||||
where t1.parent = %s and t1.item_code = %s and t1.parent = t2.name""",
|
where t1.parent = %s and t1.item_code = %s and t1.parent = t2.name""",
|
||||||
(self.name, self.modified, self.purchase_receipt_no,
|
(self.name, self.modified, self.purchase_receipt_no, self.item_code))
|
||||||
self.item_code))
|
|
||||||
|
|
||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
if self.purchase_receipt_no:
|
if self.purchase_receipt_no:
|
||||||
frappe.db.sql("""update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2
|
frappe.db.sql("""update `tabPurchase Receipt Item` set qa_no = '', modified=%s
|
||||||
set t1.qa_no = '', t2.modified = %s
|
where qa_no = %s""", (self.modified, self.name))
|
||||||
where t1.parent = %s and t1.item_code = %s and t1.parent = t2.name""",
|
|
||||||
(self.modified, self.purchase_receipt_no, self.item_code))
|
|
||||||
|
|
||||||
def item_query(doctype, txt, searchfield, start, page_len, filters):
|
def item_query(doctype, txt, searchfield, start, page_len, filters):
|
||||||
if filters.get("from"):
|
if filters.get("from"):
|
||||||
|
|||||||
Reference in New Issue
Block a user