Rename prevdoc field in purchase order and purchase receipt doctype

This commit is contained in:
Rohit Waghchaure
2016-07-05 00:34:00 +05:30
parent 4647f24865
commit a71d9d33af
12 changed files with 195 additions and 121 deletions

View File

@@ -366,8 +366,8 @@ class BuyingController(StockController):
po_map = {}
for d in self.get("items"):
if self.doctype=="Purchase Receipt" \
and d.prevdoc_doctype=="Purchase Order" and d.prevdoc_detail_docname:
po_map.setdefault(d.prevdoc_docname, []).append(d.prevdoc_detail_docname)
and d.purchase_order:
po_map.setdefault(d.purchase_order, []).append(d.purchase_order_item)
elif self.doctype=="Purchase Invoice" and d.purchase_order and d.po_detail:
po_map.setdefault(d.purchase_order, []).append(d.po_detail)