Unlink Quality Inspection from PR while cancelling QI
This commit is contained in:
parent
43df804176
commit
76a8508d2b
@ -28,15 +28,12 @@ class QualityInspection(Document):
|
||||
frappe.db.sql("""update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2
|
||||
set t1.qa_no = %s, t2.modified = %s
|
||||
where t1.parent = %s and t1.item_code = %s and t1.parent = t2.name""",
|
||||
(self.name, self.modified, self.purchase_receipt_no,
|
||||
self.item_code))
|
||||
(self.name, self.modified, self.purchase_receipt_no, self.item_code))
|
||||
|
||||
def on_cancel(self):
|
||||
if self.purchase_receipt_no:
|
||||
frappe.db.sql("""update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2
|
||||
set t1.qa_no = '', t2.modified = %s
|
||||
where t1.parent = %s and t1.item_code = %s and t1.parent = t2.name""",
|
||||
(self.modified, self.purchase_receipt_no, self.item_code))
|
||||
frappe.db.sql("""update `tabPurchase Receipt Item` set qa_no = '', modified=%s
|
||||
where qa_no = %s""", (self.modified, self.name))
|
||||
|
||||
def item_query(doctype, txt, searchfield, start, page_len, filters):
|
||||
if filters.get("from"):
|
||||
|
Loading…
x
Reference in New Issue
Block a user