Update project.js (#10796)
* Update project.js Move indicators to setup to be less buggy * fixed codecy trailing whitespace issues
This commit is contained in:
parent
9744aa21af
commit
9bc197cfd5
@ -2,7 +2,7 @@
|
|||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.ui.form.on("Project", {
|
frappe.ui.form.on("Project", {
|
||||||
onload: function(frm) {
|
setup: function(frm) {
|
||||||
frm.set_indicator_formatter('title',
|
frm.set_indicator_formatter('title',
|
||||||
function(doc) {
|
function(doc) {
|
||||||
let indicator = 'orange';
|
let indicator = 'orange';
|
||||||
@ -18,7 +18,9 @@ frappe.ui.form.on("Project", {
|
|||||||
return indicator;
|
return indicator;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
onload: function(frm) {
|
||||||
var so = frappe.meta.get_docfield("Project", "sales_order");
|
var so = frappe.meta.get_docfield("Project", "sales_order");
|
||||||
so.get_route_options_for_new_doc = function(field) {
|
so.get_route_options_for_new_doc = function(field) {
|
||||||
if(frm.is_new()) return;
|
if(frm.is_new()) return;
|
||||||
@ -113,4 +115,3 @@ frappe.ui.form.on("Project Task", {
|
|||||||
frm.trigger('tasks_refresh');
|
frm.trigger('tasks_refresh');
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user