feat(analytics): comply erpnext with utm methodology

This commit is contained in:
David
2024-06-29 00:45:39 +02:00
parent 7a21574cfb
commit 96a6673510
46 changed files with 631 additions and 416 deletions

View File

@@ -124,8 +124,10 @@
"customer_group",
"territory",
"column_break_108",
"campaign",
"source",
"utm_source",
"utm_campaign",
"utm_medium",
"utm_content",
"column_break4",
"opportunity",
"supplier_quotation",
@@ -853,24 +855,6 @@
"fieldtype": "Button",
"label": "Update Auto Repeat Reference"
},
{
"fieldname": "campaign",
"fieldtype": "Link",
"label": "Campaign",
"oldfieldname": "campaign",
"oldfieldtype": "Link",
"options": "Campaign",
"print_hide": 1
},
{
"fieldname": "source",
"fieldtype": "Link",
"label": "Source",
"oldfieldname": "source",
"oldfieldtype": "Select",
"options": "Lead Source",
"print_hide": 1
},
{
"allow_on_submit": 1,
"depends_on": "eval:doc.status=='Lost'",
@@ -1068,13 +1052,44 @@
"fieldname": "named_place",
"fieldtype": "Data",
"label": "Named Place"
},
{
"fieldname": "utm_campaign",
"fieldtype": "Link",
"label": "Campaign",
"oldfieldname": "campaign",
"oldfieldtype": "Link",
"options": "UTM Campaign",
"print_hide": 1
},
{
"fieldname": "utm_source",
"fieldtype": "Link",
"label": "Source",
"oldfieldname": "source",
"oldfieldtype": "Select",
"options": "UTM Source",
"print_hide": 1
},
{
"fieldname": "utm_medium",
"print_hide": 1,
"fieldtype": "Link",
"label": "Medium",
"options": "UTM Medium"
},
{
"fieldname": "utm_content",
"print_hide": 1,
"fieldtype": "Data",
"label": "Content"
}
],
"icon": "fa fa-shopping-cart",
"idx": 82,
"is_submittable": 1,
"links": [],
"modified": "2024-04-20 01:15:19.171383",
"modified": "2024-06-28 10:32:47.638342",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation",
@@ -1172,4 +1187,4 @@
"states": [],
"timeline_field": "party_name",
"title_field": "title"
}
}

View File

@@ -46,7 +46,6 @@ class Quotation(SellingController):
base_rounding_adjustment: DF.Currency
base_total: DF.Currency
base_total_taxes_and_charges: DF.Currency
campaign: DF.Link | None
company: DF.Link
company_address: DF.Link | None
company_address_display: DF.TextEditor | None
@@ -96,7 +95,6 @@ class Quotation(SellingController):
shipping_address: DF.TextEditor | None
shipping_address_name: DF.Link | None
shipping_rule: DF.Link | None
source: DF.Link | None
status: DF.Literal[
"Draft", "Open", "Replied", "Partially Ordered", "Ordered", "Lost", "Cancelled", "Expired"
]
@@ -113,6 +111,10 @@ class Quotation(SellingController):
total_qty: DF.Float
total_taxes_and_charges: DF.Currency
transaction_date: DF.Date
utm_campaign: DF.Link | None
utm_content: DF.Data | None
utm_medium: DF.Link | None
utm_source: DF.Link | None
valid_till: DF.Date | None
# end: auto-generated types

View File

@@ -159,10 +159,13 @@
"additional_info_section",
"is_internal_customer",
"represents_company",
"column_break_yvzv",
"utm_source",
"utm_campaign",
"utm_medium",
"utm_content",
"column_break_152",
"source",
"inter_company_order_reference",
"campaign",
"party_account_currency",
"connections_tab"
],
@@ -1165,28 +1168,6 @@
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "source",
"fieldtype": "Link",
"hide_days": 1,
"hide_seconds": 1,
"label": "Source",
"oldfieldname": "source",
"oldfieldtype": "Select",
"options": "Lead Source",
"print_hide": 1
},
{
"fieldname": "campaign",
"fieldtype": "Link",
"hide_days": 1,
"hide_seconds": 1,
"label": "Campaign",
"oldfieldname": "campaign",
"oldfieldtype": "Link",
"options": "Campaign",
"print_hide": 1
},
{
"collapsible": 1,
"fieldname": "printing_details",
@@ -1656,13 +1637,52 @@
"no_copy": 1,
"options": "Not Requested\nRequested\nPartially Paid\nFully Paid",
"print_hide": 1
},
{
"fieldname": "column_break_yvzv",
"fieldtype": "Column Break"
},
{
"fieldname": "utm_medium",
"print_hide": 1,
"fieldtype": "Link",
"label": "Medium",
"options": "UTM Medium"
},
{
"fieldname": "utm_content",
"print_hide": 1,
"fieldtype": "Data",
"label": "Content"
},
{
"fieldname": "utm_source",
"fieldtype": "Link",
"hide_days": 1,
"hide_seconds": 1,
"label": "Source",
"oldfieldname": "source",
"oldfieldtype": "Select",
"options": "UTM Source",
"print_hide": 1
},
{
"fieldname": "utm_campaign",
"fieldtype": "Link",
"hide_days": 1,
"hide_seconds": 1,
"label": "Campaign",
"oldfieldname": "campaign",
"oldfieldtype": "Link",
"options": "UTM Campaign",
"print_hide": 1
}
],
"icon": "fa fa-file-text",
"idx": 105,
"is_submittable": 1,
"links": [],
"modified": "2024-05-27 18:51:54.905804",
"modified": "2024-06-28 10:36:23.824623",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",
@@ -1740,4 +1760,4 @@
"title_field": "customer_name",
"track_changes": 1,
"track_seen": 1
}
}

View File

@@ -80,7 +80,6 @@ class SalesOrder(SellingController):
base_total: DF.Currency
base_total_taxes_and_charges: DF.Currency
billing_status: DF.Literal["Not Billed", "Fully Billed", "Partly Billed", "Closed"]
campaign: DF.Link | None
commission_rate: DF.Float
company: DF.Link
company_address: DF.Link | None
@@ -151,7 +150,6 @@ class SalesOrder(SellingController):
shipping_address_name: DF.Link | None
shipping_rule: DF.Link | None
skip_delivery_note: DF.Check
source: DF.Link | None
status: DF.Literal[
"",
"Draft",
@@ -179,6 +177,10 @@ class SalesOrder(SellingController):
total_qty: DF.Float
total_taxes_and_charges: DF.Currency
transaction_date: DF.Date
utm_campaign: DF.Link | None
utm_content: DF.Data | None
utm_medium: DF.Link | None
utm_source: DF.Link | None
# end: auto-generated types
def __init__(self, *args, **kwargs):