feat: add desk link child table

This commit is contained in:
Shivam Mishra 2020-11-17 12:15:13 +05:30
parent e727e0a85f
commit 48c676f8dd
4 changed files with 130 additions and 2 deletions

View file

@ -0,0 +1,111 @@
{
"actions": [],
"creation": "2020-11-16 15:30:45.784417",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"type",
"label",
"icon",
"hidden",
"link_details_section",
"link_type",
"link_to",
"column_break_7",
"only_for",
"onboard",
"is_query_report"
],
"fields": [
{
"default": "Link",
"fieldname": "type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Type",
"options": "Link\nCard Break",
"reqd": 1
},
{
"fieldname": "label",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Label",
"reqd": 1
},
{
"depends_on": "eval:doc.type == \"Card Break\"",
"fieldname": "icon",
"fieldtype": "Data",
"label": "Icon"
},
{
"default": "0",
"depends_on": "eval:doc.type == \"Card Break\"",
"fieldname": "hidden",
"fieldtype": "Check",
"label": "Hidden"
},
{
"depends_on": "eval:doc.type == \"Link\"",
"fieldname": "link_details_section",
"fieldtype": "Section Break",
"label": "Link Details"
},
{
"fieldname": "link_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Link Type",
"mandatory_depends_on": "eval:doc.type==\"Link\"",
"options": "DocType\nPage\nReport",
"read_only_depends_on": "eval:doc.type!=\"Link\""
},
{
"fieldname": "link_to",
"fieldtype": "Dynamic Link",
"in_list_view": 1,
"label": "Link To",
"mandatory_depends_on": "eval:doc.type==\"Link\"",
"options": "link_type",
"read_only_depends_on": "eval:doc.type!=\"Link\""
},
{
"fieldname": "column_break_7",
"fieldtype": "Column Break"
},
{
"fieldname": "only_for",
"fieldtype": "Link",
"label": "Only for ",
"options": "Country"
},
{
"default": "0",
"fieldname": "onboard",
"fieldtype": "Check",
"label": "Onboard"
},
{
"default": "0",
"depends_on": "eval:doc.link_type == \"Report\"",
"fieldname": "is_query_report",
"fieldtype": "Check",
"label": "Is Query Report"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2020-11-17 12:14:20.309863",
"modified_by": "Administrator",
"module": "Desk",
"name": "Desk Link",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View file

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class DeskLink(Document):
pass

View file

@ -31,7 +31,8 @@
"shortcuts",
"section_break_18",
"cards_label",
"cards"
"cards",
"links"
],
"fields": [
{
@ -203,10 +204,16 @@
"fieldname": "icon",
"fieldtype": "Data",
"label": "Icon"
},
{
"fieldname": "links",
"fieldtype": "Table",
"label": "Links",
"options": "Desk Link"
}
],
"links": [],
"modified": "2020-07-08 12:48:43.845930",
"modified": "2020-11-17 12:14:48.950323",
"modified_by": "Administrator",
"module": "Desk",
"name": "Desk Page",