[docs] add headings

This commit is contained in:
Rushabh Mehta
2017-07-31 16:20:43 +05:30
parent 40d3ad2bb4
commit 95349fe360
325 changed files with 654 additions and 17 deletions

View File

@@ -1,3 +1,5 @@
# Custom Script Fetch Values From Master
To pull a value of a link on selection, use the `add_fetch` method.

View File

@@ -1,3 +1,5 @@
# Generate Item Code Based On Custom Logic
Add this in the Custom Script of **Item**, so that the new Item Code is
generated just before the a new Item is saved.

View File

@@ -1,3 +1,5 @@
# Custom Script Examples
### How to Create a Custom Script
Create a Custom Script (you must have System Manager role for this):

View File

@@ -1,3 +1,5 @@
# Make Read Only After Saving
Use the method `cur_frm.set_df_property` to update the field's display.
In this script we also use the `__islocal` property of the doc to check if the

View File

@@ -1,3 +1,5 @@
# Restrict Cancel Rights
Add a handler to `custom_before_cancel` event:

View File

@@ -1,3 +1,5 @@
# Restrict Purpose Of Stock Entry
frappe.ui.form.on("Material Request", "validate", function(frm) {
if(frappe.user=="user1@example.com" && frm.doc.purpose!="Material Receipt") {

View File

@@ -1,3 +1,5 @@
# Restrict User Based On Child Record
// restrict certain warehouse to Material Manager
cur_frm.cscript.custom_validate = function(doc) {

View File

@@ -1,3 +1,5 @@
# Sales Invoice Id Based On Sales Order Id
Below script allows you to get naming series in Sales Invoice, same as of corresponding Sales Order.
Invoice uses a prefix M- but the number duplicates the SO doc name (number).

View File

@@ -1,3 +1,5 @@
# Update Date Field Based On Value In Other Date Field
Below script would auto-set value for the date field, based on the value in another date field.
Example: Production Due Date must be set as two days before Delivery Date. If you have Production Due Date field already, with field type as Date, as per the below given script, date will be auto-updated in it, two days prior Deliver Date.