From ffbd7b40879a092ca66fcfb5a4829ffcff0f9f8a Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Tue, 21 Jul 2020 19:40:18 +0530 Subject: [PATCH] fix: move Video DocType from Core to Utilities module --- erpnext/utilities/doctype/video/__init__.py | 0 erpnext/utilities/doctype/video/test_video.py | 10 ++ erpnext/utilities/doctype/video/video.js | 8 ++ erpnext/utilities/doctype/video/video.json | 106 ++++++++++++++++++ erpnext/utilities/doctype/video/video.py | 10 ++ 5 files changed, 134 insertions(+) create mode 100644 erpnext/utilities/doctype/video/__init__.py create mode 100644 erpnext/utilities/doctype/video/test_video.py create mode 100644 erpnext/utilities/doctype/video/video.js create mode 100644 erpnext/utilities/doctype/video/video.json create mode 100644 erpnext/utilities/doctype/video/video.py diff --git a/erpnext/utilities/doctype/video/__init__.py b/erpnext/utilities/doctype/video/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/utilities/doctype/video/test_video.py b/erpnext/utilities/doctype/video/test_video.py new file mode 100644 index 0000000000..33ea31c919 --- /dev/null +++ b/erpnext/utilities/doctype/video/test_video.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestVideo(unittest.TestCase): + pass diff --git a/erpnext/utilities/doctype/video/video.js b/erpnext/utilities/doctype/video/video.js new file mode 100644 index 0000000000..056bd3ccd6 --- /dev/null +++ b/erpnext/utilities/doctype/video/video.js @@ -0,0 +1,8 @@ +// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Video', { + // refresh: function(frm) { + + // } +}); diff --git a/erpnext/utilities/doctype/video/video.json b/erpnext/utilities/doctype/video/video.json new file mode 100644 index 0000000000..5d2cc13348 --- /dev/null +++ b/erpnext/utilities/doctype/video/video.json @@ -0,0 +1,106 @@ +{ + "actions": [], + "allow_import": 1, + "allow_rename": 1, + "autoname": "field:title", + "creation": "2018-10-17 05:47:13.087395", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "title", + "provider", + "url", + "column_break_4", + "publish_date", + "duration", + "section_break_7", + "description" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Title", + "reqd": 1, + "unique": 1 + }, + { + "fieldname": "provider", + "fieldtype": "Select", + "in_list_view": 1, + "label": "Provider", + "options": "YouTube\nVimeo", + "reqd": 1 + }, + { + "fieldname": "url", + "fieldtype": "Data", + "in_list_view": 1, + "label": "URL", + "reqd": 1 + }, + { + "fieldname": "column_break_4", + "fieldtype": "Column Break" + }, + { + "fieldname": "publish_date", + "fieldtype": "Date", + "label": "Publish Date" + }, + { + "fieldname": "duration", + "fieldtype": "Data", + "label": "Duration" + }, + { + "fieldname": "section_break_7", + "fieldtype": "Section Break" + }, + { + "fieldname": "description", + "fieldtype": "Text Editor", + "in_list_view": 1, + "label": "Description", + "reqd": 1 + } + ], + "links": [], + "modified": "2020-07-21 19:29:46.603734", + "modified_by": "Administrator", + "module": "Utilities", + "name": "Video", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "All", + "share": 1, + "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/erpnext/utilities/doctype/video/video.py b/erpnext/utilities/doctype/video/video.py new file mode 100644 index 0000000000..3c17b560f3 --- /dev/null +++ b/erpnext/utilities/doctype/video/video.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class Video(Document): + pass