Merge pull request #9208 from mbauskar/docs
removed {next} from documentation and removed the globals from custom scripts
This commit is contained in:
commit
0c5d732cd8
@ -15,6 +15,4 @@ Sie können Ihre Lieferanten aus einem breiten Angebot verfügbarer Typen in ERP
|
||||
|
||||
Wenn Sie Ihre Lieferanten in verschiedene Typen unterteilen, erleichtert Ihnen das die Buchhaltung und die Rechnungslegung.
|
||||
|
||||
Geben Sie Ihre neue Lieferantenkategorie ein und speichern Sie.
|
||||
|
||||
{next}
|
||||
Geben Sie Ihre neue Lieferantenkategorie ein und speichern Sie.
|
@ -3,8 +3,8 @@
|
||||
|
||||
frappe.ui.form.on("Event", "validate", function(frm) {
|
||||
if (frm.doc.from_date < get_today()) {
|
||||
msgprint(__("You can not select past date in From Date"));
|
||||
throw "past date selected"
|
||||
frappe.msgprint(__("You can not select past date in From Date"));
|
||||
frappe.throw(__("past date selected"))
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -4,12 +4,12 @@
|
||||
Fügen Sie dem Ereignis custom_before_cancel eine Steuerungsfunktion hinzu:
|
||||
|
||||
cur_frm.cscript.custom_before_cancel = function(doc) {
|
||||
if (user_roles.indexOf("Accounts User")!=-1 && user_roles.indexOf("Accounts Manager")==-1
|
||||
if (frappe.user_roles.indexOf("Accounts User")!=-1 && frappe.user_roles.indexOf("Accounts Manager")==-1
|
||||
&& user_roles.indexOf("System Manager")==-1) {
|
||||
if (flt(doc.grand_total) > 10000) {
|
||||
msgprint("You can not cancel this transaction, because grand total \
|
||||
frappe.msgprint("You can not cancel this transaction, because grand total \
|
||||
is greater than 10000");
|
||||
validated = false;
|
||||
frappe.validated = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
frappe.ui.form.on("Material Request", "validate", function(frm) {
|
||||
if(user=="user1@example.com" && frm.doc.purpose!="Material Receipt") {
|
||||
msgprint("You are only allowed Material Receipt");
|
||||
throw "Not allowed";
|
||||
frappe.msgprint("You are only allowed Material Receipt");
|
||||
frappe.throw(__("Not allowed"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,17 +3,16 @@
|
||||
|
||||
// restrict certain warehouse to Material Manager
|
||||
cur_frm.cscript.custom_validate = function(doc) {
|
||||
if(user_roles.indexOf("Material Manager")==-1) {
|
||||
|
||||
var restricted_in_source = wn.model.get("Stock Entry Detail",
|
||||
if(frappe.user_roles.indexOf("Material Manager")==-1) {
|
||||
var restricted_in_source = frappe.model.get_list("Stock Entry Detail",
|
||||
{parent:cur_frm.doc.name, s_warehouse:"Restricted"});
|
||||
|
||||
var restricted_in_target = wn.model.get("Stock Entry Detail",
|
||||
{parent:cur_frm.doc.name, t_warehouse:"Restricted"})
|
||||
var restricted_in_target = frappe.model.get_list("Stock Entry Detail",
|
||||
{parent:cur_frm.doc.name, t_warehouse:"Restricted"});
|
||||
|
||||
if(restricted_in_source.length || restricted_in_target.length) {
|
||||
msgprint("Only Material Manager can make entry in Restricted Warehouse");
|
||||
validated = false;
|
||||
frappe.msgprint(__("Only Material Manager can make entry in Restricted Warehouse"));
|
||||
frappe.validated = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,4 @@ Dieses Werkzeug ermöglicht es Ihnen, gleichzeitig mehrere Datensätze umzubenen
|
||||
|
||||
Um mehrere Datensätze umzubenennen, laden Sie eine CSV-Datei mit den alten Namen in der ersten Spalte und den neuen Namen in der zweiten Spalte hoch indem Sie auf "Hochladen" klicken.
|
||||
|
||||
<img class="screenshot" alt="Bulk Rename" src="{{docs_base_url}}/assets/img/setup/data/rename.png">
|
||||
|
||||
{next}
|
||||
<img class="screenshot" alt="Bulk Rename" src="{{docs_base_url}}/assets/img/setup/data/rename.png">
|
@ -23,6 +23,4 @@ Local, Pharmaceutical, Raw material, Services etc.
|
||||
Classifying your supplier into different types facilitates accounting and
|
||||
payments.
|
||||
|
||||
Type your new supplier category and Save.
|
||||
|
||||
{next}
|
||||
Type your new supplier category and Save.
|
@ -3,8 +3,8 @@
|
||||
|
||||
frappe.ui.form.on("Task", "validate", function(frm) {
|
||||
if (frm.doc.from_date < get_today()) {
|
||||
msgprint(__("You can not select past date in From Date"));
|
||||
validated = false;
|
||||
frappe.msgprint(__("You can not select past date in From Date"));
|
||||
frappe.validated = false;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -3,12 +3,12 @@ Add a handler to `custom_before_cancel` event:
|
||||
|
||||
|
||||
cur_frm.cscript.custom_before_cancel = function(doc) {
|
||||
if (user_roles.indexOf("Accounts User")!=-1 && user_roles.indexOf("Accounts Manager")==-1
|
||||
if (frappe.user_roles.indexOf("Accounts User")!=-1 && frappe.user_roles.indexOf("Accounts Manager")==-1
|
||||
&& user_roles.indexOf("System Manager")==-1) {
|
||||
if (flt(doc.grand_total) > 10000) {
|
||||
msgprint("You can not cancel this transaction, because grand total \
|
||||
frappe.msgprint("You can not cancel this transaction, because grand total \
|
||||
is greater than 10000");
|
||||
validated = false;
|
||||
frappe.validated = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
frappe.ui.form.on("Material Request", "validate", function(frm) {
|
||||
if(user=="user1@example.com" && frm.doc.purpose!="Material Receipt") {
|
||||
msgprint("You are only allowed Material Receipt");
|
||||
throw "Not allowed";
|
||||
if(frappe.user=="user1@example.com" && frm.doc.purpose!="Material Receipt") {
|
||||
frappe.msgprint("You are only allowed Material Receipt");
|
||||
frappe.throw(__("Not allowed"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
|
||||
// restrict certain warehouse to Material Manager
|
||||
cur_frm.cscript.custom_validate = function(doc) {
|
||||
if(user_roles.indexOf("Material Manager")==-1) {
|
||||
if(frappe.user_roles.indexOf("Material Manager")==-1) {
|
||||
|
||||
var restricted_in_source = wn.model.get("Stock Entry Detail",
|
||||
var restricted_in_source = frappe.model.get_list("Stock Entry Detail",
|
||||
{parent:cur_frm.doc.name, s_warehouse:"Restricted"});
|
||||
|
||||
var restricted_in_target = wn.model.get("Stock Entry Detail",
|
||||
var restricted_in_target = frappe.model.get_list("Stock Entry Detail",
|
||||
{parent:cur_frm.doc.name, t_warehouse:"Restricted"})
|
||||
|
||||
if(restricted_in_source.length || restricted_in_target.length) {
|
||||
msgprint("Only Material Manager can make entry in Restricted Warehouse");
|
||||
frappe.msgprint(__("Only Material Manager can make entry in Restricted Warehouse"));
|
||||
validated = false;
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,4 @@ This tool will allow you to rename multiple records at the same time.
|
||||
|
||||
To rename multiple records, upload a **.csv** file with the old name in the first column and the new name in the second column and click on **Upload**.
|
||||
|
||||
<img class="screenshot" alt="Bulk Rename" src="{{docs_base_url}}/assets/img/setup/data/rename.png">
|
||||
|
||||
{next}
|
||||
<img class="screenshot" alt="Bulk Rename" src="{{docs_base_url}}/assets/img/setup/data/rename.png">
|
@ -22,4 +22,6 @@ Select DocType which you want to rename. Here DocType will be Item. Then Browse
|
||||
|
||||

|
||||
|
||||
{next}
|
||||
|
||||
<!-- markdown -->
|
Loading…
x
Reference in New Issue
Block a user