fix: Use get_value instead of get_doc and formatting

This commit is contained in:
deepeshgarg007
2019-12-19 11:07:43 +05:30
parent 6e41475612
commit 5cc0e08a41

View File

@@ -224,7 +224,7 @@ def make_quotation(source_name, target_doc=None):
target_doc.run_method("set_other_charges") target_doc.run_method("set_other_charges")
target_doc.run_method("calculate_taxes_and_totals") target_doc.run_method("calculate_taxes_and_totals")
price_list = frappe.get_doc("Customer", source_name, "default_price_list") price_list = frappe.get_value("Customer", source_name, "default_price_list")
if price_list: if price_list:
target_doc.selling_price_list = price_list target_doc.selling_price_list = price_list
@@ -242,8 +242,7 @@ def make_opportunity(source_name, target_doc=None):
"name": "party_name", "name": "party_name",
"doctype": "opportunity_from", "doctype": "opportunity_from",
} }
}}, target_doc, set_missing_values }}, target_doc, set_missing_values)
)
return target_doc return target_doc