mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
addchild will never save added doc
This commit is contained in:
@@ -357,7 +357,8 @@ class DocType:
|
||||
"Add items to Flat BOM table"
|
||||
self.doclist = self.doc.clear_table(self.doclist, 'flat_bom_details', 1)
|
||||
for d in self.cur_exploded_items:
|
||||
ch = addchild(self.doc, 'flat_bom_details', 'BOM Explosion Item', 1, self.doclist)
|
||||
ch = addchild(self.doc, 'flat_bom_details', 'BOM Explosion Item',
|
||||
self.doclist)
|
||||
for i in d.keys():
|
||||
ch.fields[i] = d[i]
|
||||
ch.docstatus = self.doc.docstatus
|
||||
|
||||
@@ -101,7 +101,7 @@ class DocType:
|
||||
for r in open_so:
|
||||
if cstr(r['name']) not in so_list:
|
||||
pp_so = addchild(self.doc, 'pp_so_details',
|
||||
'Production Plan Sales Order', 1, self.doclist)
|
||||
'Production Plan Sales Order', self.doclist)
|
||||
pp_so.sales_order = r['name']
|
||||
pp_so.sales_order_date = cstr(r['transaction_date'])
|
||||
pp_so.customer = cstr(r['customer'])
|
||||
@@ -150,7 +150,7 @@ class DocType:
|
||||
for p in items:
|
||||
item_details = sql("""select description, stock_uom, default_bom
|
||||
from tabItem where name=%s""", p['item_code'])
|
||||
pi = addchild(self.doc, 'pp_details', 'Production Plan Item', 1, self.doclist)
|
||||
pi = addchild(self.doc, 'pp_details', 'Production Plan Item', self.doclist)
|
||||
pi.sales_order = p['parent']
|
||||
pi.item_code = p['item_code']
|
||||
pi.description = item_details and item_details[0][0] or ''
|
||||
|
||||
Reference in New Issue
Block a user