Events in timeline (#15485)

* Events in timeline

* Namespace correction

* Codacy correction

* Addition of sales partners in participants

* Correct json indent
This commit is contained in:
Charles-Henri Decultot 2018-10-03 07:11:26 +02:00 committed by Rushabh Mehta
parent 719701f2a4
commit efd776da46
5 changed files with 4471 additions and 4433 deletions

View File

@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 1,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
@ -1430,7 +1431,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-09-07 08:48:57.719713",
"modified": "2018-09-24 15:36:46.141734",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier",

View File

@ -1388,7 +1388,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-10-01 13:46:11.112043",
"modified": "2018-10-02 09:12:23.415379",
"modified_by": "Administrator",
"module": "CRM",
"name": "Lead",

View File

@ -25,6 +25,7 @@ web_include_css = "assets/css/erpnext-web.css"
doctype_js = {
"Communication": "public/js/communication.js",
"Event": "public/js/event.js"
}
welcome_email = "erpnext.setup.utils.welcome_email"

View File

@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 1,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
@ -3077,7 +3078,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-08-29 08:35:01.321251",
"modified": "2018-09-24 15:36:58.234710",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee",

View File

@ -0,0 +1,35 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
// MIT License. See license.txt
frappe.provide("frappe.desk");
frappe.ui.form.on("Event", {
refresh: function(frm) {
frm.set_query('reference_doctype', "event_participants", function() {
return {
"filters": {
"name": ["in", ["Contact", "Lead", "Customer", "Supplier", "Employee", "Sales Partner"]]
}
};
});
frm.add_custom_button(__('Add Leads'), function() {
new frappe.desk.eventParticipants(frm, "Lead");
}, __("Add Participants"));
frm.add_custom_button(__('Add Customers'), function() {
new frappe.desk.eventParticipants(frm, "Customer");
}, __("Add Participants"));
frm.add_custom_button(__('Add Suppliers'), function() {
new frappe.desk.eventParticipants(frm, "Supplier");
}, __("Add Participants"));
frm.add_custom_button(__('Add Employees'), function() {
new frappe.desk.eventParticipants(frm, "Employee");
}, __("Add Participants"));
frm.add_custom_button(__('Add Sales Partners'), function() {
new frappe.desk.eventParticipants(frm, "Sales Partners");
}, __("Add Participants"));
}
});