mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
addchild will never save added doc
This commit is contained in:
@@ -612,7 +612,8 @@ class DocType(TransactionBase):
|
||||
|
||||
idx = 0
|
||||
for other in other_charge:
|
||||
d = addchild(obj.doc, 'purchase_tax_details', 'Purchase Taxes and Charges', 1, obj.doclist)
|
||||
d = addchild(obj.doc, 'purchase_tax_details', 'Purchase Taxes and Charges',
|
||||
obj.doclist)
|
||||
d.category = other['category']
|
||||
d.add_deduct_tax = other['add_deduct_tax']
|
||||
d.charge_type = other['charge_type']
|
||||
|
||||
@@ -314,7 +314,7 @@ class DocType(TransactionBase):
|
||||
for i in bom_det:
|
||||
if i and not sql("select name from `tabPurchase Order Item Supplied` where reference_name = '%s' and bom_detail_no = '%s' and parent = '%s' " %(d.name, i[6], self.doc.name)):
|
||||
|
||||
rm_child = addchild(self.doc, 'po_raw_material_details', 'Purchase Order Item Supplied', 1, self.doclist)
|
||||
rm_child = addchild(self.doc, 'po_raw_material_details', 'Purchase Order Item Supplied', self.doclist)
|
||||
|
||||
rm_child.reference_name = d.name
|
||||
rm_child.bom_detail_no = i and i[6] or ''
|
||||
|
||||
@@ -41,7 +41,7 @@ class DocType:
|
||||
specification = sql("select specification, value from `tabItem Quality Inspection Parameter` \
|
||||
where parent = '%s' order by idx" % (self.doc.item_code))
|
||||
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', self.doclist)
|
||||
child.specification = d[0]
|
||||
child.value = d[1]
|
||||
child.status = 'Accepted'
|
||||
|
||||
Reference in New Issue
Block a user