ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Datatable Inline Editing & Other Options


Hi everyone,

I’m writing a custom script report on v11 which I believe is using Frappe’s very own datatable. I understand that it supports lots of options, including inline editing. May I know where should i indicate those options? I tried doing it at the columns code block but can’t make it work.

Below are my codes.

Python file

from __future__ import unicode_literals
import frappe

def execute(filters=None):
	columns = get_columns(filters)
	data = get_data(filters, columns)
	return columns, data

def get_columns(filters):
	columns = [{
		"fieldname": "supplier_name",
		"label": "Supplier Name",
		"fieldtype": "Link",
		"options": "Rebate Supplier",
		"fieldname": "franchisee_name",
		"label": "Franchisee Name",
		"fieldtype": "Link",
		"options": "Rebate Franchisee",
		"fieldname": "year",
		"label": "Year",
		"fieldtype": "Data",
		"fieldname": "cy_jan_transaction",
		"label": "Jan",
		"fieldtype": "Float",
		"editable": "true",
		"resizable": "false",

	return columns

def get_data(filters, columns):
	data = []

	data = frappe.get_all(
		'Rebate Supplier Transaction', 

	return data

Javascript file

frappe.query_reports["Rebate Report"] = {
	"filters": [
			"label":"Supplier Name",
			"options":"Rebate Supplier"

I would like the field “cy_jan_transaction” be editable.

Appreciate your guidance. Thank you.