Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Merge develop to main #356

Merged
merged 32 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ec12df1
feat: Create Quotation, Contact and Customer in ERPNext from Deal
nabinhait Sep 12, 2024
d5c76eb
fix: Raise error while creating quotation/customer in remote
nabinhait Sep 12, 2024
898f4a0
fix: import erpnext methods only if erpnext installed on current site
nabinhait Sep 12, 2024
078bea2
Merge branch 'develop' into erpnext-integration
shariquerik Sep 13, 2024
020c285
fix: only show erpnext setting fields if enabled is set
shariquerik Sep 13, 2024
2e49844
Merge pull request #346 from nabinhait/erpnext-integration
shariquerik Sep 14, 2024
16a8671
fix: changed is_erpnext_in_same_site to is_erpnext_in_different site
shariquerik Sep 16, 2024
cb33d2d
fix: get organization address and pass it to link it with prospect an…
shariquerik Sep 16, 2024
979ef27
fix: option to create customer on status change
shariquerik Sep 16, 2024
0d5d34f
fix: hide enable check in form script
shariquerik Sep 16, 2024
37c031b
fix: show title in link field for CRM Lead & CRM Deal
shariquerik Sep 16, 2024
321c0d8
fix: show deal status only if erpnext crm settings enabled
shariquerik Sep 16, 2024
084ff54
fix: render async form custom actions & statuses
shariquerik Sep 16, 2024
c4bfe9e
fix: show create quotation only if erpnext integration is enabled
shariquerik Sep 16, 2024
3f85c56
fix: render async list custom actions & bulk actions
shariquerik Sep 16, 2024
3129c46
fix: implement mandatory depends on in settings page
shariquerik Sep 16, 2024
5e5d475
Merge pull request #352 from shariquerik/crm-erpnext-1
shariquerik Sep 16, 2024
b1bfeca
fix: extend last section if have space below
shariquerik Sep 17, 2024
cc15309
fix: removed organization store from lead/deal page
shariquerik Sep 17, 2024
e60d74c
fix: minor fix
shariquerik Sep 17, 2024
d1c37c1
fix: enabling erpnext integration not creating form script
shariquerik Sep 17, 2024
9099e17
fix: pass obj to form script
shariquerik Sep 17, 2024
467bc2d
chore: fixed deprecated meta warning
shariquerik Sep 17, 2024
5e8c31c
fix: also pass company while creating quotation
shariquerik Sep 17, 2024
2336cc7
fix: show 'View Customer' button when customer is created
shariquerik Sep 17, 2024
01411cd
fix: added reset form script button to reset erpnext form script
shariquerik Sep 17, 2024
c9a9d19
fix: incorrect syntax
shariquerik Sep 17, 2024
8bf88a2
fix: remove website validation
shariquerik Sep 17, 2024
e79c5d4
Merge pull request #354 from shariquerik/crm-erpnext-2
shariquerik Sep 17, 2024
b9f2730
fix: changed api secret field type to password
shariquerik Sep 17, 2024
6208ede
fix: created api to reset crm form script
shariquerik Sep 17, 2024
82d608b
fix: hide section if there is no fields in it
shariquerik Sep 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading