Merge pull request #17900 from sobolevn/patch-1
fix: Improves README.md with svg badge
diff --git a/erpnext/accounts/doctype/bank/bank_dashboard.py b/erpnext/accounts/doctype/bank/bank_dashboard.py
new file mode 100644
index 0000000..4324041
--- /dev/null
+++ b/erpnext/accounts/doctype/bank/bank_dashboard.py
@@ -0,0 +1,18 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'bank',
+ 'transactions': [
+ {
+ 'label': _('Bank Deatils'),
+ 'items': ['Bank Account', 'Bank Guarantee']
+ },
+ {
+ 'items': ['Payment Order']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py
new file mode 100644
index 0000000..3d149eb
--- /dev/null
+++ b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py
@@ -0,0 +1,30 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'bank_account',
+ 'non_standard_fieldnames': {
+ 'Customer': 'default_bank_account',
+ 'Supplier': 'default_bank_account',
+ 'Journal Entry': 'bank_account_no'
+ },
+ 'transactions': [
+ {
+ 'label': _('Payments'),
+ 'items': ['Payment Entry', 'Payment Request', 'Payment Order']
+ },
+ {
+ 'label': _('Party'),
+ 'items': ['Customer', 'Supplier']
+ },
+ {
+ 'items': ['Bank Guarantee']
+ },
+ {
+ 'items': ['Journal Entry']
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py b/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py
new file mode 100644
index 0000000..788ac8b
--- /dev/null
+++ b/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py
@@ -0,0 +1,15 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'cost_center',
+ 'reports': [
+ {
+ 'label': _('Reports'),
+ 'items': ['Budget Variance Report', 'General Ledger']
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/finance_book/finance_book_dashboard.py b/erpnext/accounts/doctype/finance_book/finance_book_dashboard.py
new file mode 100644
index 0000000..c2ebea6
--- /dev/null
+++ b/erpnext/accounts/doctype/finance_book/finance_book_dashboard.py
@@ -0,0 +1,25 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'finance_book',
+ 'non_standard_fieldnames': {
+ 'Asset': 'default_finance_book',
+ 'Company': 'default_finance_book'
+ },
+ 'transactions': [
+ {
+ 'label': _('Assets'),
+ 'items': ['Asset', 'Asset Value Adjustment']
+ },
+ {
+ 'items': ['Company']
+ },
+ {
+ 'items': ['Journal Entry']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year_dashboard.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year_dashboard.py
new file mode 100644
index 0000000..c7604ec
--- /dev/null
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year_dashboard.py
@@ -0,0 +1,23 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'fiscal_year',
+ 'transactions': [
+ {
+ 'label': _('Budgets'),
+ 'items': ['Budget']
+ },
+ {
+ 'label': _('References'),
+ 'items': ['Period Closing Voucher', 'Request for Quotation', 'Tax Withholding Category']
+ },
+ {
+ 'label': _('Target Details'),
+ 'items': ['Sales Person', 'Sales Partner', 'Territory', 'Monthly Distribution']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/item_tax_template/item_tax_template_dashboard.py b/erpnext/accounts/doctype/item_tax_template/item_tax_template_dashboard.py
new file mode 100644
index 0000000..acc308e
--- /dev/null
+++ b/erpnext/accounts/doctype/item_tax_template/item_tax_template_dashboard.py
@@ -0,0 +1,26 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'item_tax_template',
+ 'transactions': [
+ {
+ 'label': _('Pre Sales'),
+ 'items': ['Quotation', 'Supplier Quotation']
+ },
+ {
+ 'label': _('Sales'),
+ 'items': ['Sales Invoice', 'Sales Order', 'Delivery Note']
+ },
+ {
+ 'label': _('Purchase'),
+ 'items': ['Purchase Invoice', 'Purchase Order', 'Purchase Receipt']
+ },
+ {
+ 'items': ['Item']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index 9be30aa..b7f383f 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -25,13 +25,13 @@
"group_by_voucher": 0
};
frappe.set_route("query-report", "General Ledger");
- }, "fa fa-table");
+ }, __('View'));
}
if(frm.doc.docstatus==1) {
frm.add_custom_button(__('Reverse Journal Entry'), function() {
return erpnext.journal_entry.reverse_journal_entry(frm);
- });
+ }, __('Make'));
}
if (frm.doc.__islocal) {
@@ -47,8 +47,7 @@
frm.add_custom_button(__("Create Inter Company Journal Entry"),
function() {
frm.trigger("make_inter_company_journal_entry");
- }
- );
+ }, __('Make'));
}
},
diff --git a/erpnext/accounts/doctype/loyalty_program/loyalty_program_dashboard.py b/erpnext/accounts/doctype/loyalty_program/loyalty_program_dashboard.py
new file mode 100644
index 0000000..189004f
--- /dev/null
+++ b/erpnext/accounts/doctype/loyalty_program/loyalty_program_dashboard.py
@@ -0,0 +1,14 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'loyalty_program',
+ 'transactions': [
+ {
+ 'items': ['Sales Invoice', 'Customer']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py
new file mode 100644
index 0000000..a679499
--- /dev/null
+++ b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py
@@ -0,0 +1,23 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'monthly_distribution',
+ 'non_standard_fieldnames': {
+ 'Sales Person': 'distribution_id',
+ 'Territory': 'distribution_id',
+ 'Sales Partner': 'distribution_id',
+ },
+ 'transactions': [
+ {
+ 'label': _('Target Details'),
+ 'items': ['Sales Person', 'Territory', 'Sales Partner']
+ },
+ {
+ 'items': ['Budget']
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js
index c742e64..4d8da37 100644
--- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js
+++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js
@@ -10,6 +10,22 @@
}
};
});
+
+ frm.set_query('cost_center', 'invoices', function(doc, cdt, cdn) {
+ return {
+ filters: {
+ 'company': doc.company
+ }
+ };
+ });
+
+ frm.set_query('cost_center', function(doc) {
+ return {
+ filters: {
+ 'company': doc.company
+ }
+ };
+ });
},
refresh: function(frm) {
@@ -84,6 +100,11 @@
if (!row.temporary_opening_account) {
row.temporary_opening_account = frm.doc.__onload.temporary_opening_account;
}
+
+ if(!row.cost_center) {
+ row.cost_center = frm.doc.cost_center;
+ }
+
row.party_type = frm.doc.invoice_type == "Sales"? "Customer": "Supplier";
});
}
diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.json b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.json
index dca07ff..7d2d5a1 100644
--- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.json
+++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.json
@@ -1,244 +1,86 @@
{
- "allow_copy": 1,
- "allow_guest_to_view": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 1,
- "creation": "2017-08-29 02:22:54.947711",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "",
- "editable_grid": 1,
- "engine": "InnoDB",
+ "allow_copy": 1,
+ "beta": 1,
+ "creation": "2017-08-29 02:22:54.947711",
+ "doctype": "DocType",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+ "company",
+ "create_missing_party",
+ "column_break_3",
+ "invoice_type",
+ "cost_center",
+ "section_break_4",
+ "invoices"
+ ],
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "company",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Company",
- "length": 0,
- "no_copy": 0,
- "options": "Company",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Company",
+ "options": "Company",
+ "reqd": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "Create missing customer or supplier.",
- "fieldname": "create_missing_party",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Create Missing Party",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "default": "0",
+ "description": "Create missing customer or supplier.",
+ "fieldname": "create_missing_party",
+ "fieldtype": "Check",
+ "label": "Create Missing Party"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "invoice_type",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Invoice Type",
- "length": 0,
- "no_copy": 0,
- "options": "Sales\nPurchase",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "invoice_type",
+ "fieldtype": "Select",
+ "in_list_view": 1,
+ "label": "Invoice Type",
+ "options": "Sales\nPurchase",
+ "reqd": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "section_break_4",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Invoices",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "section_break_4",
+ "fieldtype": "Section Break",
+ "label": "Invoices"
+ },
{
- "allow_bulk_edit": 1,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "invoices",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "options": "Opening Invoice Creation Tool Item",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
+ "allow_bulk_edit": 1,
+ "fieldname": "invoices",
+ "fieldtype": "Table",
+ "options": "Opening Invoice Creation Tool Item",
+ "reqd": 1
+ },
+ {
+ "fieldname": "cost_center",
+ "fieldtype": "Link",
+ "label": "Cost Center",
+ "options": "Cost Center"
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 1,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 1,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2018-02-14 17:59:35.269118",
- "modified_by": "Administrator",
- "module": "Accounts",
- "name": "Opening Invoice Creation Tool",
- "name_case": "",
- "owner": "Administrator",
+ ],
+ "hide_toolbar": 1,
+ "issingle": 1,
+ "modified": "2019-06-13 11:45:31.405267",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Opening Invoice Creation Tool",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 0,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 0,
- "role": "System Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
+ "create": 1,
+ "email": 1,
+ "print": 1,
+ "read": 1,
+ "role": "System Manager",
+ "share": 1,
"write": 1
}
- ],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "show_name_in_global_search": 0,
- "sort_field": "modified",
- "sort_order": "DESC",
- "track_changes": 1,
- "track_seen": 0
+ ],
+ "quick_entry": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
index b2c31ce..5fa7b48 100644
--- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
+++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
@@ -129,7 +129,9 @@
def get_invoice_dict(self, row=None):
def get_item_dict():
default_uom = frappe.db.get_single_value("Stock Settings", "stock_uom") or _("Nos")
- cost_center = frappe.get_cached_value('Company', self.company, "cost_center")
+ cost_center = row.get('cost_center') or frappe.get_cached_value('Company',
+ self.company, "cost_center")
+
if not cost_center:
frappe.throw(
_("Please set the Default Cost Center in {0} company.").format(frappe.bold(self.company))
@@ -163,6 +165,7 @@
"is_opening": "Yes",
"set_posting_time": 1,
"company": self.company,
+ "cost_center": self.cost_center,
"due_date": row.due_date,
"posting_date": row.posting_date,
frappe.scrub(party_type): row.party,
diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.json b/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.json
index 83dcffc..afa7229 100644
--- a/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.json
+++ b/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.json
@@ -1,378 +1,108 @@
{
- "allow_copy": 0,
- "allow_guest_to_view": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
- "creation": "2017-08-29 04:26:36.159247",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "",
- "editable_grid": 1,
- "engine": "InnoDB",
+ "creation": "2017-08-29 04:26:36.159247",
+ "doctype": "DocType",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+ "party_type",
+ "party",
+ "temporary_opening_account",
+ "column_break_3",
+ "posting_date",
+ "due_date",
+ "section_break_5",
+ "item_name",
+ "outstanding_amount",
+ "column_break_4",
+ "qty",
+ "cost_center"
+ ],
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "party_type",
- "fieldtype": "Link",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Party Type",
- "length": 0,
- "no_copy": 0,
- "options": "DocType",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "party_type",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "label": "Party Type",
+ "options": "DocType",
+ "read_only": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "party",
- "fieldtype": "Dynamic Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Party",
- "length": 0,
- "no_copy": 0,
- "options": "party_type",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "party",
+ "fieldtype": "Dynamic Link",
+ "in_list_view": 1,
+ "label": "Party",
+ "options": "party_type",
+ "reqd": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "temporary_opening_account",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Temporary Opening Account",
- "length": 0,
- "no_copy": 0,
- "options": "Account",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "temporary_opening_account",
+ "fieldtype": "Link",
+ "label": "Temporary Opening Account",
+ "options": "Account"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "Today",
- "fieldname": "posting_date",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Posting Date",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "default": "Today",
+ "fieldname": "posting_date",
+ "fieldtype": "Date",
+ "in_list_view": 1,
+ "label": "Posting Date"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "Today",
- "fieldname": "due_date",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Due Date",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "default": "Today",
+ "fieldname": "due_date",
+ "fieldtype": "Date",
+ "in_list_view": 1,
+ "label": "Due Date"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "section_break_5",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "section_break_5",
+ "fieldtype": "Section Break"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "Opening Invoice Item",
- "fieldname": "item_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Item Name",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "default": "Opening Invoice Item",
+ "fieldname": "item_name",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Item Name"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "0",
- "fieldname": "outstanding_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Outstanding Amount",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "default": "0",
+ "fieldname": "outstanding_amount",
+ "fieldtype": "Currency",
+ "in_list_view": 1,
+ "label": "Outstanding Amount",
+ "reqd": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_4",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
+ "fieldname": "column_break_4",
+ "fieldtype": "Column Break"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "1",
- "fieldname": "qty",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Quantity",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
+ "default": "1",
+ "fieldname": "qty",
+ "fieldtype": "Data",
+ "label": "Quantity"
+ },
+ {
+ "fieldname": "cost_center",
+ "fieldtype": "Link",
+ "label": "Cost Center",
+ "options": "Cost Center"
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 1,
- "max_attachments": 0,
- "modified": "2017-12-19 05:07:01.549918",
- "modified_by": "Administrator",
- "module": "Accounts",
- "name": "Opening Invoice Creation Tool Item",
- "name_case": "",
- "owner": "Administrator",
- "permissions": [],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "show_name_in_global_search": 0,
- "sort_field": "modified",
- "sort_order": "DESC",
- "track_changes": 1,
- "track_seen": 0
+ ],
+ "istable": 1,
+ "modified": "2019-06-13 11:48:08.324063",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Opening Invoice Creation Tool Item",
+ "owner": "Administrator",
+ "permissions": [],
+ "quick_entry": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account_dashboard.py b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account_dashboard.py
new file mode 100644
index 0000000..0898229
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account_dashboard.py
@@ -0,0 +1,20 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'payment_gateway_account',
+ 'non_standard_fieldnames': {
+ 'Subscription Plan': 'payment_gateway'
+ },
+ 'transactions': [
+ {
+ 'items': ['Payment Request']
+ },
+ {
+ 'items': ['Subscription Plan']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/payment_term/payment_term_dashboard.py b/erpnext/accounts/doctype/payment_term/payment_term_dashboard.py
new file mode 100644
index 0000000..d146fcd
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_term/payment_term_dashboard.py
@@ -0,0 +1,22 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'payment_term',
+ 'transactions': [
+ {
+ 'label': _('Sales'),
+ 'items': ['Sales Invoice', 'Sales Order', 'Quotation']
+ },
+ {
+ 'label': _('Purchase'),
+ 'items': ['Purchase Invoice', 'Purchase Order']
+ },
+ {
+ 'items': ['Payment Terms Template']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py
new file mode 100644
index 0000000..c705097
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py
@@ -0,0 +1,33 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'payment_terms_template',
+ 'non_standard_fieldnames': {
+ 'Customer Group': 'payment_terms',
+ 'Supplier Group': 'payment_terms',
+ 'Supplier': 'payment_terms',
+ 'Customer': 'payment_terms'
+ },
+ 'transactions': [
+ {
+ 'label': _('Sales'),
+ 'items': ['Sales Invoice', 'Sales Order', 'Quotation']
+ },
+ {
+ 'label': _('Purchase'),
+ 'items': ['Purchase Invoice', 'Purchase Order']
+ },
+ {
+ 'label': _('Party'),
+ 'items': ['Customer', 'Supplier']
+ },
+ {
+ 'label': _('Group'),
+ 'items': ['Customer Group', 'Supplier Group']
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile_dashboard.py b/erpnext/accounts/doctype/pos_profile/pos_profile_dashboard.py
new file mode 100644
index 0000000..e28bf73
--- /dev/null
+++ b/erpnext/accounts/doctype/pos_profile/pos_profile_dashboard.py
@@ -0,0 +1,14 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'pos_profile',
+ 'transactions': [
+ {
+ 'items': ['Sales Invoice', 'POS Closing Voucher']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py
new file mode 100644
index 0000000..11c220b
--- /dev/null
+++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py
@@ -0,0 +1,22 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'taxes_and_charges',
+ 'non_standard_fieldnames': {
+ 'Tax Rule': 'purchase_tax_template',
+ },
+ 'transactions': [
+ {
+ 'label': _('Transactions'),
+ 'items': ['Purchase Invoice', 'Purchase Order', 'Purchase Receipt']
+ },
+ {
+ 'label': _('References'),
+ 'items': ['Supplier Quotation', 'Tax Rule']
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index f21fbd9..07494a2 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -384,6 +384,10 @@
me.frm.pos_print_format = r.message.print_format;
}
me.frm.script_manager.trigger("update_stock");
+ if(me.frm.doc.taxes_and_charges) {
+ me.frm.script_manager.trigger("taxes_and_charges");
+ }
+
frappe.model.set_default_values(me.frm.doc);
me.set_dynamic_labels();
me.calculate_taxes_and_totals();
diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py
new file mode 100644
index 0000000..0e9c808
--- /dev/null
+++ b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py
@@ -0,0 +1,24 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'taxes_and_charges',
+ 'non_standard_fieldnames': {
+ 'Tax Rule': 'sales_tax_template',
+ 'Subscription': 'tax_template',
+ 'Restaurant': 'default_tax_template'
+ },
+ 'transactions': [
+ {
+ 'label': _('Transactions'),
+ 'items': ['Sales Invoice', 'Sales Order', 'Delivery Note']
+ },
+ {
+ 'label': _('References'),
+ 'items': ['POS Profile', 'Subscription', 'Restaurant', 'Tax Rule']
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/share_type/share_type_dashboard.py b/erpnext/accounts/doctype/share_type/share_type_dashboard.py
new file mode 100644
index 0000000..455b022
--- /dev/null
+++ b/erpnext/accounts/doctype/share_type/share_type_dashboard.py
@@ -0,0 +1,15 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'share_type',
+ 'transactions': [
+ {
+ 'label': _('References'),
+ 'items': ['Share Transfer', 'Shareholder']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/shareholder/shareholder_dashboard.py b/erpnext/accounts/doctype/shareholder/shareholder_dashboard.py
new file mode 100644
index 0000000..3b77fd5
--- /dev/null
+++ b/erpnext/accounts/doctype/shareholder/shareholder_dashboard.py
@@ -0,0 +1,17 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'shareholder',
+ 'non_standard_fieldnames': {
+ 'Share Transfer': 'to_shareholder'
+ },
+ 'transactions': [
+ {
+ 'items': ['Share Transfer']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/shipping_rule/shipping_rule_dashboard.py b/erpnext/accounts/doctype/shipping_rule/shipping_rule_dashboard.py
new file mode 100644
index 0000000..636ee57
--- /dev/null
+++ b/erpnext/accounts/doctype/shipping_rule/shipping_rule_dashboard.py
@@ -0,0 +1,26 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'shipping_rule',
+ 'non_standard_fieldnames': {
+ 'Payment Entry': 'party_name'
+ },
+ 'transactions': [
+ {
+ 'label': _('Pre Sales'),
+ 'items': ['Quotation', 'Supplier Quotation']
+ },
+ {
+ 'label': _('Sales'),
+ 'items': ['Sales Order', 'Delivery Note', 'Sales Invoice']
+ },
+ {
+ 'label': _('Purchase'),
+ 'items': ['Purchase Invoice', 'Purchase Order', 'Purchase Receipt']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/subscription_plan/subscription_plan_dashboard.py b/erpnext/accounts/doctype/subscription_plan/subscription_plan_dashboard.py
new file mode 100644
index 0000000..df30233
--- /dev/null
+++ b/erpnext/accounts/doctype/subscription_plan/subscription_plan_dashboard.py
@@ -0,0 +1,19 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'subscription_plan',
+ 'non_standard_fieldnames': {
+ 'Payment Request': 'plan',
+ 'Subscription': 'plan'
+ },
+ 'transactions': [
+ {
+ 'label': _('References'),
+ 'items': ['Payment Request', 'Subscription']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/tax_category/tax_category_dashboard.py b/erpnext/accounts/doctype/tax_category/tax_category_dashboard.py
new file mode 100644
index 0000000..d643efb
--- /dev/null
+++ b/erpnext/accounts/doctype/tax_category/tax_category_dashboard.py
@@ -0,0 +1,31 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'tax_category',
+ 'transactions': [
+ {
+ 'label': _('Pre Sales'),
+ 'items': ['Quotation', 'Supplier Quotation']
+ },
+ {
+ 'label': _('Sales'),
+ 'items': ['Sales Invoice', 'Delivery Note', 'Sales Order']
+ },
+ {
+ 'label': _('Purchase'),
+ 'items': ['Purchase Invoice', 'Purchase Receipt']
+ },
+ {
+ 'label': _('Party'),
+ 'items': ['Customer', 'Supplier']
+ },
+ {
+ 'label': _('Taxes'),
+ 'items': ['Item', 'Tax Rule']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category_dashboard.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category_dashboard.py
new file mode 100644
index 0000000..d51ba65
--- /dev/null
+++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category_dashboard.py
@@ -0,0 +1,14 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'tax_withholding_category',
+ 'transactions': [
+ {
+ 'items': ['Supplier']
+ }
+ ]
+ }
diff --git a/erpnext/accounts/report/financial_statements.html b/erpnext/accounts/report/financial_statements.html
index cb853fd..4081723 100644
--- a/erpnext/accounts/report/financial_statements.html
+++ b/erpnext/accounts/report/financial_statements.html
@@ -23,6 +23,9 @@
{% } %}
<h2 class="text-center">{%= __(report.report_name) %}</h2>
<h3 class="text-center">{%= filters.company %}</h3>
+{% if 'cost_center' in filters %}
+ <h3 class="text-center">{%= filters.cost_center %}</h3>
+{% endif %}
<h3 class="text-center">{%= filters.fiscal_year %}</h3>
<h5 class="text-center">{%= __("Currency") %} : {%= filters.presentation_currency || erpnext.get_currency(filters.company) %} </h4>
{% if (filters.from_date) { %}
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py
index 492df4b..307b72d 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.py
+++ b/erpnext/accounts/report/general_ledger/general_ledger.py
@@ -128,7 +128,7 @@
order_by_statement = "order by posting_date, voucher_type, voucher_no"
if filters.get("group_by") == _("Group by Voucher (Consolidated)"):
- group_by_statement = "group by voucher_type, voucher_no, account, cost_center"
+ group_by_statement = "group by voucher_type, voucher_no, account, cost_center, against_voucher"
select_fields = """, sum(debit) as debit, sum(credit) as credit,
sum(debit_in_account_currency) as debit_in_account_currency,
sum(credit_in_account_currency) as credit_in_account_currency"""
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index ccd334f..0dcf077 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -152,6 +152,9 @@
def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=False):
conditions = []
+ if not filters["item_group"]:
+ filters.pop("item_group", None)
+
description_cond = ''
if frappe.db.count('Item', cache=True) < 50000:
# scan description only if items are less than 50000
diff --git a/erpnext/education/doctype/article/article.json b/erpnext/education/doctype/article/article.json
index c30cd18..2fad5af 100644
--- a/erpnext/education/doctype/article/article.json
+++ b/erpnext/education/doctype/article/article.json
@@ -1,230 +1,81 @@
{
- "allow_copy": 0,
- "allow_events_in_timeline": 0,
- "allow_guest_to_view": 0,
"allow_import": 1,
- "allow_rename": 0,
+ "allow_rename": 1,
"autoname": "field:title",
- "beta": 0,
"creation": "2018-10-17 05:45:38.471670",
- "custom": 0,
- "docstatus": 0,
"doctype": "DocType",
- "document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
+ "field_order": [
+ "title",
+ "author",
+ "content",
+ "publish_date"
+ ],
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
"fieldname": "title",
"fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
"label": "Title",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
"unique": 1
},
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
"fieldname": "author",
"fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Author",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
+ "label": "Author"
},
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
"fieldname": "content",
"fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Content",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
+ "label": "Content"
},
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
"fieldname": "publish_date",
"fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Publish Date",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
+ "label": "Publish Date"
}
],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2018-11-25 19:06:56.016865",
+ "modified": "2019-06-12 12:36:58.740340",
"modified_by": "Administrator",
"module": "Education",
"name": "Article",
- "name_case": "",
"owner": "Administrator",
"permissions": [
{
- "amend": 0,
- "cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Academics User",
- "set_user_permissions": 0,
"share": 1,
- "submit": 0,
"write": 1
},
{
- "amend": 0,
- "cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Instructor",
- "set_user_permissions": 0,
"share": 1,
- "submit": 0,
"write": 1
},
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
"email": 1,
"export": 1,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "LMS User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
- "write": 0
+ "share": 1
}
],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
- "track_changes": 1,
- "track_seen": 0,
- "track_views": 0
+ "track_changes": 1
}
\ No newline at end of file
diff --git a/erpnext/education/doctype/course/course.json b/erpnext/education/doctype/course/course.json
index 7d8b073..68426c3 100644
--- a/erpnext/education/doctype/course/course.json
+++ b/erpnext/education/doctype/course/course.json
@@ -1,17 +1,13 @@
{
"allow_import": 1,
"allow_rename": 1,
- "autoname": "field:course_code",
+ "autoname": "field:course_name",
"creation": "2015-09-07 12:39:55.181893",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"course_name",
"department",
- "parent_course",
- "column_break_3",
- "course_code",
- "course_abbreviation",
"section_break_6",
"topics",
"description",
@@ -26,7 +22,8 @@
"fieldtype": "Data",
"in_list_view": 1,
"label": "Course Name",
- "reqd": 1
+ "reqd": 1,
+ "unique": 1
},
{
"fieldname": "department",
@@ -37,30 +34,9 @@
"options": "Department"
},
{
- "fieldname": "parent_course",
- "fieldtype": "Data",
- "label": "Parent Course (Leave blank, if this isn't part of Parent Course)"
- },
- {
- "fieldname": "column_break_3",
- "fieldtype": "Column Break"
- },
- {
- "fieldname": "course_code",
- "fieldtype": "Data",
- "label": "Course Code",
- "reqd": 1,
- "unique": 1
- },
- {
- "fieldname": "course_abbreviation",
- "fieldtype": "Data",
- "in_list_view": 1,
- "label": "Course Abbreviation"
- },
- {
"fieldname": "section_break_6",
- "fieldtype": "Section Break"
+ "fieldtype": "Section Break",
+ "label": "Portal Settings"
},
{
"fieldname": "topics",
@@ -71,6 +47,7 @@
{
"fieldname": "hero_image",
"fieldtype": "Attach Image",
+ "hidden": 1,
"label": "Hero Image"
},
{
@@ -96,7 +73,8 @@
"label": "Description"
}
],
- "modified": "2019-06-05 18:39:11.870605",
+ "image_field": "hero_image",
+ "modified": "2019-06-12 12:34:23.748157",
"modified_by": "Administrator",
"module": "Education",
"name": "Course",
diff --git a/erpnext/education/doctype/course/test_records.json b/erpnext/education/doctype/course/test_records.json
index ec57dc7..1e7467a 100644
--- a/erpnext/education/doctype/course/test_records.json
+++ b/erpnext/education/doctype/course/test_records.json
@@ -1,17 +1,14 @@
[
{
- "course_name": "_Test Course",
- "course_code": "TC100",
+ "course_name": "TC100",
"course_abbreviation": "TC"
},
{
- "course_name": "_Test Course 1",
- "course_code": "TC101",
+ "course_name": "TC101",
"course_abbreviation": "TC1"
},
{
- "course_name": "_Test Course 2",
- "course_code": "TC102",
+ "course_name": "TC102",
"course_abbreviation": "TC2"
}
]
\ No newline at end of file
diff --git a/erpnext/education/doctype/program/program.json b/erpnext/education/doctype/program/program.json
index a0a2aa2..2dfe50b 100644
--- a/erpnext/education/doctype/program/program.json
+++ b/erpnext/education/doctype/program/program.json
@@ -1,7 +1,7 @@
{
"allow_import": 1,
"allow_rename": 1,
- "autoname": "field:program_code",
+ "autoname": "field:program_name",
"creation": "2015-09-07 12:54:03.609282",
"doctype": "DocType",
"engine": "InnoDB",
@@ -9,18 +9,17 @@
"program_name",
"department",
"column_break_3",
- "program_code",
"program_abbreviation",
- "section_break_5",
+ "section_break_courses",
"courses",
- "section_break_9",
- "description",
+ "section_break_5",
+ "is_published",
+ "allow_self_enroll",
+ "is_featured",
+ "column_break_11",
"intro_video",
"hero_image",
- "column_break_11",
- "is_published",
- "is_featured",
- "allow_self_enroll"
+ "description"
],
"fields": [
{
@@ -28,7 +27,8 @@
"fieldtype": "Data",
"in_list_view": 1,
"label": "Program Name",
- "reqd": 1
+ "reqd": 1,
+ "unique": 1
},
{
"fieldname": "department",
@@ -43,13 +43,6 @@
"fieldtype": "Column Break"
},
{
- "fieldname": "program_code",
- "fieldtype": "Data",
- "label": "Program Code",
- "reqd": 1,
- "unique": 1
- },
- {
"fieldname": "program_abbreviation",
"fieldtype": "Data",
"in_list_view": 1,
@@ -67,16 +60,13 @@
"options": "Program Course"
},
{
- "fieldname": "section_break_9",
- "fieldtype": "Section Break",
- "label": "LMS Settings"
- },
- {
+ "depends_on": "is_published",
"fieldname": "description",
"fieldtype": "Small Text",
"label": "Description"
},
{
+ "depends_on": "is_published",
"fieldname": "intro_video",
"fieldtype": "Data",
"label": "Intro Video"
@@ -84,13 +74,10 @@
{
"fieldname": "hero_image",
"fieldtype": "Attach Image",
+ "hidden": 1,
"label": "Hero Image"
},
{
- "fieldname": "column_break_11",
- "fieldtype": "Column Break"
- },
- {
"default": "0",
"fieldname": "is_published",
"fieldtype": "Check",
@@ -106,13 +93,22 @@
{
"default": "0",
"depends_on": "eval: doc.is_published == 1",
- "description": "Allow students to enroll themselves from the portal",
"fieldname": "allow_self_enroll",
"fieldtype": "Check",
"label": "Allow Self Enroll"
+ },
+ {
+ "fieldname": "section_break_courses",
+ "fieldtype": "Section Break",
+ "label": "Courses"
+ },
+ {
+ "fieldname": "column_break_11",
+ "fieldtype": "Column Break"
}
],
- "modified": "2019-06-05 17:47:26.877296",
+ "image_field": "hero_image",
+ "modified": "2019-06-12 12:31:14.999346",
"modified_by": "Administrator",
"module": "Education",
"name": "Program",
diff --git a/erpnext/education/doctype/program/test_records.json b/erpnext/education/doctype/program/test_records.json
index 7901db3..4013695 100644
--- a/erpnext/education/doctype/program/test_records.json
+++ b/erpnext/education/doctype/program/test_records.json
@@ -1,13 +1,11 @@
[
{
- "program_name": "_Test Program 1",
- "program_code": "_TP1",
+ "program_name": "_TP1",
"description": "Test Description",
"program_abbreviation": "TP1"
},
{
- "program_name": "_Test Program 2",
- "program_code": "_TP2",
+ "program_name": "_TP2",
"description": "Test Description",
"program_abbreviation": "TP2"
}
diff --git a/erpnext/education/doctype/program_course/program_course.json b/erpnext/education/doctype/program_course/program_course.json
index 79ef717..3465040 100644
--- a/erpnext/education/doctype/program_course/program_course.json
+++ b/erpnext/education/doctype/program_course/program_course.json
@@ -1,169 +1,39 @@
{
- "allow_copy": 0,
- "allow_guest_to_view": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
- "creation": "2015-09-07 14:37:01.886859",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "",
- "editable_grid": 1,
- "engine": "InnoDB",
+ "creation": "2015-09-07 14:37:01.886859",
+ "doctype": "DocType",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+ "course",
+ "required"
+ ],
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "course",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 1,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Course",
- "length": 0,
- "no_copy": 0,
- "options": "Course",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "fieldname": "course",
+ "fieldtype": "Link",
+ "in_global_search": 1,
+ "in_list_view": 1,
+ "label": "Course",
+ "options": "Course",
+ "reqd": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
- {
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fetch_from": "course.course_name",
- "fieldname": "course_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Course Name",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
- {
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "required",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Mandatory",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
+ "default": "0",
+ "fieldname": "required",
+ "fieldtype": "Check",
+ "in_list_view": 1,
+ "label": "Mandatory"
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 1,
- "max_attachments": 0,
- "menu_index": 0,
- "modified": "2018-05-16 22:42:58.326734",
- "modified_by": "Administrator",
- "module": "Education",
- "name": "Program Course",
- "name_case": "",
- "owner": "Administrator",
- "permissions": [],
- "quick_entry": 0,
- "read_only": 0,
- "read_only_onload": 0,
- "restrict_to_domain": "Education",
- "show_name_in_global_search": 0,
- "sort_field": "modified",
- "sort_order": "DESC",
- "track_changes": 1,
- "track_seen": 0
+ ],
+ "istable": 1,
+ "modified": "2019-06-12 12:42:12.845972",
+ "modified_by": "Administrator",
+ "module": "Education",
+ "name": "Program Course",
+ "owner": "Administrator",
+ "permissions": [],
+ "restrict_to_domain": "Education",
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1
}
\ No newline at end of file
diff --git a/erpnext/education/doctype/program_enrollment/program_enrollment.py b/erpnext/education/doctype/program_enrollment/program_enrollment.py
index d232e47..d5348ff 100644
--- a/erpnext/education/doctype/program_enrollment/program_enrollment.py
+++ b/erpnext/education/doctype/program_enrollment/program_enrollment.py
@@ -66,7 +66,7 @@
msgprint(_("Fee Records Created - {0}").format(comma_and(fee_list)))
def get_courses(self):
- return frappe.db.sql('''select course, course_name from `tabProgram Course` where parent = %s and required = 1''', (self.program), as_dict=1)
+ return frappe.db.sql('''select course from `tabProgram Course` where parent = %s and required = 1''', (self.program), as_dict=1)
def create_course_enrollments(self):
student = frappe.get_doc("Student", self.student)
diff --git a/erpnext/education/doctype/quiz/quiz.json b/erpnext/education/doctype/quiz/quiz.json
index b4903fc..569c281 100644
--- a/erpnext/education/doctype/quiz/quiz.json
+++ b/erpnext/education/doctype/quiz/quiz.json
@@ -1,4 +1,6 @@
{
+ "allow_import": 1,
+ "allow_rename": 1,
"autoname": "field:title",
"creation": "2018-10-17 05:52:50.149904",
"doctype": "DocType",
@@ -58,7 +60,7 @@
"options": "Latest Highest Score\nLatest Attempt"
}
],
- "modified": "2019-05-30 18:50:54.218571",
+ "modified": "2019-06-12 12:23:57.020508",
"modified_by": "Administrator",
"module": "Education",
"name": "Quiz",
diff --git a/erpnext/education/doctype/quiz_question/quiz_question.json b/erpnext/education/doctype/quiz_question/quiz_question.json
index 3857c5c..0564482 100644
--- a/erpnext/education/doctype/quiz_question/quiz_question.json
+++ b/erpnext/education/doctype/quiz_question/quiz_question.json
@@ -1,110 +1,40 @@
{
- "allow_copy": 0,
- "allow_events_in_timeline": 0,
- "allow_guest_to_view": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
- "creation": "2018-10-17 06:13:00.098883",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "",
- "editable_grid": 1,
- "engine": "InnoDB",
+ "allow_rename": 1,
+ "creation": "2018-10-17 06:13:00.098883",
+ "doctype": "DocType",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+ "question_link",
+ "question"
+ ],
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "question_link",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Question Link",
- "length": 0,
- "no_copy": 0,
- "options": "Question",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "fieldname": "question_link",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Question Link",
+ "options": "Question",
+ "reqd": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fetch_from": "question_link.question",
- "fieldname": "question",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Question",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
+ "fetch_from": "question_link.question",
+ "fieldname": "question",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Question",
+ "read_only": 1
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 1,
- "max_attachments": 0,
- "modified": "2018-10-18 15:35:12.195250",
- "modified_by": "Administrator",
- "module": "Education",
- "name": "Quiz Question",
- "name_case": "",
- "owner": "Administrator",
- "permissions": [],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "show_name_in_global_search": 0,
- "sort_field": "modified",
- "sort_order": "DESC",
- "track_changes": 1,
- "track_seen": 0,
- "track_views": 0
+ ],
+ "istable": 1,
+ "modified": "2019-06-12 12:24:02.312577",
+ "modified_by": "Administrator",
+ "module": "Education",
+ "name": "Quiz Question",
+ "owner": "Administrator",
+ "permissions": [],
+ "quick_entry": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1
}
\ No newline at end of file
diff --git a/erpnext/education/doctype/topic/topic.json b/erpnext/education/doctype/topic/topic.json
index 6e748fd..305458b 100644
--- a/erpnext/education/doctype/topic/topic.json
+++ b/erpnext/education/doctype/topic/topic.json
@@ -1,14 +1,13 @@
{
- "autoname": "field:topic_code",
+ "allow_import": 1,
+ "allow_rename": 1,
+ "autoname": "field:topic_name",
"creation": "2018-12-12 11:37:39.917760",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"topic_name",
- "column_break_2",
- "topic_code",
- "section_break_4",
"topic_content",
"description",
"hero_image"
@@ -19,25 +18,10 @@
"fieldtype": "Data",
"in_list_view": 1,
"label": "Name",
- "reqd": 1
- },
- {
- "fieldname": "column_break_2",
- "fieldtype": "Column Break"
- },
- {
- "fieldname": "topic_code",
- "fieldtype": "Data",
- "in_list_view": 1,
- "label": "Code",
"reqd": 1,
"unique": 1
},
{
- "fieldname": "section_break_4",
- "fieldtype": "Section Break"
- },
- {
"fieldname": "topic_content",
"fieldtype": "Table",
"label": "Topic Content",
@@ -46,6 +30,7 @@
{
"fieldname": "hero_image",
"fieldtype": "Attach Image",
+ "hidden": 1,
"label": "Hero Image"
},
{
@@ -54,7 +39,8 @@
"label": "Description"
}
],
- "modified": "2019-06-05 18:38:44.029711",
+ "image_field": "hero_image",
+ "modified": "2019-06-12 12:34:49.911300",
"modified_by": "Administrator",
"module": "Education",
"name": "Topic",
diff --git a/erpnext/education/doctype/video/video.json b/erpnext/education/doctype/video/video.json
index 3d11bd2..e912eb3 100644
--- a/erpnext/education/doctype/video/video.json
+++ b/erpnext/education/doctype/video/video.json
@@ -1,5 +1,6 @@
{
"allow_import": 1,
+ "allow_rename": 1,
"autoname": "field:title",
"creation": "2018-10-17 05:47:13.087395",
"doctype": "DocType",
@@ -7,11 +8,13 @@
"engine": "InnoDB",
"field_order": [
"title",
- "description",
- "duration",
"provider",
"url",
- "publish_date"
+ "column_break_4",
+ "publish_date",
+ "duration",
+ "section_break_7",
+ "description"
],
"fields": [
{
@@ -53,9 +56,17 @@
"label": "Provider",
"options": "YouTube\nVimeo",
"reqd": 1
+ },
+ {
+ "fieldname": "column_break_4",
+ "fieldtype": "Column Break"
+ },
+ {
+ "fieldname": "section_break_7",
+ "fieldtype": "Section Break"
}
],
- "modified": "2019-05-20 15:11:53.075093",
+ "modified": "2019-06-12 12:36:48.753092",
"modified_by": "Administrator",
"module": "Education",
"name": "Video",
@@ -95,7 +106,6 @@
"share": 1
}
],
- "quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
diff --git a/erpnext/hr/doctype/travel_request/travel_request.json b/erpnext/hr/doctype/travel_request/travel_request.json
index 31dfe96..c1c6524 100644
--- a/erpnext/hr/doctype/travel_request/travel_request.json
+++ b/erpnext/hr/doctype/travel_request/travel_request.json
@@ -193,6 +193,15 @@
"label": "Other Details"
},
{
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "label": "Amended From",
+ "no_copy": 1,
+ "options": "Travel Request",
+ "print_hide": 1,
+ "read_only": 1
+ },
+ {
"collapsible": 1,
"fieldname": "accounting_dimensions_section",
"fieldtype": "Section Break",
@@ -203,6 +212,7 @@
"fieldtype": "Column Break"
}
],
+ "is_submittable": 1,
"modified": "2019-05-25 23:15:00.609186",
"modified_by": "Administrator",
"module": "HR",
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 56c51b1..15fd82e 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -604,4 +604,4 @@
erpnext.patches.v11_1.delete_scheduling_tool
erpnext.patches.v12_0.make_custom_fields_for_bank_remittance
execute:frappe.delete_doc_if_exists("Page", "support-analytics")
-erpnext.patches.v12_0.make_item_manufacturer
+erpnext.patches.v12_0.make_item_manufacturer
\ No newline at end of file
diff --git a/erpnext/patches/v11_0/update_total_qty_field.py b/erpnext/patches/v11_0/update_total_qty_field.py
index 51358e9..9407256 100644
--- a/erpnext/patches/v11_0/update_total_qty_field.py
+++ b/erpnext/patches/v11_0/update_total_qty_field.py
@@ -40,7 +40,7 @@
# This is probably never used anywhere else as of now, but should be
values = []
for d in batch_transactions:
- values.append("('{}', {})".format(frappe.db.escape(d.parent), d.qty))
+ values.append("({0}, {1})".format(frappe.db.escape(d.parent), d.qty))
conditions = ",".join(values)
frappe.db.sql("""
INSERT INTO `tab{}` (name, total_qty) VALUES {}
diff --git a/erpnext/projects/report/billing_summary.py b/erpnext/projects/report/billing_summary.py
index 929a13f..76379f1 100644
--- a/erpnext/projects/report/billing_summary.py
+++ b/erpnext/projects/report/billing_summary.py
@@ -31,22 +31,22 @@
"width": 150
},
{
- "label": _("Billable Hours"),
- "fieldtype": "Float",
- "fieldname": "total_billable_hours",
- "width": 50
- },
- {
"label": _("Working Hours"),
"fieldtype": "Float",
"fieldname": "total_hours",
- "width": 50
+ "width": 150
+ },
+ {
+ "label": _("Billable Hours"),
+ "fieldtype": "Float",
+ "fieldname": "total_billable_hours",
+ "width": 150
},
{
"label": _("Billing Amount"),
"fieldtype": "Currency",
"fieldname": "amount",
- "width": 100
+ "width": 150
}
]
diff --git a/erpnext/projects/report/employee_billing_summary/employee_billing_summary.json b/erpnext/projects/report/employee_billing_summary/employee_billing_summary.json
index 433ebac..e5626a0 100644
--- a/erpnext/projects/report/employee_billing_summary/employee_billing_summary.json
+++ b/erpnext/projects/report/employee_billing_summary/employee_billing_summary.json
@@ -1,34 +1,34 @@
{
- "add_total_row": 0,
- "creation": "2019-03-08 15:08:19.929728",
- "disable_prepared_report": 0,
- "disabled": 0,
- "docstatus": 0,
- "doctype": "Report",
- "idx": 0,
- "is_standard": "Yes",
- "modified": "2019-03-08 15:08:19.929728",
- "modified_by": "Administrator",
- "module": "Projects",
- "name": "Employee Billing Summary",
- "owner": "Administrator",
- "prepared_report": 0,
- "ref_doctype": "Timesheet",
- "report_name": "Employee Billing Summary",
- "report_type": "Script Report",
+ "add_total_row": 1,
+ "creation": "2019-03-08 15:08:19.929728",
+ "disable_prepared_report": 0,
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 0,
+ "is_standard": "Yes",
+ "modified": "2019-06-13 15:54:49.213973",
+ "modified_by": "Administrator",
+ "module": "Projects",
+ "name": "Employee Billing Summary",
+ "owner": "Administrator",
+ "prepared_report": 0,
+ "ref_doctype": "Timesheet",
+ "report_name": "Employee Billing Summary",
+ "report_type": "Script Report",
"roles": [
{
"role": "Projects User"
- },
+ },
{
"role": "HR User"
- },
+ },
{
"role": "Manufacturing User"
- },
+ },
{
"role": "Employee"
- },
+ },
{
"role": "Accounts User"
}
diff --git a/erpnext/projects/report/project_billing_summary/project_billing_summary.json b/erpnext/projects/report/project_billing_summary/project_billing_summary.json
index a3f91c8..817d0cd 100644
--- a/erpnext/projects/report/project_billing_summary/project_billing_summary.json
+++ b/erpnext/projects/report/project_billing_summary/project_billing_summary.json
@@ -1,34 +1,34 @@
{
- "add_total_row": 0,
- "creation": "2019-03-11 16:22:39.460524",
- "disable_prepared_report": 0,
- "disabled": 0,
- "docstatus": 0,
- "doctype": "Report",
- "idx": 0,
- "is_standard": "Yes",
- "modified": "2019-03-11 16:22:39.460524",
- "modified_by": "Administrator",
- "module": "Projects",
- "name": "Project Billing Summary",
- "owner": "Administrator",
- "prepared_report": 0,
- "ref_doctype": "Timesheet",
- "report_name": "Project Billing Summary",
- "report_type": "Script Report",
+ "add_total_row": 1,
+ "creation": "2019-03-11 16:22:39.460524",
+ "disable_prepared_report": 0,
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 0,
+ "is_standard": "Yes",
+ "modified": "2019-06-13 15:54:55.255947",
+ "modified_by": "Administrator",
+ "module": "Projects",
+ "name": "Project Billing Summary",
+ "owner": "Administrator",
+ "prepared_report": 0,
+ "ref_doctype": "Timesheet",
+ "report_name": "Project Billing Summary",
+ "report_type": "Script Report",
"roles": [
{
"role": "Projects User"
- },
+ },
{
"role": "HR User"
- },
+ },
{
"role": "Manufacturing User"
- },
+ },
{
"role": "Employee"
- },
+ },
{
"role": "Accounts User"
}
diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js
index a28d42b..7da7478 100644
--- a/erpnext/public/js/utils/serial_no_batch_selector.js
+++ b/erpnext/public/js/utils/serial_no_batch_selector.js
@@ -268,26 +268,27 @@
{fieldname: 'batches', fieldtype: 'Table', label: __('Batch Entries'),
fields: [
{
- fieldtype:'Link',
- fieldname:'batch_no',
- options: 'Batch',
- label: __('Select Batch'),
- in_list_view:1,
- get_query: function() {
+ 'fieldtype': 'Link',
+ 'read_only': 0,
+ 'fieldname': 'batch_no',
+ 'options': 'Batch',
+ 'label': __('Select Batch'),
+ 'in_list_view': 1,
+ get_query: function () {
return {
- filters: {item: me.item_code },
- query: 'erpnext.controllers.queries.get_batch_numbers'
- };
+ filters: { item: me.item_code },
+ query: 'erpnext.controllers.queries.get_batch_numbers'
+ };
},
- onchange: function(e) {
+ change: function () {
let val = this.get_value();
- if(val.length === 0) {
+ if (val.length === 0) {
this.grid_row.on_grid_fields_dict
.available_qty.set_value(0);
return;
}
let selected_batches = this.grid.grid_rows.map((row) => {
- if(row === this.grid_row) {
+ if (row === this.grid_row) {
return "";
}
@@ -295,12 +296,12 @@
return row.on_grid_fields_dict.batch_no.get_value();
}
});
- if(selected_batches.includes(val)) {
+ if (selected_batches.includes(val)) {
this.set_value("");
frappe.throw(__(`Batch ${val} already selected.`));
return;
}
- if(me.warehouse_details.name) {
+ if (me.warehouse_details.name) {
frappe.call({
method: 'erpnext.stock.doctype.batch.batch.get_batch_qty',
args: {
@@ -323,31 +324,32 @@
}
},
{
- fieldtype:'Float',
- read_only:1,
- fieldname:'available_qty',
- label: __('Available'),
- in_list_view:1,
- default: 0,
- onchange: function() {
+ 'fieldtype': 'Float',
+ 'read_only': 1,
+ 'fieldname': 'available_qty',
+ 'label': __('Available'),
+ 'in_list_view': 1,
+ 'default': 0,
+ change: function () {
this.grid_row.on_grid_fields_dict.selected_qty.set_value('0');
}
},
{
- fieldtype:'Float',
- fieldname:'selected_qty',
- label: __('Qty'),
- in_list_view:1,
+ 'fieldtype': 'Float',
+ 'read_only': 0,
+ 'fieldname': 'selected_qty',
+ 'label': __('Qty'),
+ 'in_list_view': 1,
'default': 0,
- onchange: function(e) {
+ change: function () {
var batch_no = this.grid_row.on_grid_fields_dict.batch_no.get_value();
var available_qty = this.grid_row.on_grid_fields_dict.available_qty.get_value();
var selected_qty = this.grid_row.on_grid_fields_dict.selected_qty.get_value();
- if(batch_no.length === 0 && parseInt(selected_qty)!==0) {
+ if (batch_no.length === 0 && parseInt(selected_qty) !== 0) {
frappe.throw(__("Please select a batch"));
}
- if(me.warehouse_details.type === 'Source Warehouse' &&
+ if (me.warehouse_details.type === 'Source Warehouse' &&
parseFloat(available_qty) < parseFloat(selected_qty)) {
this.set_value('0');
@@ -363,7 +365,7 @@
],
in_place_edit: true,
data: this.data,
- get_data: function() {
+ get_data: function () {
return this.data;
},
}
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index 893701b..5351f32 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -192,6 +192,7 @@
var values = d.get_values();
if(!values) return;
values["company"] = frm.doc.company;
+ if(!frm.doc.company) frappe.throw(__("Company field is required"));
frappe.call({
method: "erpnext.manufacturing.doctype.bom.bom.get_bom_items",
args: values,
diff --git a/erpnext/stock/report/stock_balance/stock_balance.js b/erpnext/stock/report/stock_balance/stock_balance.js
index 07e5f4b..120f879 100644
--- a/erpnext/stock/report/stock_balance/stock_balance.js
+++ b/erpnext/stock/report/stock_balance/stock_balance.js
@@ -40,7 +40,10 @@
"options": "Item",
"get_query": function() {
return {
- query: "erpnext.controllers.queries.item_query"
+ query: "erpnext.controllers.queries.item_query",
+ filters: {
+ "item_group": frappe.query_report.get_filter_value("item_group")
+ }
}
}
},
diff --git a/erpnext/www/lms/content.html b/erpnext/www/lms/content.html
index 9b8c45c..5607c08 100644
--- a/erpnext/www/lms/content.html
+++ b/erpnext/www/lms/content.html
@@ -58,7 +58,7 @@
{% macro title() %}
<div class="mb-3">
- <a href="#" class="text-muted">
+ <a href="/lms/course?name={{ course }}&program={{ program }}" class="text-muted">
Back to Course
</a>
</div>
diff --git a/erpnext/www/lms/course.html b/erpnext/www/lms/course.html
index f8618e0..f2fd936 100644
--- a/erpnext/www/lms/course.html
+++ b/erpnext/www/lms/course.html
@@ -42,10 +42,10 @@
{% if has_access %}
<a href="/lms/topic?program={{ program }}&course={{ course.name }}&topic={{ topic.name }}" class="no-decoration no-underline">
{% else %}
- <div onclick="show_singup()">
+ <a href="/login#login">
{% endif %}
{% if topic.hero_image %}
- <div class="card-hero-img" style="background-image: url('{{ topic.hero_image }})'"></div>
+ <div class="card-hero-img" style="background-image: url('{{ topic.hero_image }}')"></div>
{% else %}
<div class="card-image-wrapper text-center">
<div class="image-body"><i class="fa fa-picture-o" aria-hidden="true"></i></div>
@@ -81,7 +81,7 @@
</div>
</a>
{% else %}
- </div>
+ </a>
{% endif %}
</div>
</div>
@@ -96,30 +96,11 @@
{{ card(topic) }}
{% endfor %}
{% if topics %}
- {% for n in range(3 - ((topics|length)%3)) %}
+ {% for n in range( (3 - (topics|length)) %3) %}
{{ null_card() }}
{% endfor %}
{% endif %}
</div>
</div>
</section>
-{% endblock %}
-
-{% block script %}
-<script>
- function show_singup() {
- if (frappe.session.user == "Guest") {
- let signup_dialog = new frappe.ui.Dialog({
- title: __('Sign Up'),
- primary_action: function() {
- window.location.href = '/login#signup'
- },
- primary_action_label: 'Sign Up'
- })
- signup_dialog.set_message('You have to sign up to access the course');
- signup_dialog.$message.show()
- signup_dialog.show();
- }
- }
-</script>
{% endblock %}
\ No newline at end of file
diff --git a/erpnext/www/lms/course.py b/erpnext/www/lms/course.py
index e7ed2e3..c18d64e 100644
--- a/erpnext/www/lms/course.py
+++ b/erpnext/www/lms/course.py
@@ -5,9 +5,16 @@
no_cache = 1
def get_context(context):
+ try:
+ program = frappe.form_dict['program']
+ course_name = frappe.form_dict['name']
+ except KeyError:
+ frappe.local.flags.redirect_location = '/lms'
+ raise frappe.Redirect
+
context.education_settings = frappe.get_single("Education Settings")
- course = frappe.get_doc('Course', frappe.form_dict['name'])
- context.program = frappe.form_dict['program']
+ course = frappe.get_doc('Course', course_name)
+ context.program = program
context.course = course
context.topics = course.get_topics()
diff --git a/erpnext/www/lms/index.html b/erpnext/www/lms/index.html
index 3e107ac..ffb4419 100644
--- a/erpnext/www/lms/index.html
+++ b/erpnext/www/lms/index.html
@@ -55,7 +55,7 @@
{{ program_card(program.program, program.has_access) }}
{% endfor %}
{% if featured_programs %}
- {% for n in range(3 - ((featured_programs|length)%3)) %}
+ {% for n in range( (3 - (featured_programs|length)) %3) %}
{{ null_card() }}
{% endfor %}
{% endif %}
diff --git a/erpnext/www/lms/program.html b/erpnext/www/lms/program.html
index b6d6966..271b781 100644
--- a/erpnext/www/lms/program.html
+++ b/erpnext/www/lms/program.html
@@ -77,7 +77,7 @@
{{ card(course) }}
{% endfor %}
{% if courses %}
- {% for n in range(3 - ((courses|length)%3)) %}
+ {% for n in range( (3 - (courses|length)) %3) %}
{{ null_card() }}
{% endfor %}
{% endif %}
diff --git a/erpnext/www/lms/program.py b/erpnext/www/lms/program.py
index 1fcb3d3..7badedc 100644
--- a/erpnext/www/lms/program.py
+++ b/erpnext/www/lms/program.py
@@ -6,10 +6,16 @@
no_cache = 1
def get_context(context):
+ try:
+ program = frappe.form_dict['program']
+ except KeyError:
+ frappe.local.flags.redirect_location = '/lms'
+ raise frappe.Redirect
+
context.education_settings = frappe.get_single("Education Settings")
- context.program = get_program(frappe.form_dict['program'])
+ context.program = get_program(program)
context.courses = [frappe.get_doc("Course", course.course) for course in context.program.courses]
- context.has_access = utils.allowed_program_access(frappe.form_dict['program'])
+ context.has_access = utils.allowed_program_access(program)
context.progress = get_course_progress(context.courses, context.program)
def get_program(program_name):
diff --git a/erpnext/www/lms/topic.html b/erpnext/www/lms/topic.html
index 3bbfbd0..1f0d187 100644
--- a/erpnext/www/lms/topic.html
+++ b/erpnext/www/lms/topic.html
@@ -1,5 +1,5 @@
{% extends "templates/base.html" %}
-{% block title %}Topic Title{% endblock %}
+{% block title %}{{ topic.name }}{% endblock %}
{% from "www/lms/macros/hero.html" import hero %}
{% from "www/lms/macros/card.html" import null_card %}
@@ -13,7 +13,7 @@
{% macro card(content, index, length) %}
-<div class="col-sm-{{ 12 if length%3 == 1 and index == 1 else 6 if length%3 == 2 and index in [1,2] else 4}} mb-4 text-left">
+<div class="col-sm-4 mb-4 text-left">
<a href="/lms/content?program={{ program }}&course={{ course }}&topic={{ topic.name }}&type={{ content.content_type }}&content={{ content.content.name }}" class="no-decoration no-underline">
<div class="card h-100">
<div class='card-body'>
@@ -48,7 +48,7 @@
{{ card(content, loop.index, topic.contents|length) }}
{% endfor %}
{% if contents %}
- {% for n in range(3 - ((contents|length)%3)) %}
+ {% for n in range( (3 - (contents|length)) %3) %}
{{ null_card() }}
{% endfor %}
{% endif %}
diff --git a/erpnext/www/lms/topic.py b/erpnext/www/lms/topic.py
index 0af0778..f75ae8e 100644
--- a/erpnext/www/lms/topic.py
+++ b/erpnext/www/lms/topic.py
@@ -5,9 +5,13 @@
no_cache = 1
def get_context(context):
- course = frappe.form_dict['course']
- program = frappe.form_dict['program']
- topic = frappe.form_dict['topic']
+ try:
+ course = frappe.form_dict['course']
+ program = frappe.form_dict['program']
+ topic = frappe.form_dict['topic']
+ except KeyError:
+ frappe.local.flags.redirect_location = '/lms'
+ raise frappe.Redirect
context.program = program
context.course = course