[docs] add headings
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# Custom Script Fetch Values From Master
|
||||
|
||||
To pull a value of a link on selection, use the `add_fetch` method.
|
||||
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Restrict Cancel Rights
|
||||
|
||||
Add a handler to `custom_before_cancel` event:
|
||||
|
||||
|
||||
|
||||
@@ -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") {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Restrict User Based On Child Record
|
||||
|
||||
|
||||
// restrict certain warehouse to Material Manager
|
||||
cur_frm.cscript.custom_validate = function(doc) {
|
||||
|
||||
@@ -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).
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user