https://github.com/t1m0n/air-datepicker Docs : http://t1m0n.name/air-datepicker/docs/
include in html template
https://github.com/t1m0n/air-datepicker Docs : http://t1m0n.name/air-datepicker/docs/
include in html template
Hack to use Tabulator http://tabulator.info datagrid to display data inside frappe script reports. Check the several advanced features in Tabulator http://tabulator.info/docs/4.9.
async function timer (seconds) {
return new Promise(resolve => setTimeout(resolve, seconds * 1000))
}
// Usage
...
await timer(0.5)
...
from __future__ import unicode_literals | |
import frappe | |
from frappe import _ | |
from frappe.utils import getdate | |
import json | |
def execute(filters=None): | |
priority_map = {"High": 3, "Medium": 2, "Low": 1} |
frappe.provide("frappe.views"); | |
frappe.ui.form.on("Tab Report", { | |
onload: function (frm) { | |
if (!frm.is_new()) { | |
frm.tab_report = new frappe.views.TabReport({ frm: frm }); | |
frm.tab_report.show(); | |
} | |
}, |
prepare_report_data(data) { | |
this.data = data; | |
// prepare columns | |
this.data.columns.forEach((t) => { | |
t.title = t.label; | |
t.field = t.fieldname; | |
}); | |
// set column cell formatter for known fieldtypes, if not provided already in report_settings |
// Copyright (c) 2021, Vijay and contributors | |
// For license information, please see license.txt | |
frappe.provide("frappe.views"); | |
frappe.ui.form.on("Tab Report", { | |
onload: function (frm) { | |
frm.tab_report = new frappe.views.TabReport({ frm: frm }); | |
frm.tab_report.show(); | |
}, |
https://discuss.erpnext.com/t/showing-there-were-error-during-setup-erpnext/21363/19 | |
## setup Schools Domain from bench console py | |
:~$ bench console | |
[1] # substitute your details in args | |
[2] args = { | |
"language":"English (United States)", | |
"country":"India", | |
"timezone":"Asia/Kolkata", |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
//Replace "DocType" with the source DocType | |
frappe.ui.form.on("DocType", { | |
//The trigger can be changed, but refresh must be used to use a button | |
refresh: function(frm) { | |
//The following line creates a button. | |
frm.add_custom_button(__("Update"), | |
//The function below is triggered when the button is pressed. | |
function() { | |
frappe.call({ | |
"method": "frappe.client.set_value", |