mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
update modified time of GRN while updating QA no in GRN
This commit is contained in:
@@ -46,7 +46,8 @@ class DocType:
|
|||||||
|
|
||||||
def get_item_specification_details(self):
|
def get_item_specification_details(self):
|
||||||
self.doc.clear_table(self.doclist, 'qa_specification_details')
|
self.doc.clear_table(self.doclist, 'qa_specification_details')
|
||||||
specification = sql("select specification, value from `tabItem Quality Inspection Parameter` where parent = '%s' order by idx" % (self.doc.item_code))
|
specification = sql("select specification, value from `tabItem Quality Inspection Parameter` \
|
||||||
|
where parent = '%s' order by idx" % (self.doc.item_code))
|
||||||
for d in specification:
|
for d in specification:
|
||||||
child = addchild(self.doc, 'qa_specification_details', 'Quality Inspection Reading', 1, self.doclist)
|
child = addchild(self.doc, 'qa_specification_details', 'Quality Inspection Reading', 1, self.doclist)
|
||||||
child.specification = d[0]
|
child.specification = d[0]
|
||||||
@@ -55,9 +56,13 @@ class DocType:
|
|||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
if self.doc.purchase_receipt_no:
|
if self.doc.purchase_receipt_no:
|
||||||
sql("update `tabPurchase Receipt Item` set qa_no = '%s' where parent = '%s' and item_code = '%s'" % (self.doc.name, self.doc.purchase_receipt_no, self.doc.item_code))
|
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.doc.name, self.doc.modified, self.doc.purchase_receipt_no, self.doc.item_code))
|
||||||
|
|
||||||
|
|
||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
if self.doc.purchase_receipt_no:
|
if self.doc.purchase_receipt_no:
|
||||||
sql("update `tabPurchase Receipt Item` set qa_no = '' where parent = '%s' and item_code = '%s'" % (self.doc.purchase_receipt_no, self.doc.item_code))
|
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.doc.modified, self.doc.purchase_receipt_no, self.doc.item_code))
|
||||||
Reference in New Issue
Block a user