From c97becbd154a881755755a61ba0b38db37c851de Mon Sep 17 00:00:00 2001 From: mbauskar Date: Mon, 18 Jan 2016 16:28:21 +0530 Subject: [PATCH] added document type in args --- erpnext/controllers/accounts_controller.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index bcaa9fbac95..dae1227ff16 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -138,6 +138,10 @@ class AccountsController(TransactionBase): for fieldname in self.meta.get_valid_columns(): parent_dict[fieldname] = self.get(fieldname) + if self.doctype in ["Quotation", "Sales Order"]: + document_type = "Quotation Item" if self.doctype == "Quotation" else "Sales Order Item" + parent_dict.update({"document_type": document_type}) + for item in self.get("items"): if item.get("item_code"): args = parent_dict.copy()