addchild will never save added doc

This commit is contained in:
Anand Doshi
2012-12-24 17:02:38 +05:30
parent acc36be87f
commit f5d90abe92
27 changed files with 386 additions and 376 deletions

View File

@@ -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']

View File

@@ -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 ''

View File

@@ -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'