mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-15 00:06:22 +00:00
fix: Customer dashboard fixes
This commit is contained in:
@@ -6,6 +6,9 @@ def get_data():
|
||||
'heatmap': True,
|
||||
'heatmap_message': _('This is based on transactions against this Customer. See timeline below for details'),
|
||||
'fieldname': 'customer',
|
||||
'non_standard_fieldnames': {
|
||||
'Quotation': 'customer_lead'
|
||||
},
|
||||
'transactions': [
|
||||
{
|
||||
'label': _('Pre Sales'),
|
||||
|
||||
@@ -122,8 +122,8 @@ def _make_sales_order(source_name, target_doc=None, ignore_permissions=False):
|
||||
|
||||
def set_missing_values(source, target):
|
||||
if customer:
|
||||
target.customer = customer
|
||||
target.customer_name = customer
|
||||
target.customer = customer.name
|
||||
target.customer_name = customer.customer_name
|
||||
target.ignore_pricing_rule = 1
|
||||
target.flags.ignore_permissions = ignore_permissions
|
||||
target.run_method("set_missing_values")
|
||||
@@ -169,8 +169,8 @@ def _make_sales_invoice(source_name, target_doc=None, ignore_permissions=False):
|
||||
|
||||
def set_missing_values(source, target):
|
||||
if customer:
|
||||
target.customer = customer
|
||||
target.customer_name = customer
|
||||
target.customer = customer.name
|
||||
target.customer_name = customer.customer_name
|
||||
target.ignore_pricing_rule = 1
|
||||
target.flags.ignore_permissions = ignore_permissions
|
||||
target.run_method("set_missing_values")
|
||||
@@ -235,4 +235,4 @@ def _make_customer(source_name, ignore_permissions=False):
|
||||
else:
|
||||
return customer_name
|
||||
else:
|
||||
return quotation[2]
|
||||
return frappe.get_doc("Customer",quotation[2])
|
||||
|
||||
@@ -33,7 +33,6 @@ class TestShoppingCart(unittest.TestCase):
|
||||
self.assertEqual(quotation.quotation_to, "Customer")
|
||||
self.assertEqual(quotation.contact_person,
|
||||
frappe.db.get_value("Contact", dict(email_id="test_cart_user@example.com")))
|
||||
self.assertEqual(quotation.customer_lead, None)
|
||||
self.assertEqual(quotation.contact_email, frappe.session.user)
|
||||
|
||||
return quotation
|
||||
|
||||
Reference in New Issue
Block a user