Doctype: JobCard Child Doctype field name on parent : invoice_item frappe.ui.form.on('JobCard', { validate: function(frm,cdt,cdn) { set_total_invoice(frm); } }); function set_total_invoice(frm) { var doc = locals[frm.doc.doctype][frm.doc.name]; var total_invoice = 0;...
Frappe Framework
Frappe Inwords
{{ frappe.utils.money_in_words(doc.base_paid_amount or doc.base_received_amount) }}
Stock Report With Image
var intervalId = window.setInterval(function(){ populate_images(); }, 1000); function populate_images() { // This assumes the images go into the first column. $('.dt-cell__content--col-1').map(function(i,el) { var content = $(el).html().trim(); if...
Add Button to Form to Open Hyperlink for Item
When the user pastes the URL in the Data field and then clicks the Button then will open the link according. frappe.ui.form.on('Item', { button_field_name: function(frm) { var openlink = window.open(frm.doc.your_data_field); } }); Button: button_field_name Data...
Multiple naming series
Below example is of Sales Invoice if Is return is marked the series will be of the CN-0001 or else the series will be SI-0001 frappe.ui.form.on("Sales Invoice", { before_save(frm) { if(frm.doc.__islocal == 1){ if(frm.doc.is_return == 1){...
How to install Frappe Framework on Ubuntu 20.x
Make server upto date sudo apt update sudo apt -y upgrade Install python 3.x sudo apt -y install python3-minimal Check Python version python3 -V Install other dependencies sudo apt -y install git build-essential software-properties-common python3-setuptools python-dev...
How to add Button link in Document Form View ? – Frappe Framework
The following steps allow placing a direct link to a specific print format on the document form view using the button. Step 1: Open the Current print preview page and click on pdf option and copy the URL Step 2 frappe.ui.form.on("Doctype Name", "refresh",...
How to add Button link in Doctype list View ? – Frappe Framework
How to add Button link in Doctype list View ? {Direct link to specific Print Format} - Frappe Framework Step 1: Add the client script for on list view as below This feature for apply to List is only available on Version 13 frappe.listview_settings['Invoice'] = {...