mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 06:29:20 +00:00
Merge pull request #9208 from mbauskar/docs
removed {next} from documentation and removed the globals from custom scripts
This commit is contained in:
@@ -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.
|
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.
|
Geben Sie Ihre neue Lieferantenkategorie ein und speichern Sie.
|
||||||
|
|
||||||
{next}
|
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
frappe.ui.form.on("Event", "validate", function(frm) {
|
frappe.ui.form.on("Event", "validate", function(frm) {
|
||||||
if (frm.doc.from_date < get_today()) {
|
if (frm.doc.from_date < get_today()) {
|
||||||
msgprint(__("You can not select past date in From Date"));
|
frappe.msgprint(__("You can not select past date in From Date"));
|
||||||
throw "past date selected"
|
frappe.throw(__("past date selected"))
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
Fügen Sie dem Ereignis custom_before_cancel eine Steuerungsfunktion hinzu:
|
Fügen Sie dem Ereignis custom_before_cancel eine Steuerungsfunktion hinzu:
|
||||||
|
|
||||||
cur_frm.cscript.custom_before_cancel = function(doc) {
|
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) {
|
&& user_roles.indexOf("System Manager")==-1) {
|
||||||
if (flt(doc.grand_total) > 10000) {
|
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");
|
is greater than 10000");
|
||||||
validated = false;
|
frappe.validated = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
frappe.ui.form.on("Material Request", "validate", function(frm) {
|
frappe.ui.form.on("Material Request", "validate", function(frm) {
|
||||||
if(user=="user1@example.com" && frm.doc.purpose!="Material Receipt") {
|
if(user=="user1@example.com" && frm.doc.purpose!="Material Receipt") {
|
||||||
msgprint("You are only allowed Material Receipt");
|
frappe.msgprint("You are only allowed Material Receipt");
|
||||||
throw "Not allowed";
|
frappe.throw(__("Not allowed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,17 +3,16 @@
|
|||||||
|
|
||||||
// restrict certain warehouse to Material Manager
|
// restrict certain warehouse to Material Manager
|
||||||
cur_frm.cscript.custom_validate = function(doc) {
|
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 = frappe.model.get_list("Stock Entry Detail",
|
||||||
var restricted_in_source = wn.model.get("Stock Entry Detail",
|
|
||||||
{parent:cur_frm.doc.name, s_warehouse:"Restricted"});
|
{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"})
|
{parent:cur_frm.doc.name, t_warehouse:"Restricted"});
|
||||||
|
|
||||||
if(restricted_in_source.length || restricted_in_target.length) {
|
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;
|
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.
|
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">
|
<img class="screenshot" alt="Bulk Rename" src="{{docs_base_url}}/assets/img/setup/data/rename.png">
|
||||||
|
|
||||||
{next}
|
|
||||||
@@ -23,6 +23,4 @@ Local, Pharmaceutical, Raw material, Services etc.
|
|||||||
Classifying your supplier into different types facilitates accounting and
|
Classifying your supplier into different types facilitates accounting and
|
||||||
payments.
|
payments.
|
||||||
|
|
||||||
Type your new supplier category and Save.
|
Type your new supplier category and Save.
|
||||||
|
|
||||||
{next}
|
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
frappe.ui.form.on("Task", "validate", function(frm) {
|
frappe.ui.form.on("Task", "validate", function(frm) {
|
||||||
if (frm.doc.from_date < get_today()) {
|
if (frm.doc.from_date < get_today()) {
|
||||||
msgprint(__("You can not select past date in From Date"));
|
frappe.msgprint(__("You can not select past date in From Date"));
|
||||||
validated = false;
|
frappe.validated = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ Add a handler to `custom_before_cancel` event:
|
|||||||
|
|
||||||
|
|
||||||
cur_frm.cscript.custom_before_cancel = function(doc) {
|
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) {
|
&& user_roles.indexOf("System Manager")==-1) {
|
||||||
if (flt(doc.grand_total) > 10000) {
|
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");
|
is greater than 10000");
|
||||||
validated = false;
|
frappe.validated = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
frappe.ui.form.on("Material Request", "validate", function(frm) {
|
frappe.ui.form.on("Material Request", "validate", function(frm) {
|
||||||
if(user=="user1@example.com" && frm.doc.purpose!="Material Receipt") {
|
if(frappe.user=="user1@example.com" && frm.doc.purpose!="Material Receipt") {
|
||||||
msgprint("You are only allowed Material Receipt");
|
frappe.msgprint("You are only allowed Material Receipt");
|
||||||
throw "Not allowed";
|
frappe.throw(__("Not allowed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
|
|
||||||
// restrict certain warehouse to Material Manager
|
// restrict certain warehouse to Material Manager
|
||||||
cur_frm.cscript.custom_validate = function(doc) {
|
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"});
|
{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"})
|
{parent:cur_frm.doc.name, t_warehouse:"Restricted"})
|
||||||
|
|
||||||
if(restricted_in_source.length || restricted_in_target.length) {
|
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;
|
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**.
|
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">
|
<img class="screenshot" alt="Bulk Rename" src="{{docs_base_url}}/assets/img/setup/data/rename.png">
|
||||||
|
|
||||||
{next}
|
|
||||||
@@ -22,4 +22,6 @@ Select DocType which you want to rename. Here DocType will be Item. Then Browse
|
|||||||
|
|
||||||

|

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