Skip to content

Commit

Permalink
Merge pull request #356 from frappe/develop
Browse files Browse the repository at this point in the history
chore: Merge develop to main
  • Loading branch information
shariquerik authored Sep 18, 2024
2 parents cabc5b0 + 82d608b commit 7898f2b
Show file tree
Hide file tree
Showing 30 changed files with 740 additions and 199 deletions.
7 changes: 4 additions & 3 deletions crm/fcrm/doctype/crm_deal/crm_deal.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@
"fetch_from": ".website",
"fieldname": "website",
"fieldtype": "Data",
"label": "Website",
"options": "URL"
"label": "Website"
},
{
"fieldname": "close_date",
Expand Down Expand Up @@ -339,7 +338,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-06-20 12:55:41.602364",
"modified": "2024-09-17 18:34:15.873610",
"modified_by": "Administrator",
"module": "FCRM",
"name": "CRM Deal",
Expand Down Expand Up @@ -371,8 +370,10 @@
"write": 1
}
],
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "organization",
"track_changes": 1
}
4 changes: 4 additions & 0 deletions crm/fcrm/doctype/crm_form_script/crm_form_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ frappe.ui.form.on("CRM Form Script", {
);
}

if (!frappe.boot.developer_mode) {
frm.toggle_enable("is_standard", 0);
}

frm.trigger("add_enable_button");
},

Expand Down
3 changes: 2 additions & 1 deletion crm/fcrm/doctype/crm_form_script/crm_form_script.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"default": "0",
"fieldname": "enabled",
"fieldtype": "Check",
"hidden": 1,
"label": "Enabled"
},
{
Expand Down Expand Up @@ -64,7 +65,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-09-11 12:56:09.288849",
"modified": "2024-09-16 19:40:19.340948",
"modified_by": "Administrator",
"module": "FCRM",
"name": "CRM Form Script",
Expand Down
2 changes: 1 addition & 1 deletion crm/fcrm/doctype/crm_form_script/crm_form_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def validate(self):
or frappe.flags.in_test
or frappe.flags.in_fixtures
)
if in_user_env and self.is_standard and not frappe.conf.developer_mode:
if in_user_env and not self.is_new() and self.is_standard and not frappe.conf.developer_mode:
# only enabled can be changed for standard form scripts
if self.has_value_changed("enabled"):
enabled_value = self.enabled
Expand Down
6 changes: 3 additions & 3 deletions crm/fcrm/doctype/crm_lead/crm_lead.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@
{
"fieldname": "website",
"fieldtype": "Data",
"label": "Website",
"options": "URL"
"label": "Website"
},
{
"fieldname": "mobile_no",
Expand Down Expand Up @@ -291,7 +290,7 @@
"image_field": "image",
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-02-05 00:58:07.321058",
"modified": "2024-09-17 18:36:57.289897",
"modified_by": "Administrator",
"module": "FCRM",
"name": "CRM Lead",
Expand Down Expand Up @@ -325,6 +324,7 @@
],
"sender_field": "email",
"sender_name_field": "first_name",
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
Expand Down
5 changes: 2 additions & 3 deletions crm/fcrm/doctype/crm_organization/crm_organization.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
{
"fieldname": "website",
"fieldtype": "Data",
"label": "Website",
"options": "URL"
"label": "Website"
},
{
"fieldname": "organization_logo",
Expand Down Expand Up @@ -80,7 +79,7 @@
"image_field": "organization_logo",
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-09-13 15:52:05.106389",
"modified": "2024-09-17 18:37:10.341062",
"modified_by": "Administrator",
"module": "FCRM",
"name": "CRM Organization",
Expand Down
Empty file.
21 changes: 21 additions & 0 deletions crm/fcrm/doctype/erpnext_crm_settings/erpnext_crm_settings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt

frappe.ui.form.on("ERPNext CRM Settings", {
refresh(frm) {
if (!frm.doc.enabled) return;
frm.add_custom_button(__("Reset ERPNext Form Script"), () => {
frappe.confirm(
__(
"Are you sure you want to reset 'Create Quotation from CRM Deal' Form Script?"
),
() => frm.trigger("reset_erpnext_form_script")
);
});
},
async reset_erpnext_form_script(frm) {
let script = await frm.call("reset_erpnext_form_script");
script.message &&
frappe.msgprint(__("Form Script updated successfully"));
},
});
124 changes: 124 additions & 0 deletions crm/fcrm/doctype/erpnext_crm_settings/erpnext_crm_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2024-07-02 15:23:17.022214",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"enabled",
"is_erpnext_in_different_site",
"column_break_vfru",
"erpnext_company",
"section_break_oubd",
"erpnext_site_url",
"column_break_fllx",
"api_key",
"api_secret",
"section_break_jnbn",
"create_customer_on_status_change",
"column_break_kbhw",
"deal_status"
],
"fields": [
{
"depends_on": "eval:doc.enabled && doc.is_erpnext_in_different_site",
"fieldname": "api_key",
"fieldtype": "Data",
"label": "API Key",
"mandatory_depends_on": "is_erpnext_in_different_site"
},
{
"depends_on": "eval:doc.enabled && doc.is_erpnext_in_different_site",
"fieldname": "api_secret",
"fieldtype": "Password",
"label": "API Secret",
"mandatory_depends_on": "is_erpnext_in_different_site"
},
{
"depends_on": "enabled",
"fieldname": "section_break_oubd",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_fllx",
"fieldtype": "Column Break"
},
{
"depends_on": "eval:doc.enabled && doc.is_erpnext_in_different_site",
"fieldname": "erpnext_site_url",
"fieldtype": "Data",
"label": "ERPNext Site URL",
"mandatory_depends_on": "is_erpnext_in_different_site"
},
{
"depends_on": "enabled",
"fieldname": "erpnext_company",
"fieldtype": "Data",
"label": "Company in ERPNext Site",
"mandatory_depends_on": "enabled"
},
{
"fieldname": "column_break_vfru",
"fieldtype": "Column Break"
},
{
"default": "0",
"fieldname": "enabled",
"fieldtype": "Check",
"label": "Enabled"
},
{
"default": "0",
"depends_on": "enabled",
"fieldname": "is_erpnext_in_different_site",
"fieldtype": "Check",
"label": "Is ERPNext installed on a different site?"
},
{
"fieldname": "section_break_jnbn",
"fieldtype": "Section Break"
},
{
"default": "0",
"depends_on": "enabled",
"fieldname": "create_customer_on_status_change",
"fieldtype": "Check",
"label": "Create customer on status change"
},
{
"fieldname": "column_break_kbhw",
"fieldtype": "Column Break"
},
{
"depends_on": "eval:doc.enabled && doc.create_customer_on_status_change",
"fieldname": "deal_status",
"fieldtype": "Link",
"label": "Deal Status",
"mandatory_depends_on": "create_customer_on_status_change",
"options": "CRM Deal Status"
}
],
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2024-09-17 19:21:11.060901",
"modified_by": "Administrator",
"module": "FCRM",
"name": "ERPNext CRM Settings",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}
Loading

0 comments on commit 7898f2b

Please sign in to comment.