From 1358efe896c2f1279a29189c185738f6bcb0822c Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 6 Jul 2020 14:09:33 +0530 Subject: [PATCH 001/414] feat: update icons --- .../desk_page/accounting/accounting.json | 3 +- .../desk_page/agriculture/agriculture.json | 4 +- erpnext/assets/desk_page/assets/assets.json | 3 +- erpnext/buying/desk_page/buying/buying.json | 9 ++-- erpnext/crm/desk_page/crm/crm.json | 7 +-- .../desk_page/education/education.json | 4 +- erpnext/hr/desk_page/hr/hr.json | 43 +++++++++++++------ .../loan_management/desk_page/loan/loan.json | 6 ++- .../manufacturing/manufacturing.json | 11 ++--- .../desk_page/non_profit/non_profit.json | 4 +- .../payroll/desk_page/payroll/payroll.json | 3 +- .../projects/desk_page/projects/projects.json | 7 +-- .../desk_page/quality/quality.json | 5 ++- erpnext/selling/desk_page/retail/retail.json | 4 +- .../selling/desk_page/selling/selling.json | 9 ++-- .../erpnext_settings/erpnext_settings.json | 4 +- erpnext/setup/desk_page/home/home.json | 4 +- erpnext/stock/desk_page/stock/stock.json | 11 ++--- .../support/desk_page/support/support.json | 5 ++- 19 files changed, 94 insertions(+), 52 deletions(-) diff --git a/erpnext/accounts/desk_page/accounting/accounting.json b/erpnext/accounts/desk_page/accounting/accounting.json index 31315e4c71..46e426784d 100644 --- a/erpnext/accounts/desk_page/accounting/accounting.json +++ b/erpnext/accounts/desk_page/accounting/accounting.json @@ -95,10 +95,11 @@ "doctype": "Desk Page", "extends_another_page": 0, "hide_custom": 0, + "icon": "accounting", "idx": 0, "is_standard": 1, "label": "Accounting", - "modified": "2020-06-19 12:42:44.054598", + "modified": "2020-06-30 18:33:06.526514", "modified_by": "Administrator", "module": "Accounts", "name": "Accounting", diff --git a/erpnext/agriculture/desk_page/agriculture/agriculture.json b/erpnext/agriculture/desk_page/agriculture/agriculture.json index e0d2c9ca25..094e1652b3 100644 --- a/erpnext/agriculture/desk_page/agriculture/agriculture.json +++ b/erpnext/agriculture/desk_page/agriculture/agriculture.json @@ -24,10 +24,12 @@ "docstatus": 0, "doctype": "Desk Page", "extends_another_page": 0, + "hide_custom": 0, + "icon": "agriculture", "idx": 0, "is_standard": 1, "label": "Agriculture", - "modified": "2020-04-01 11:28:51.032822", + "modified": "2020-06-30 18:35:25.350213", "modified_by": "Administrator", "module": "Agriculture", "name": "Agriculture", diff --git a/erpnext/assets/desk_page/assets/assets.json b/erpnext/assets/desk_page/assets/assets.json index 449a5facb0..515fc22f05 100644 --- a/erpnext/assets/desk_page/assets/assets.json +++ b/erpnext/assets/desk_page/assets/assets.json @@ -30,10 +30,11 @@ "doctype": "Desk Page", "extends_another_page": 0, "hide_custom": 0, + "icon": "assets", "idx": 0, "is_standard": 1, "label": "Assets", - "modified": "2020-05-20 18:05:23.994795", + "modified": "2020-06-30 18:36:11.169586", "modified_by": "Administrator", "module": "Assets", "name": "Assets", diff --git a/erpnext/buying/desk_page/buying/buying.json b/erpnext/buying/desk_page/buying/buying.json index 565d39c3c8..af95b931ad 100644 --- a/erpnext/buying/desk_page/buying/buying.json +++ b/erpnext/buying/desk_page/buying/buying.json @@ -57,10 +57,11 @@ "doctype": "Desk Page", "extends_another_page": 0, "hide_custom": 0, + "icon": "buying", "idx": 0, "is_standard": 1, "label": "Buying", - "modified": "2020-06-29 19:30:24.983050", + "modified": "2020-06-30 18:36:53.390498", "modified_by": "Administrator", "module": "Buying", "name": "Buying", @@ -70,7 +71,7 @@ "pin_to_top": 0, "shortcuts": [ { - "color": "#cef6d1", + "color": "Green", "format": "{} Available", "label": "Item", "link_to": "Item", @@ -78,7 +79,7 @@ "type": "DocType" }, { - "color": "#ffe8cd", + "color": "Yellow", "format": "{} Pending", "label": "Material Request", "link_to": "Material Request", @@ -86,7 +87,7 @@ "type": "DocType" }, { - "color": "#ffe8cd", + "color": "Yellow", "format": "{} To Receive", "label": "Purchase Order", "link_to": "Purchase Order", diff --git a/erpnext/crm/desk_page/crm/crm.json b/erpnext/crm/desk_page/crm/crm.json index eb69dc06b6..234008d38f 100644 --- a/erpnext/crm/desk_page/crm/crm.json +++ b/erpnext/crm/desk_page/crm/crm.json @@ -39,10 +39,11 @@ "doctype": "Desk Page", "extends_another_page": 0, "hide_custom": 0, + "icon": "crm", "idx": 0, "is_standard": 1, "label": "CRM", - "modified": "2020-05-28 13:33:52.906750", + "modified": "2020-06-30 18:37:48.961922", "modified_by": "Administrator", "module": "CRM", "name": "CRM", @@ -52,7 +53,7 @@ "pin_to_top": 0, "shortcuts": [ { - "color": "#ffe8cd", + "color": "Blue", "format": "{} Open", "label": "Lead", "link_to": "Lead", @@ -60,7 +61,7 @@ "type": "DocType" }, { - "color": "#cef6d1", + "color": "Blue", "format": "{} Assigned", "label": "Opportunity", "link_to": "Opportunity", diff --git a/erpnext/education/desk_page/education/education.json b/erpnext/education/desk_page/education/education.json index b341ec4b99..b8f87d34b7 100644 --- a/erpnext/education/desk_page/education/education.json +++ b/erpnext/education/desk_page/education/education.json @@ -79,10 +79,12 @@ "docstatus": 0, "doctype": "Desk Page", "extends_another_page": 0, + "hide_custom": 0, + "icon": "education", "idx": 0, "is_standard": 1, "label": "Education", - "modified": "2020-05-22 01:09:13.058482", + "modified": "2020-06-30 18:36:17.013044", "modified_by": "Administrator", "module": "Education", "name": "Education", diff --git a/erpnext/hr/desk_page/hr/hr.json b/erpnext/hr/desk_page/hr/hr.json index 0fed8d322f..bcc4ac57c9 100644 --- a/erpnext/hr/desk_page/hr/hr.json +++ b/erpnext/hr/desk_page/hr/hr.json @@ -20,6 +20,11 @@ "label": "Leaves", "links": "[\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Leave Application\",\n \"name\": \"Leave Application\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Leave Allocation\",\n \"name\": \"Leave Allocation\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Leave Type\"\n ],\n \"label\": \"Leave Policy\",\n \"name\": \"Leave Policy\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Leave Period\",\n \"name\": \"Leave Period\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Leave Type\",\n \"name\": \"Leave Type\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Holiday List\",\n \"name\": \"Holiday List\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Compensatory Leave Request\",\n \"name\": \"Compensatory Leave Request\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Leave Encashment\",\n \"name\": \"Leave Encashment\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Leave Block List\",\n \"name\": \"Leave Block List\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Leave Application\"\n ],\n \"doctype\": \"Leave Application\",\n \"is_query_report\": true,\n \"label\": \"Employee Leave Balance\",\n \"name\": \"Employee Leave Balance\",\n \"type\": \"report\"\n }\n]" }, + { + "hidden": 0, + "label": "Payroll", + "links": "[\n {\n \"label\": \"Salary Structure\",\n \"name\": \"Salary Structure\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Salary Structure\",\n \"Employee\"\n ],\n \"label\": \"Salary Structure Assignment\",\n \"name\": \"Salary Structure Assignment\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Payroll Entry\",\n \"name\": \"Payroll Entry\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Salary Slip\",\n \"name\": \"Salary Slip\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Payroll Period\",\n \"name\": \"Payroll Period\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Income Tax Slab\",\n \"name\": \"Income Tax Slab\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Salary Component\",\n \"name\": \"Salary Component\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Additional Salary\",\n \"name\": \"Additional Salary\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Retention Bonus\",\n \"name\": \"Retention Bonus\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Employee Incentive\",\n \"name\": \"Employee Incentive\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Salary Slip\"\n ],\n \"doctype\": \"Salary Slip\",\n \"is_query_report\": true,\n \"label\": \"Salary Register\",\n \"name\": \"Salary Register\",\n \"type\": \"report\"\n }\n]" + }, { "hidden": 0, "label": "Attendance", @@ -45,6 +50,11 @@ "label": "Recruitment", "links": "[\n {\n \"label\": \"Job Opening\",\n \"name\": \"Job Opening\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Job Applicant\",\n \"name\": \"Job Applicant\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Job Offer\",\n \"name\": \"Job Offer\",\n \"onboard\": 1,\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Staffing Plan\",\n \"name\": \"Staffing Plan\",\n \"type\": \"doctype\"\n }\n]" }, + { + "hidden": 0, + "label": "Loans", + "links": "[\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Loan Application\",\n \"name\": \"Loan Application\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Loan\",\n \"name\": \"Loan\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Loan Type\",\n \"name\": \"Loan Type\",\n \"type\": \"doctype\"\n }\n]" + }, { "hidden": 0, "label": "Training", @@ -59,13 +69,18 @@ "hidden": 0, "label": "Performance", "links": "[\n {\n \"label\": \"Appraisal\",\n \"name\": \"Appraisal\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Appraisal Template\",\n \"name\": \"Appraisal Template\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Energy Point Rule\",\n \"name\": \"Energy Point Rule\",\n \"type\": \"doctype\"\n },\n {\n \"label\": \"Energy Point Log\",\n \"name\": \"Energy Point Log\",\n \"type\": \"doctype\"\n }\n]" + }, + { + "hidden": 0, + "label": "Employee Tax and Benefits", + "links": "[\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Employee Tax Exemption Declaration\",\n \"name\": \"Employee Tax Exemption Declaration\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Employee Tax Exemption Proof Submission\",\n \"name\": \"Employee Tax Exemption Proof Submission\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Employee\",\n \"Payroll Period\"\n ],\n \"label\": \"Employee Other Income\",\n \"name\": \"Employee Other Income\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Employee Benefit Application\",\n \"name\": \"Employee Benefit Application\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Employee Benefit Claim\",\n \"name\": \"Employee Benefit Claim\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Employee Tax Exemption Category\",\n \"name\": \"Employee Tax Exemption Category\",\n \"type\": \"doctype\"\n },\n {\n \"dependencies\": [\n \"Employee\"\n ],\n \"label\": \"Employee Tax Exemption Sub Category\",\n \"name\": \"Employee Tax Exemption Sub Category\",\n \"type\": \"doctype\"\n }\n]" } ], "category": "Modules", "charts": [ { - "chart_name": "Attendance Count", - "label": "Attendance Count" + "chart_name": "Outgoing Salary", + "label": "Outgoing Salary" } ], "creation": "2020-03-02 15:48:58.322521", @@ -75,10 +90,11 @@ "doctype": "Desk Page", "extends_another_page": 0, "hide_custom": 0, + "icon": "hr", "idx": 0, "is_standard": 1, "label": "HR", - "modified": "2020-06-16 19:20:50.976045", + "modified": "2020-06-30 18:34:39.966096", "modified_by": "Administrator", "module": "HR", "name": "HR", @@ -88,13 +104,21 @@ "pin_to_top": 0, "shortcuts": [ { - "color": "#9deca2", + "color": "Green", "format": "{} Active", "label": "Employee", "link_to": "Employee", "stats_filter": "{\"status\":\"Active\"}", "type": "DocType" }, + { + "color": "Yellow", + "format": "{} Open", + "label": "Leave Application", + "link_to": "Leave Application", + "stats_filter": "{\"status\":\"Open\"}", + "type": "DocType" + }, { "label": "Attendance", "link_to": "Attendance", @@ -102,15 +126,8 @@ "type": "DocType" }, { - "format": "{} Open", - "label": "Leave Application", - "link_to": "Leave Application", - "stats_filter": "{\"status\":\"Open\"}", - "type": "DocType" - }, - { - "label": "Job Applicant", - "link_to": "Job Applicant", + "label": "Salary Structure", + "link_to": "Salary Structure", "type": "DocType" }, { diff --git a/erpnext/loan_management/desk_page/loan/loan.json b/erpnext/loan_management/desk_page/loan/loan.json index 48193b0a0d..95fa22bd69 100644 --- a/erpnext/loan_management/desk_page/loan/loan.json +++ b/erpnext/loan_management/desk_page/loan/loan.json @@ -34,10 +34,12 @@ "docstatus": 0, "doctype": "Desk Page", "extends_another_page": 0, + "hide_custom": 0, + "icon": "loan", "idx": 0, "is_standard": 1, "label": "Loan", - "modified": "2020-06-07 19:42:14.947902", + "modified": "2020-06-30 18:33:53.854122", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan", @@ -46,7 +48,7 @@ "pin_to_top": 0, "shortcuts": [ { - "color": "#ffe8cd", + "color": "Green", "format": "{} Open", "label": "Loan Application", "link_to": "Loan Application", diff --git a/erpnext/manufacturing/desk_page/manufacturing/manufacturing.json b/erpnext/manufacturing/desk_page/manufacturing/manufacturing.json index 8d11294164..3dd86a38bf 100644 --- a/erpnext/manufacturing/desk_page/manufacturing/manufacturing.json +++ b/erpnext/manufacturing/desk_page/manufacturing/manufacturing.json @@ -44,10 +44,11 @@ "doctype": "Desk Page", "extends_another_page": 0, "hide_custom": 0, + "icon": "organization", "idx": 0, "is_standard": 1, "label": "Manufacturing", - "modified": "2020-05-28 13:54:02.048419", + "modified": "2020-06-30 18:40:04.454826", "modified_by": "Administrator", "module": "Manufacturing", "name": "Manufacturing", @@ -58,7 +59,7 @@ "restrict_to_domain": "Manufacturing", "shortcuts": [ { - "color": "#cef6d1", + "color": "Green", "format": "{} Active", "label": "Item", "link_to": "Item", @@ -67,7 +68,7 @@ "type": "DocType" }, { - "color": "#cef6d1", + "color": "Green", "format": "{} Active", "label": "BOM", "link_to": "BOM", @@ -76,7 +77,7 @@ "type": "DocType" }, { - "color": "#ffe8cd", + "color": "Yellow", "format": "{} Open", "label": "Work Order", "link_to": "Work Order", @@ -85,7 +86,7 @@ "type": "DocType" }, { - "color": "#ffe8cd", + "color": "Yellow", "format": "{} Open", "label": "Production Plan", "link_to": "Production Plan", diff --git a/erpnext/non_profit/desk_page/non_profit/non_profit.json b/erpnext/non_profit/desk_page/non_profit/non_profit.json index ebe6194893..24d655ad6f 100644 --- a/erpnext/non_profit/desk_page/non_profit/non_profit.json +++ b/erpnext/non_profit/desk_page/non_profit/non_profit.json @@ -39,10 +39,12 @@ "docstatus": 0, "doctype": "Desk Page", "extends_another_page": 0, + "hide_custom": 0, + "icon": "non-profit", "idx": 0, "is_standard": 1, "label": "Non Profit", - "modified": "2020-04-13 13:41:52.373705", + "modified": "2020-06-30 18:35:52.770917", "modified_by": "Administrator", "module": "Non Profit", "name": "Non Profit", diff --git a/erpnext/payroll/desk_page/payroll/payroll.json b/erpnext/payroll/desk_page/payroll/payroll.json index b5eac465c8..cb063c105c 100644 --- a/erpnext/payroll/desk_page/payroll/payroll.json +++ b/erpnext/payroll/desk_page/payroll/payroll.json @@ -35,10 +35,11 @@ "doctype": "Desk Page", "extends_another_page": 0, "hide_custom": 0, + "icon": "money-coins-1", "idx": 0, "is_standard": 1, "label": "Payroll", - "modified": "2020-06-19 12:23:06.034046", + "modified": "2020-06-30 18:33:29.072946", "modified_by": "Administrator", "module": "Payroll", "name": "Payroll", diff --git a/erpnext/projects/desk_page/projects/projects.json b/erpnext/projects/desk_page/projects/projects.json index e24cf3081c..3756c5bb50 100644 --- a/erpnext/projects/desk_page/projects/projects.json +++ b/erpnext/projects/desk_page/projects/projects.json @@ -30,10 +30,11 @@ "doctype": "Desk Page", "extends_another_page": 0, "hide_custom": 0, + "icon": "project", "idx": 0, "is_standard": 1, "label": "Projects", - "modified": "2020-05-28 13:38:19.934937", + "modified": "2020-06-30 18:38:40.130763", "modified_by": "Administrator", "module": "Projects", "name": "Projects", @@ -42,7 +43,7 @@ "pin_to_top": 0, "shortcuts": [ { - "color": "#cef6d1", + "color": "Blue", "format": "{} Assigned", "label": "Task", "link_to": "Task", @@ -50,7 +51,7 @@ "type": "DocType" }, { - "color": "#ffe8cd", + "color": "Blue", "format": "{} Open", "label": "Project", "link_to": "Project", diff --git a/erpnext/quality_management/desk_page/quality/quality.json b/erpnext/quality_management/desk_page/quality/quality.json index 5ee70008dd..7e5a966df2 100644 --- a/erpnext/quality_management/desk_page/quality/quality.json +++ b/erpnext/quality_management/desk_page/quality/quality.json @@ -29,11 +29,12 @@ "docstatus": 0, "doctype": "Desk Page", "extends_another_page": 0, - "icon": "", + "hide_custom": 0, + "icon": "quality", "idx": 0, "is_standard": 1, "label": "Quality", - "modified": "2020-04-01 11:28:51.095012", + "modified": "2020-06-30 18:35:36.017107", "modified_by": "Administrator", "module": "Quality Management", "name": "Quality", diff --git a/erpnext/selling/desk_page/retail/retail.json b/erpnext/selling/desk_page/retail/retail.json index 7b30af20cc..ea62091ffd 100644 --- a/erpnext/selling/desk_page/retail/retail.json +++ b/erpnext/selling/desk_page/retail/retail.json @@ -14,10 +14,12 @@ "docstatus": 0, "doctype": "Desk Page", "extends_another_page": 0, + "hide_custom": 0, + "icon": "retail", "idx": 0, "is_standard": 1, "label": "Retail", - "modified": "2020-04-26 22:42:39.346750", + "modified": "2020-06-30 18:35:58.987449", "modified_by": "Administrator", "module": "Selling", "name": "Retail", diff --git a/erpnext/selling/desk_page/selling/selling.json b/erpnext/selling/desk_page/selling/selling.json index 225238233a..7dcb71f5f0 100644 --- a/erpnext/selling/desk_page/selling/selling.json +++ b/erpnext/selling/desk_page/selling/selling.json @@ -41,10 +41,11 @@ "doctype": "Desk Page", "extends_another_page": 0, "hide_custom": 1, + "icon": "sell", "idx": 0, "is_standard": 1, "label": "Selling", - "modified": "2020-06-29 19:26:35.139097", + "modified": "2020-06-30 18:32:50.587478", "modified_by": "Administrator", "module": "Selling", "name": "Selling", @@ -54,7 +55,7 @@ "pin_to_top": 0, "shortcuts": [ { - "color": "#cef6d1", + "color": "Grey", "format": "{} Available", "label": "Item", "link_to": "Item", @@ -62,7 +63,7 @@ "type": "DocType" }, { - "color": "#ffe8cd", + "color": "Yellow", "format": "{} To Deliver", "label": "Sales Order", "link_to": "Sales Order", @@ -70,7 +71,7 @@ "type": "DocType" }, { - "color": "#cef6d1", + "color": "Grey", "format": "{} Open", "label": "Sales Analytics", "link_to": "Sales Analytics", diff --git a/erpnext/setup/desk_page/erpnext_settings/erpnext_settings.json b/erpnext/setup/desk_page/erpnext_settings/erpnext_settings.json index 253d711b32..92b34b06ac 100644 --- a/erpnext/setup/desk_page/erpnext_settings/erpnext_settings.json +++ b/erpnext/setup/desk_page/erpnext_settings/erpnext_settings.json @@ -9,10 +9,12 @@ "doctype": "Desk Page", "extends": "Settings", "extends_another_page": 1, + "hide_custom": 0, + "icon": "settings", "idx": 0, "is_standard": 1, "label": "ERPNext Settings", - "modified": "2020-04-01 11:28:51.400851", + "modified": "2020-06-30 18:35:41.160158", "modified_by": "Administrator", "module": "Setup", "name": "ERPNext Settings", diff --git a/erpnext/setup/desk_page/home/home.json b/erpnext/setup/desk_page/home/home.json index 63cd5c5cec..19e6f62202 100644 --- a/erpnext/setup/desk_page/home/home.json +++ b/erpnext/setup/desk_page/home/home.json @@ -54,10 +54,12 @@ "docstatus": 0, "doctype": "Desk Page", "extends_another_page": 0, + "hide_custom": 0, + "icon": "getting-started", "idx": 0, "is_standard": 1, "label": "Home", - "modified": "2020-05-11 10:20:37.358701", + "modified": "2020-06-30 18:36:05.637904", "modified_by": "Administrator", "module": "Setup", "name": "Home", diff --git a/erpnext/stock/desk_page/stock/stock.json b/erpnext/stock/desk_page/stock/stock.json index 1bf81f7f0e..89f40f0142 100644 --- a/erpnext/stock/desk_page/stock/stock.json +++ b/erpnext/stock/desk_page/stock/stock.json @@ -55,10 +55,11 @@ "doctype": "Desk Page", "extends_another_page": 0, "hide_custom": 0, + "icon": "stock", "idx": 0, "is_standard": 1, "label": "Stock", - "modified": "2020-05-30 17:32:11.062681", + "modified": "2020-06-30 18:41:21.822817", "modified_by": "Administrator", "module": "Stock", "name": "Stock", @@ -68,7 +69,7 @@ "pin_to_top": 0, "shortcuts": [ { - "color": "#cef6d1", + "color": "Green", "format": "{} Available", "label": "Item", "link_to": "Item", @@ -76,7 +77,7 @@ "type": "DocType" }, { - "color": "#ffe8cd", + "color": "Yellow", "format": "{} Pending", "label": "Material Request", "link_to": "Material Request", @@ -89,7 +90,7 @@ "type": "DocType" }, { - "color": "#ffe8cd", + "color": "Yellow", "format": "{} To Bill", "label": "Purchase Receipt", "link_to": "Purchase Receipt", @@ -97,7 +98,7 @@ "type": "DocType" }, { - "color": "#ffe8cd", + "color": "Yellow", "format": "{} To Bill", "label": "Delivery Note", "link_to": "Delivery Note", diff --git a/erpnext/support/desk_page/support/support.json b/erpnext/support/desk_page/support/support.json index b1ad7c8aa0..1a73e05ca3 100644 --- a/erpnext/support/desk_page/support/support.json +++ b/erpnext/support/desk_page/support/support.json @@ -40,10 +40,11 @@ "doctype": "Desk Page", "extends_another_page": 0, "hide_custom": 0, + "icon": "support", "idx": 0, "is_standard": 1, "label": "Support", - "modified": "2020-06-04 11:54:56.124219", + "modified": "2020-06-30 18:41:35.683929", "modified_by": "Administrator", "module": "Support", "name": "Support", @@ -52,7 +53,7 @@ "pin_to_top": 0, "shortcuts": [ { - "color": "#ffc4c4", + "color": "Yellow", "format": "{} Assigned", "label": "Issue", "link_to": "Issue", From be5e129259490586c8e7b3f94b222a0c5b87b93e Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 8 Jul 2020 12:56:28 +0530 Subject: [PATCH 002/414] feat: update icons for erpnext settings shortcuts --- .../erpnext_settings/erpnext_settings.json | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/erpnext/setup/desk_page/erpnext_settings/erpnext_settings.json b/erpnext/setup/desk_page/erpnext_settings/erpnext_settings.json index 92b34b06ac..5c8cd6977b 100644 --- a/erpnext/setup/desk_page/erpnext_settings/erpnext_settings.json +++ b/erpnext/setup/desk_page/erpnext_settings/erpnext_settings.json @@ -14,7 +14,7 @@ "idx": 0, "is_standard": 1, "label": "ERPNext Settings", - "modified": "2020-06-30 18:35:41.160158", + "modified": "2020-07-08 12:53:44.904241", "modified_by": "Administrator", "module": "Setup", "name": "ERPNext Settings", @@ -23,89 +23,89 @@ "pin_to_top": 0, "shortcuts": [ { - "icon": "octicon octicon-rocket", + "icon": "project", "label": "Projects Settings", "link_to": "Projects Settings", "type": "DocType" }, { - "icon": "octicon octicon-repo", + "icon": "accounting", "label": "Accounts Settings", "link_to": "Accounts Settings", "type": "DocType" }, { - "icon": "octicon octicon-package", + "icon": "stock", "label": "Stock Settings", "link_to": "Stock Settings", "type": "DocType" }, { - "icon": "octicon octicon-organization", + "icon": "hr", "label": "HR Settings", "link_to": "HR Settings", "type": "DocType" }, { - "icon": "octicon octicon-tag", + "icon": "sell", "label": "Selling Settings", "link_to": "Selling Settings", "type": "DocType" }, { - "icon": "octicon octicon-briefcase", + "icon": "buying", "label": "Buying Settings", "link_to": "Buying Settings", "type": "DocType" }, { - "icon": "fa fa-life-ring", + "icon": "support", "label": "Support Settings", "link_to": "Support Settings", "type": "DocType" }, { - "icon": "fa fa-shopping-cart", + "icon": "retail", "label": "Shopping Cart Settings", "link_to": "Shopping Cart Settings", "type": "DocType" }, { - "icon": "fa fa-globe", + "icon": "website", "label": "Portal Settings", "link_to": "Portal Settings", "type": "DocType" }, { - "icon": "octicon octicon-tools", + "icon": "organization", "label": "Manufacturing Settings", "link_to": "Manufacturing Settings", "restrict_to_domain": "Manufacturing", "type": "DocType" }, { - "icon": "octicon octicon-mortar-board", + "icon": "education", "label": "Education Settings", "link_to": "Education Settings", "restrict_to_domain": "Education", "type": "DocType" }, { - "icon": "fa fa-bed", + "icon": "organization", "label": "Hotel Settings", "link_to": "Hotel Settings", "restrict_to_domain": "Hospitality", "type": "DocType" }, { - "icon": "fa fa-heartbeat", + "icon": "non-profit", "label": "Healthcare Settings", "link_to": "Healthcare Settings", "restrict_to_domain": "Healthcare", "type": "DocType" }, { - "icon": "fa fa-cog", + "icon": "setting", "label": "Domain Settings", "link_to": "Domain Settings", "type": "DocType" From 840550e25feac445f213a0cd5d7d6f7d5a5b07a5 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 8 Jul 2020 15:53:35 +0530 Subject: [PATCH 003/414] refactor: change sequence for profit and loss statement --- .../profit_and_loss_statement.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py index 7caa7648b1..37af560716 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py @@ -59,13 +59,6 @@ def get_report_summary(period_list, periodicity, income, expense, net_profit_los expense_label = _("Total Expense") return [ - { - "value": net_profit, - "indicator": "Green" if net_profit > 0 else "Red", - "label": profit_label, - "datatype": "Currency", - "currency": net_profit_loss.get("currency") if net_profit_loss else default_currency - }, { "value": net_income, "label": income_label, @@ -77,6 +70,13 @@ def get_report_summary(period_list, periodicity, income, expense, net_profit_los "label": expense_label, "datatype": "Currency", "currency": expense[-1].get('currency') if expense else default_currency + }, + { + "value": net_profit, + "indicator": "Green" if net_profit > 0 else "Red", + "label": profit_label, + "datatype": "Currency", + "currency": net_profit_loss.get("currency") if net_profit_loss else default_currency } ] From f59d927f73a44dcb683659fd54d757391e752823 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 9 Jul 2020 10:58:05 +0530 Subject: [PATCH 004/414] feat: update summary items --- erpnext/accounts/report/balance_sheet/balance_sheet.py | 3 --- .../profit_and_loss_statement/profit_and_loss_statement.py | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py index a858c1998f..1729abce9e 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.py +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py @@ -147,7 +147,6 @@ def get_report_summary(period_list, asset, liability, equity, provisional_profit { "value": net_asset, "label": "Total Asset", - "indicator": "Green", "datatype": "Currency", "currency": currency }, @@ -155,14 +154,12 @@ def get_report_summary(period_list, asset, liability, equity, provisional_profit "value": net_liability, "label": "Total Liability", "datatype": "Currency", - "indicator": "Red", "currency": currency }, { "value": net_equity, "label": "Total Equity", "datatype": "Currency", - "indicator": "Blue", "currency": currency }, { diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py index 37af560716..01e1b3ffc3 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py @@ -65,12 +65,14 @@ def get_report_summary(period_list, periodicity, income, expense, net_profit_los "datatype": "Currency", "currency": income[-1].get('currency') if income else default_currency }, + { "type": "separator", "value": "-"}, { "value": net_expense, "label": expense_label, "datatype": "Currency", "currency": expense[-1].get('currency') if expense else default_currency }, + { "type": "separator", "value": "=", "color": "blue"}, { "value": net_profit, "indicator": "Green" if net_profit > 0 else "Red", From b6fb13258fec75b963656d8cae77cb78ac4a4eb4 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 9 Jul 2020 16:51:36 +0530 Subject: [PATCH 005/414] feat: move financial statement switcher to page toolbar --- erpnext/public/js/financial_statements.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js index 459c01b269..b2f7afe53f 100644 --- a/erpnext/public/js/financial_statements.js +++ b/erpnext/public/js/financial_statements.js @@ -57,18 +57,22 @@ erpnext.financial_statements = { }); }); - report.page.add_inner_button(__("Balance Sheet"), function() { + const views_menu = report.page.add_custom_button_group(__('Financial Statements')); + + report.page.add_custom_menu_item(views_menu, __("Balance Sheet"), function() { var filters = report.get_values(); frappe.set_route('query-report', 'Balance Sheet', {company: filters.company}); - }, __('Financial Statements')); - report.page.add_inner_button(__("Profit and Loss"), function() { + }); + + report.page.add_custom_menu_item(views_menu, __("Profit and Loss"), function() { var filters = report.get_values(); frappe.set_route('query-report', 'Profit and Loss Statement', {company: filters.company}); - }, __('Financial Statements')); - report.page.add_inner_button(__("Cash Flow Statement"), function() { + }); + + report.page.add_custom_menu_item(views_menu, __("Cash Flow Statement"), function() { var filters = report.get_values(); frappe.set_route('query-report', 'Cash Flow', {company: filters.company}); - }, __('Financial Statements')); + }); } }; From ecc7eedd101f03bbfeb47b78bbdf46e75e28b02c Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sun, 23 Aug 2020 16:35:39 +0530 Subject: [PATCH 006/414] fix: Update erpnext logo --- erpnext/hooks.py | 2 +- erpnext/public/images/erpnext_logo.svg | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 erpnext/public/images/erpnext_logo.svg diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 463ad6c94b..1c36c2a30b 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -10,7 +10,7 @@ app_color = "#e74c3c" app_email = "info@erpnext.com" app_license = "GNU General Public License (v3)" source_link = "https://github.com/frappe/erpnext" -app_logo_url = '/assets/erpnext/images/erp-icon.svg' +app_logo_url = '/assets/erpnext/images/erpnext_logo.svg' develop_version = '13.x.x-develop' diff --git a/erpnext/public/images/erpnext_logo.svg b/erpnext/public/images/erpnext_logo.svg new file mode 100644 index 0000000000..af3a84953b --- /dev/null +++ b/erpnext/public/images/erpnext_logo.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From a43e760703afc80d5b37f51fe881379b1cdaee3a Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sun, 23 Aug 2020 16:36:28 +0530 Subject: [PATCH 007/414] fix: Item dashboard style --- erpnext/public/less/erpnext.less | 5 +++-- erpnext/stock/dashboard/item_dashboard_list.html | 8 ++++---- erpnext/stock/doctype/item/item_dashboard.py | 8 ++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/erpnext/public/less/erpnext.less b/erpnext/public/less/erpnext.less index 8685837d33..1488bdd9c7 100644 --- a/erpnext/public/less/erpnext.less +++ b/erpnext/public/less/erpnext.less @@ -39,8 +39,9 @@ .dashboard-list-item { background-color: inherit; - padding: 5px 0px; - border-bottom: 1px solid @border-color; + border-bottom: 1px solid var(--border-color); + font-size: var(--text-md); + color: var(--text-color); } #page-stock-balance .dashboard-list-item { diff --git a/erpnext/stock/dashboard/item_dashboard_list.html b/erpnext/stock/dashboard/item_dashboard_list.html index e1914ed76a..0c10be462a 100644 --- a/erpnext/stock/dashboard/item_dashboard_list.html +++ b/erpnext/stock/dashboard/item_dashboard_list.html @@ -1,10 +1,10 @@ {% for d in data %}
-
+ -
+
{% if show_item %} {{ d.item_code }} @@ -12,7 +12,7 @@ {% endif %}
-
+
{{ d.total_reserved }} @@ -40,7 +40,7 @@
{% if can_write %} -
+
{% if d.actual_qty %}
diff --git a/erpnext/education/doctype/student_admission/templates/student_admission_row.html b/erpnext/education/doctype/student_admission/templates/student_admission_row.html index e049773037..726602d21c 100644 --- a/erpnext/education/doctype/student_admission/templates/student_admission_row.html +++ b/erpnext/education/doctype/student_admission/templates/student_admission_row.html @@ -11,7 +11,7 @@ {% elif frappe.utils.getdate(doc.admission_start_date) > today %} blue {% else %} - darkgrey + darkgray {% endif %} ">{{ doc.title }}
diff --git a/erpnext/hr/doctype/employee/employee_list.js b/erpnext/hr/doctype/employee/employee_list.js index 7a66d12bf5..1a82dd8be7 100644 --- a/erpnext/hr/doctype/employee/employee_list.js +++ b/erpnext/hr/doctype/employee/employee_list.js @@ -3,7 +3,7 @@ frappe.listview_settings['Employee'] = { filters: [["status","=", "Active"]], get_indicator: function(doc) { var indicator = [__(doc.status), frappe.utils.guess_colour(doc.status), "status,=," + doc.status]; - indicator[1] = {"Active": "green", "Temporary Leave": "red", "Left": "darkgrey"}[doc.status]; + indicator[1] = {"Active": "green", "Temporary Leave": "red", "Left": "darkgray"}[doc.status]; return indicator; } }; diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation_list.js b/erpnext/hr/doctype/leave_allocation/leave_allocation_list.js index 93f7b8356b..1af05bde69 100644 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation_list.js +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation_list.js @@ -5,7 +5,7 @@ frappe.listview_settings['Leave Allocation'] = { get_indicator: function(doc) { if(doc.status==="Expired") { - return [__("Expired"), "darkgrey", "expired, =, 1"]; + return [__("Expired"), "darkgray", "expired, =, 1"]; } }, }; diff --git a/erpnext/hr/page/team_updates/team_updates.js b/erpnext/hr/page/team_updates/team_updates.js index da1f5316a0..030fa66549 100644 --- a/erpnext/hr/page/team_updates/team_updates.js +++ b/erpnext/hr/page/team_updates/team_updates.js @@ -41,7 +41,7 @@ frappe.team_updates = { me.add_row(d); }); } else { - frappe.show_alert({message:__('No more updates'), indicator:'darkgrey'}); + frappe.show_alert({message:__('No more updates'), indicator:'darkgray'}); me.more.parent().addClass('hidden'); } } diff --git a/erpnext/manufacturing/doctype/bom/bom_list.js b/erpnext/manufacturing/doctype/bom/bom_list.js index 94cb466bd8..90d1d82528 100644 --- a/erpnext/manufacturing/doctype/bom/bom_list.js +++ b/erpnext/manufacturing/doctype/bom/bom_list.js @@ -8,7 +8,7 @@ frappe.listview_settings['BOM'] = { } else if(doc.is_active) { return [__("Active"), "blue", "is_active,=,Yes"]; } else if(!doc.is_active) { - return [__("Not active"), "darkgrey", "is_active,=,No"]; + return [__("Not active"), "darkgray", "is_active,=,No"]; } } }; diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan_list.js b/erpnext/manufacturing/doctype/production_plan/production_plan_list.js index d377ef0af7..f5a491402a 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan_list.js +++ b/erpnext/manufacturing/doctype/production_plan/production_plan_list.js @@ -9,8 +9,8 @@ frappe.listview_settings['Production Plan'] = { "Draft": "red", "In Process": "orange", "Completed": "green", - "Material Requested": "darkgrey", - "Cancelled": "darkgrey" + "Material Requested": "darkgray", + "Cancelled": "darkgray" }[doc.status], "status,=," + doc.status]; } } diff --git a/erpnext/manufacturing/doctype/work_order/work_order_list.js b/erpnext/manufacturing/doctype/work_order/work_order_list.js index 8d18395acd..6959a347c4 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order_list.js +++ b/erpnext/manufacturing/doctype/work_order/work_order_list.js @@ -12,7 +12,7 @@ frappe.listview_settings['Work Order'] = { "Not Started": "red", "In Process": "orange", "Completed": "green", - "Cancelled": "darkgrey" + "Cancelled": "darkgray" }[doc.status], "status,=," + doc.status]; } } diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index ab095ebfe0..af34fe8a04 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -19,7 +19,7 @@ class Quotation(SellingController): self.indicator_color = 'blue' self.indicator_title = 'Submitted' if self.valid_till and getdate(self.valid_till) < getdate(nowdate()): - self.indicator_color = 'darkgrey' + self.indicator_color = 'darkgray' self.indicator_title = 'Expired' def validate(self): diff --git a/erpnext/selling/doctype/quotation/quotation_list.js b/erpnext/selling/doctype/quotation/quotation_list.js index f425acf180..41a9397e54 100644 --- a/erpnext/selling/doctype/quotation/quotation_list.js +++ b/erpnext/selling/doctype/quotation/quotation_list.js @@ -20,9 +20,9 @@ frappe.listview_settings['Quotation'] = { } else if(doc.status==="Ordered") { return [__("Ordered"), "green", "status,=,Ordered"]; } else if(doc.status==="Lost") { - return [__("Lost"), "darkgrey", "status,=,Lost"]; + return [__("Lost"), "darkgray", "status,=,Lost"]; } else if(doc.status==="Expired") { - return [__("Expired"), "darkgrey", "status,=,Expired"]; + return [__("Expired"), "darkgray", "status,=,Expired"]; } } }; diff --git a/erpnext/stock/doctype/batch/batch_list.js b/erpnext/stock/doctype/batch/batch_list.js index d4f74c3a21..f4ab50c312 100644 --- a/erpnext/stock/doctype/batch/batch_list.js +++ b/erpnext/stock/doctype/batch/batch_list.js @@ -2,9 +2,9 @@ frappe.listview_settings['Batch'] = { add_fields: ["item", "expiry_date", "batch_qty", "disabled"], get_indicator: (doc) => { if (doc.disabled) { - return [__("Disabled"), "darkgrey", "disabled,=,1"]; + return [__("Disabled"), "darkgray", "disabled,=,1"]; } else if (!doc.batch_qty) { - return [__("Empty"), "darkgrey", "batch_qty,=,0|disabled,=,0"]; + return [__("Empty"), "darkgray", "batch_qty,=,0|disabled,=,0"]; } else if (doc.expiry_date && frappe.datetime.get_diff(doc.expiry_date, frappe.datetime.nowdate()) <= 0) { return [__("Expired"), "red", "expiry_date,not in,|expiry_date,<=,Today|batch_qty,>,0|disabled,=,0"] } else { diff --git a/erpnext/stock/doctype/delivery_note/delivery_note_list.js b/erpnext/stock/doctype/delivery_note/delivery_note_list.js index 0ae7c37b3f..1fd12f187a 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note_list.js +++ b/erpnext/stock/doctype/delivery_note/delivery_note_list.js @@ -3,7 +3,7 @@ frappe.listview_settings['Delivery Note'] = { "transporter_name", "grand_total", "is_return", "status", "currency"], get_indicator: function(doc) { if(cint(doc.is_return)==1) { - return [__("Return"), "darkgrey", "is_return,=,Yes"]; + return [__("Return"), "darkgray", "is_return,=,Yes"]; } else if (doc.status === "Closed") { return [__("Closed"), "green", "status,=,Closed"]; } else if (flt(doc.per_billed, 2) < 100) { diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js index e81f323a46..f294ce9fcc 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js @@ -3,7 +3,7 @@ frappe.listview_settings['Purchase Receipt'] = { "transporter_name", "is_return", "status", "per_billed", "currency"], get_indicator: function(doc) { if(cint(doc.is_return)==1) { - return [__("Return"), "darkgrey", "is_return,=,Yes"]; + return [__("Return"), "darkgray", "is_return,=,Yes"]; } else if (doc.status === "Closed") { return [__("Closed"), "green", "status,=,Closed"]; } else if (flt(doc.grand_total) !== 0 && flt(doc.per_billed, 2) < 100) { diff --git a/erpnext/support/doctype/issue/issue_list.js b/erpnext/support/doctype/issue/issue_list.js index 513a8dca22..2a8f05dc42 100644 --- a/erpnext/support/doctype/issue/issue_list.js +++ b/erpnext/support/doctype/issue/issue_list.js @@ -28,7 +28,7 @@ frappe.listview_settings['Issue'] = { } else if (doc.status === 'Closed') { return [__(doc.status), "green", "status,=," + doc.status]; } else { - return [__(doc.status), "darkgrey", "status,=," + doc.status]; + return [__(doc.status), "darkgray", "status,=," + doc.status]; } } } diff --git a/erpnext/templates/includes/address_row.html b/erpnext/templates/includes/address_row.html index dadd2dff10..01aea9100a 100644 --- a/erpnext/templates/includes/address_row.html +++ b/erpnext/templates/includes/address_row.html @@ -2,7 +2,7 @@
- {{ doc.address_title }} + {{ doc.address_title }}
{{ _(doc.address_type) }}
{{ doc.city }}
diff --git a/erpnext/templates/includes/issue_row.html b/erpnext/templates/includes/issue_row.html index ff868fabb5..e41e78abc6 100644 --- a/erpnext/templates/includes/issue_row.html +++ b/erpnext/templates/includes/issue_row.html @@ -2,7 +2,7 @@
- {% set indicator = 'red' if doc.status == 'Open' else 'darkgrey' %} + {% set indicator = 'red' if doc.status == 'Open' else 'darkgray' %} {% set indicator = 'green' if doc.status == 'Closed' else indicator %} {{ doc.name }} @@ -10,7 +10,7 @@
{{ doc.subject }}
- {% set indicator = 'red' if doc.status == 'Open' else 'darkgrey' %} + {% set indicator = 'red' if doc.status == 'Open' else 'darkgray' %} {% set indicator = 'green' if doc.status == 'Closed' else indicator %} {% set indicator = 'orange' if doc.status == 'Open' and doc.priority == 'Medium' else indicator %} {% set indicator = 'yellow' if doc.status == 'Open' and doc.priority == 'Low' else indicator %} diff --git a/erpnext/templates/includes/projects/project_row.html b/erpnext/templates/includes/projects/project_row.html index 73c83ef560..3fd102a737 100644 --- a/erpnext/templates/includes/projects/project_row.html +++ b/erpnext/templates/includes/projects/project_row.html @@ -15,7 +15,7 @@
{% else %} - + {{ doc.status }} {% endif %}
diff --git a/erpnext/templates/includes/projects/project_tasks.html b/erpnext/templates/includes/projects/project_tasks.html index 94c692cdd2..2f148dd58d 100644 --- a/erpnext/templates/includes/projects/project_tasks.html +++ b/erpnext/templates/includes/projects/project_tasks.html @@ -3,7 +3,7 @@
- {{ task.subject }} + {{ task.subject }}
{{ _("modified") }} {{ frappe.utils.pretty_date(task.modified) }} @@ -16,9 +16,9 @@ {% else %} - + - {% endif %} + {% endif %} {% endif %}
diff --git a/erpnext/templates/includes/timesheet/timesheet_row.html b/erpnext/templates/includes/timesheet/timesheet_row.html index 4852f59b5d..12bbbfb3ae 100644 --- a/erpnext/templates/includes/timesheet/timesheet_row.html +++ b/erpnext/templates/includes/timesheet/timesheet_row.html @@ -1,7 +1,7 @@
- + {{ doc.name }}
diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html index 80a542f74b..1f5cb4e92d 100644 --- a/erpnext/templates/includes/transaction_row.html +++ b/erpnext/templates/includes/transaction_row.html @@ -1,7 +1,7 @@
- + {{ doc.name }}
diff --git a/erpnext/templates/pages/material_request_info.html b/erpnext/templates/pages/material_request_info.html index 9d189895b6..fce4a40498 100644 --- a/erpnext/templates/pages/material_request_info.html +++ b/erpnext/templates/pages/material_request_info.html @@ -20,7 +20,7 @@
- + {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index 9e3c58b45b..9941446685 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -34,7 +34,7 @@
- + {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
diff --git a/erpnext/templates/pages/rfq.html b/erpnext/templates/pages/rfq.html index 5b27a94553..7e7e7f4266 100644 --- a/erpnext/templates/pages/rfq.html +++ b/erpnext/templates/pages/rfq.html @@ -77,13 +77,13 @@
- {{d.name}} + {{d.name}}
- {{d.status}} + {{d.status}}
- {{d.transaction_date}} + {{d.transaction_date}}
Link From b6ebcd7559b42caa99e06cc8bc1be2055c6fe82d Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 27 Aug 2020 18:57:18 +0530 Subject: [PATCH 011/414] refactor: Replace darkgray indicator with gray indicator --- .../doctype/payment_request/payment_request_list.js | 2 +- .../doctype/purchase_invoice/purchase_invoice_list.js | 8 ++++---- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 4 ++-- .../accounts/doctype/sales_invoice/sales_invoice_list.js | 4 ++-- .../accounts/doctype/subscription/subscription_list.js | 2 +- .../doctype/supplier_quotation/supplier_quotation_list.js | 4 ++-- .../doctype/supplier_scorecard/supplier_scorecard_list.js | 2 +- erpnext/crm/doctype/contract/contract_list.js | 2 +- .../student_admission/templates/student_admission.html | 2 +- .../templates/student_admission_row.html | 2 +- erpnext/hr/doctype/employee/employee_list.js | 2 +- .../hr/doctype/leave_allocation/leave_allocation_list.js | 2 +- erpnext/hr/page/team_updates/team_updates.js | 2 +- erpnext/manufacturing/doctype/bom/bom_list.js | 2 +- .../doctype/production_plan/production_plan_list.js | 4 ++-- .../manufacturing/doctype/work_order/work_order_list.js | 2 +- erpnext/selling/doctype/quotation/quotation.py | 2 +- erpnext/selling/doctype/quotation/quotation_list.js | 4 ++-- erpnext/stock/doctype/batch/batch_list.js | 4 ++-- erpnext/stock/doctype/delivery_note/delivery_note_list.js | 2 +- .../doctype/purchase_receipt/purchase_receipt_list.js | 2 +- erpnext/support/doctype/issue/issue_list.js | 2 +- erpnext/templates/includes/address_row.html | 2 +- erpnext/templates/includes/issue_row.html | 4 ++-- erpnext/templates/includes/projects/project_row.html | 2 +- erpnext/templates/includes/projects/project_tasks.html | 2 +- .../templates/includes/projects/project_timesheets.html | 2 +- erpnext/templates/includes/timesheet/timesheet_row.html | 2 +- erpnext/templates/includes/transaction_row.html | 2 +- erpnext/templates/pages/material_request_info.html | 2 +- erpnext/templates/pages/order.html | 2 +- erpnext/templates/pages/rfq.html | 6 +++--- 32 files changed, 44 insertions(+), 44 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request_list.js b/erpnext/accounts/doctype/payment_request/payment_request_list.js index 4137dfa3dc..85d729cd61 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request_list.js +++ b/erpnext/accounts/doctype/payment_request/payment_request_list.js @@ -2,7 +2,7 @@ frappe.listview_settings['Payment Request'] = { add_fields: ["status"], get_indicator: function(doc) { if(doc.status == "Draft") { - return [__("Draft"), "darkgray", "status,=,Draft"]; + return [__("Draft"), "gray", "status,=,Draft"]; } if(doc.status == "Requested") { return [__("Requested"), "green", "status,=,Requested"]; diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js index 613d661e08..661559a605 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js @@ -7,19 +7,19 @@ frappe.listview_settings['Purchase Invoice'] = { "currency", "is_return", "release_date", "on_hold"], get_indicator: function(doc) { if( (flt(doc.outstanding_amount) <= 0) && doc.docstatus == 1 && doc.status == 'Debit Note Issued') { - return [__("Debit Note Issued"), "darkgray", "outstanding_amount,<=,0"]; + return [__("Debit Note Issued"), "gray", "outstanding_amount,<=,0"]; } else if(flt(doc.outstanding_amount) > 0 && doc.docstatus==1) { if(cint(doc.on_hold) && !doc.release_date) { - return [__("On Hold"), "darkgray"]; + return [__("On Hold"), "gray"]; } else if(cint(doc.on_hold) && doc.release_date && frappe.datetime.get_diff(doc.release_date, frappe.datetime.nowdate()) > 0) { - return [__("Temporarily on Hold"), "darkgray"]; + return [__("Temporarily on Hold"), "gray"]; } else if(frappe.datetime.get_diff(doc.due_date) < 0) { return [__("Overdue"), "red", "outstanding_amount,>,0|due_date,<,Today"]; } else { return [__("Unpaid"), "orange", "outstanding_amount,>,0|due_date,>=,Today"]; } } else if(cint(doc.is_return)) { - return [__("Return"), "darkgray", "is_return,=,Yes"]; + return [__("Return"), "gray", "is_return,=,Yes"]; } else if(flt(doc.outstanding_amount)==0 && doc.docstatus==1) { return [__("Paid"), "green", "outstanding_amount,=,0"]; } diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 89cdf853e2..cd39438442 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -53,7 +53,7 @@ class SalesInvoice(SellingController): """Set indicator for portal""" if self.outstanding_amount < 0: self.indicator_title = _("Credit Note Issued") - self.indicator_color = "darkgray" + self.indicator_color = "gray" elif self.outstanding_amount > 0 and getdate(self.due_date) >= getdate(nowdate()): self.indicator_color = "orange" self.indicator_title = _("Unpaid") @@ -62,7 +62,7 @@ class SalesInvoice(SellingController): self.indicator_title = _("Overdue") elif cint(self.is_return) == 1: self.indicator_title = _("Return") - self.indicator_color = "darkgray" + self.indicator_color = "gray" else: self.indicator_color = "green" self.indicator_title = _("Paid") diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js index c85773a31b..5ac86d6f25 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js @@ -10,8 +10,8 @@ frappe.listview_settings['Sales Invoice'] = { "Draft": "grey", "Unpaid": "orange", "Paid": "green", - "Return": "darkgray", - "Credit Note Issued": "darkgray", + "Return": "gray", + "Credit Note Issued": "gray", "Unpaid and Discounted": "orange", "Overdue and Discounted": "red", "Overdue": "red" diff --git a/erpnext/accounts/doctype/subscription/subscription_list.js b/erpnext/accounts/doctype/subscription/subscription_list.js index 4670c6b6bb..c7325fb9f7 100644 --- a/erpnext/accounts/doctype/subscription/subscription_list.js +++ b/erpnext/accounts/doctype/subscription/subscription_list.js @@ -11,7 +11,7 @@ frappe.listview_settings['Subscription'] = { } else if(doc.status === 'Unpaid') { return [__("Unpaid"), "red"]; } else if(doc.status === 'Cancelled') { - return [__("Cancelled"), "darkgray"]; + return [__("Cancelled"), "gray"]; } } }; \ No newline at end of file diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_list.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_list.js index ede154f9c8..5ab6c980d0 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_list.js +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_list.js @@ -4,9 +4,9 @@ frappe.listview_settings['Supplier Quotation'] = { if(doc.status==="Ordered") { return [__("Ordered"), "green", "status,=,Ordered"]; } else if(doc.status==="Rejected") { - return [__("Lost"), "darkgray", "status,=,Lost"]; + return [__("Lost"), "gray", "status,=,Lost"]; } else if(doc.status==="Expired") { - return [__("Expired"), "darkgray", "status,=,Expired"]; + return [__("Expired"), "gray", "status,=,Expired"]; } } }; diff --git a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_list.js b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_list.js index aa1e5c37f4..dc5474e3b4 100644 --- a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_list.js +++ b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_list.js @@ -10,7 +10,7 @@ frappe.listview_settings["Supplier Scorecard"] = { if (doc.indicator_color) { return [__(doc.status), doc.indicator_color.toLowerCase(), "status,=," + doc.status]; } else { - return [__("Unknown"), "darkgray", "status,=,''"]; + return [__("Unknown"), "gray", "status,=,''"]; } }, diff --git a/erpnext/crm/doctype/contract/contract_list.js b/erpnext/crm/doctype/contract/contract_list.js index ff580455f7..a09d123ed2 100644 --- a/erpnext/crm/doctype/contract/contract_list.js +++ b/erpnext/crm/doctype/contract/contract_list.js @@ -6,7 +6,7 @@ frappe.listview_settings['Contract'] = { } else if (doc.status == "Active") { return [__(doc.status), "green", "status,=," + doc.status]; } else if (doc.status == "Inactive") { - return [__(doc.status), "darkgray", "status,=," + doc.status]; + return [__(doc.status), "gray", "status,=," + doc.status]; } }, }; \ No newline at end of file diff --git a/erpnext/education/doctype/student_admission/templates/student_admission.html b/erpnext/education/doctype/student_admission/templates/student_admission.html index 6fc79b6054..5cbf36a293 100644 --- a/erpnext/education/doctype/student_admission/templates/student_admission.html +++ b/erpnext/education/doctype/student_admission/templates/student_admission.html @@ -21,7 +21,7 @@ {% elif frappe.utils.getdate(doc.admission_start_date) > today %} blue"> Application will open {% else %} - darkgray + gray {% endif %}
diff --git a/erpnext/education/doctype/student_admission/templates/student_admission_row.html b/erpnext/education/doctype/student_admission/templates/student_admission_row.html index 726602d21c..288e542ab1 100644 --- a/erpnext/education/doctype/student_admission/templates/student_admission_row.html +++ b/erpnext/education/doctype/student_admission/templates/student_admission_row.html @@ -11,7 +11,7 @@ {% elif frappe.utils.getdate(doc.admission_start_date) > today %} blue {% else %} - darkgray + gray {% endif %} ">{{ doc.title }}
diff --git a/erpnext/hr/doctype/employee/employee_list.js b/erpnext/hr/doctype/employee/employee_list.js index 1a82dd8be7..44837030be 100644 --- a/erpnext/hr/doctype/employee/employee_list.js +++ b/erpnext/hr/doctype/employee/employee_list.js @@ -3,7 +3,7 @@ frappe.listview_settings['Employee'] = { filters: [["status","=", "Active"]], get_indicator: function(doc) { var indicator = [__(doc.status), frappe.utils.guess_colour(doc.status), "status,=," + doc.status]; - indicator[1] = {"Active": "green", "Temporary Leave": "red", "Left": "darkgray"}[doc.status]; + indicator[1] = {"Active": "green", "Temporary Leave": "red", "Left": "gray"}[doc.status]; return indicator; } }; diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation_list.js b/erpnext/hr/doctype/leave_allocation/leave_allocation_list.js index 1af05bde69..3ab176f809 100644 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation_list.js +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation_list.js @@ -5,7 +5,7 @@ frappe.listview_settings['Leave Allocation'] = { get_indicator: function(doc) { if(doc.status==="Expired") { - return [__("Expired"), "darkgray", "expired, =, 1"]; + return [__("Expired"), "gray", "expired, =, 1"]; } }, }; diff --git a/erpnext/hr/page/team_updates/team_updates.js b/erpnext/hr/page/team_updates/team_updates.js index 030fa66549..29780b8161 100644 --- a/erpnext/hr/page/team_updates/team_updates.js +++ b/erpnext/hr/page/team_updates/team_updates.js @@ -41,7 +41,7 @@ frappe.team_updates = { me.add_row(d); }); } else { - frappe.show_alert({message:__('No more updates'), indicator:'darkgray'}); + frappe.show_alert({message:__('No more updates'), indicator:'gray'}); me.more.parent().addClass('hidden'); } } diff --git a/erpnext/manufacturing/doctype/bom/bom_list.js b/erpnext/manufacturing/doctype/bom/bom_list.js index 90d1d82528..4b5887f180 100644 --- a/erpnext/manufacturing/doctype/bom/bom_list.js +++ b/erpnext/manufacturing/doctype/bom/bom_list.js @@ -8,7 +8,7 @@ frappe.listview_settings['BOM'] = { } else if(doc.is_active) { return [__("Active"), "blue", "is_active,=,Yes"]; } else if(!doc.is_active) { - return [__("Not active"), "darkgray", "is_active,=,No"]; + return [__("Not active"), "gray", "is_active,=,No"]; } } }; diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan_list.js b/erpnext/manufacturing/doctype/production_plan/production_plan_list.js index f5a491402a..5c81494215 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan_list.js +++ b/erpnext/manufacturing/doctype/production_plan/production_plan_list.js @@ -9,8 +9,8 @@ frappe.listview_settings['Production Plan'] = { "Draft": "red", "In Process": "orange", "Completed": "green", - "Material Requested": "darkgray", - "Cancelled": "darkgray" + "Material Requested": "gray", + "Cancelled": "gray" }[doc.status], "status,=," + doc.status]; } } diff --git a/erpnext/manufacturing/doctype/work_order/work_order_list.js b/erpnext/manufacturing/doctype/work_order/work_order_list.js index 6959a347c4..81c23bb710 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order_list.js +++ b/erpnext/manufacturing/doctype/work_order/work_order_list.js @@ -12,7 +12,7 @@ frappe.listview_settings['Work Order'] = { "Not Started": "red", "In Process": "orange", "Completed": "green", - "Cancelled": "darkgray" + "Cancelled": "gray" }[doc.status], "status,=," + doc.status]; } } diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index af34fe8a04..4fb19f88b8 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -19,7 +19,7 @@ class Quotation(SellingController): self.indicator_color = 'blue' self.indicator_title = 'Submitted' if self.valid_till and getdate(self.valid_till) < getdate(nowdate()): - self.indicator_color = 'darkgray' + self.indicator_color = 'gray' self.indicator_title = 'Expired' def validate(self): diff --git a/erpnext/selling/doctype/quotation/quotation_list.js b/erpnext/selling/doctype/quotation/quotation_list.js index 41a9397e54..b631685bd1 100644 --- a/erpnext/selling/doctype/quotation/quotation_list.js +++ b/erpnext/selling/doctype/quotation/quotation_list.js @@ -20,9 +20,9 @@ frappe.listview_settings['Quotation'] = { } else if(doc.status==="Ordered") { return [__("Ordered"), "green", "status,=,Ordered"]; } else if(doc.status==="Lost") { - return [__("Lost"), "darkgray", "status,=,Lost"]; + return [__("Lost"), "gray", "status,=,Lost"]; } else if(doc.status==="Expired") { - return [__("Expired"), "darkgray", "status,=,Expired"]; + return [__("Expired"), "gray", "status,=,Expired"]; } } }; diff --git a/erpnext/stock/doctype/batch/batch_list.js b/erpnext/stock/doctype/batch/batch_list.js index f4ab50c312..0de9fd0150 100644 --- a/erpnext/stock/doctype/batch/batch_list.js +++ b/erpnext/stock/doctype/batch/batch_list.js @@ -2,9 +2,9 @@ frappe.listview_settings['Batch'] = { add_fields: ["item", "expiry_date", "batch_qty", "disabled"], get_indicator: (doc) => { if (doc.disabled) { - return [__("Disabled"), "darkgray", "disabled,=,1"]; + return [__("Disabled"), "gray", "disabled,=,1"]; } else if (!doc.batch_qty) { - return [__("Empty"), "darkgray", "batch_qty,=,0|disabled,=,0"]; + return [__("Empty"), "gray", "batch_qty,=,0|disabled,=,0"]; } else if (doc.expiry_date && frappe.datetime.get_diff(doc.expiry_date, frappe.datetime.nowdate()) <= 0) { return [__("Expired"), "red", "expiry_date,not in,|expiry_date,<=,Today|batch_qty,>,0|disabled,=,0"] } else { diff --git a/erpnext/stock/doctype/delivery_note/delivery_note_list.js b/erpnext/stock/doctype/delivery_note/delivery_note_list.js index 1fd12f187a..98ababa075 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note_list.js +++ b/erpnext/stock/doctype/delivery_note/delivery_note_list.js @@ -3,7 +3,7 @@ frappe.listview_settings['Delivery Note'] = { "transporter_name", "grand_total", "is_return", "status", "currency"], get_indicator: function(doc) { if(cint(doc.is_return)==1) { - return [__("Return"), "darkgray", "is_return,=,Yes"]; + return [__("Return"), "gray", "is_return,=,Yes"]; } else if (doc.status === "Closed") { return [__("Closed"), "green", "status,=,Closed"]; } else if (flt(doc.per_billed, 2) < 100) { diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js index f294ce9fcc..aed2e4968f 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js @@ -3,7 +3,7 @@ frappe.listview_settings['Purchase Receipt'] = { "transporter_name", "is_return", "status", "per_billed", "currency"], get_indicator: function(doc) { if(cint(doc.is_return)==1) { - return [__("Return"), "darkgray", "is_return,=,Yes"]; + return [__("Return"), "gray", "is_return,=,Yes"]; } else if (doc.status === "Closed") { return [__("Closed"), "green", "status,=,Closed"]; } else if (flt(doc.grand_total) !== 0 && flt(doc.per_billed, 2) < 100) { diff --git a/erpnext/support/doctype/issue/issue_list.js b/erpnext/support/doctype/issue/issue_list.js index 2a8f05dc42..e04498e29e 100644 --- a/erpnext/support/doctype/issue/issue_list.js +++ b/erpnext/support/doctype/issue/issue_list.js @@ -28,7 +28,7 @@ frappe.listview_settings['Issue'] = { } else if (doc.status === 'Closed') { return [__(doc.status), "green", "status,=," + doc.status]; } else { - return [__(doc.status), "darkgray", "status,=," + doc.status]; + return [__(doc.status), "gray", "status,=," + doc.status]; } } } diff --git a/erpnext/templates/includes/address_row.html b/erpnext/templates/includes/address_row.html index 01aea9100a..6d4dd5444c 100644 --- a/erpnext/templates/includes/address_row.html +++ b/erpnext/templates/includes/address_row.html @@ -2,7 +2,7 @@
- {{ doc.address_title }} + {{ doc.address_title }}
{{ _(doc.address_type) }}
{{ doc.city }}
diff --git a/erpnext/templates/includes/issue_row.html b/erpnext/templates/includes/issue_row.html index e41e78abc6..d909c5feea 100644 --- a/erpnext/templates/includes/issue_row.html +++ b/erpnext/templates/includes/issue_row.html @@ -2,7 +2,7 @@
- {% set indicator = 'red' if doc.status == 'Open' else 'darkgray' %} + {% set indicator = 'red' if doc.status == 'Open' else 'gray' %} {% set indicator = 'green' if doc.status == 'Closed' else indicator %} {{ doc.name }} @@ -10,7 +10,7 @@
{{ doc.subject }}
- {% set indicator = 'red' if doc.status == 'Open' else 'darkgray' %} + {% set indicator = 'red' if doc.status == 'Open' else 'gray' %} {% set indicator = 'green' if doc.status == 'Closed' else indicator %} {% set indicator = 'orange' if doc.status == 'Open' and doc.priority == 'Medium' else indicator %} {% set indicator = 'yellow' if doc.status == 'Open' and doc.priority == 'Low' else indicator %} diff --git a/erpnext/templates/includes/projects/project_row.html b/erpnext/templates/includes/projects/project_row.html index 3fd102a737..4c8c40db00 100644 --- a/erpnext/templates/includes/projects/project_row.html +++ b/erpnext/templates/includes/projects/project_row.html @@ -15,7 +15,7 @@
{% else %} - + {{ doc.status }} {% endif %}
diff --git a/erpnext/templates/includes/projects/project_tasks.html b/erpnext/templates/includes/projects/project_tasks.html index 2f148dd58d..50b9f4b259 100644 --- a/erpnext/templates/includes/projects/project_tasks.html +++ b/erpnext/templates/includes/projects/project_tasks.html @@ -3,7 +3,7 @@
- {{ task.subject }} + {{ task.subject }}
{{ _("modified") }} {{ frappe.utils.pretty_date(task.modified) }} diff --git a/erpnext/templates/includes/projects/project_timesheets.html b/erpnext/templates/includes/projects/project_timesheets.html index e2a9c60069..05a07c12e8 100644 --- a/erpnext/templates/includes/projects/project_timesheets.html +++ b/erpnext/templates/includes/projects/project_timesheets.html @@ -3,7 +3,7 @@
- {{ timesheet.info.name }} + {{ timesheet.info.name }}
{{ _("From") }} {{ frappe.format_date(timesheet.from_time) }} {{ _("to") }} {{ frappe.format_date(timesheet.to_time) }}
diff --git a/erpnext/templates/includes/timesheet/timesheet_row.html b/erpnext/templates/includes/timesheet/timesheet_row.html index 12bbbfb3ae..0f9cc77e89 100644 --- a/erpnext/templates/includes/timesheet/timesheet_row.html +++ b/erpnext/templates/includes/timesheet/timesheet_row.html @@ -1,7 +1,7 @@
- + {{ doc.name }}
diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html index 1f5cb4e92d..383413103e 100644 --- a/erpnext/templates/includes/transaction_row.html +++ b/erpnext/templates/includes/transaction_row.html @@ -1,7 +1,7 @@
- + {{ doc.name }}
diff --git a/erpnext/templates/pages/material_request_info.html b/erpnext/templates/pages/material_request_info.html index fce4a40498..b6399e7481 100644 --- a/erpnext/templates/pages/material_request_info.html +++ b/erpnext/templates/pages/material_request_info.html @@ -20,7 +20,7 @@
- + {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index 9941446685..3db05bdeab 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -34,7 +34,7 @@
- + {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
diff --git a/erpnext/templates/pages/rfq.html b/erpnext/templates/pages/rfq.html index 7e7e7f4266..6e2edb6391 100644 --- a/erpnext/templates/pages/rfq.html +++ b/erpnext/templates/pages/rfq.html @@ -77,13 +77,13 @@
- {{d.name}} + {{d.name}}
- {{d.status}} + {{d.status}}
- {{d.transaction_date}} + {{d.transaction_date}}
Link From a49af09705f96fc44464b8fc766d43d4210c82c3 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 27 Aug 2020 18:57:43 +0530 Subject: [PATCH 012/414] fix: Primary button icon --- erpnext/accounts/doctype/account/account_tree.js | 2 +- erpnext/support/doctype/issue/issue.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js index 28b090bdad..ea8ca0b7d8 100644 --- a/erpnext/accounts/doctype/account/account_tree.js +++ b/erpnext/accounts/doctype/account/account_tree.js @@ -120,7 +120,7 @@ frappe.treeview_settings["Account"] = { } else { treeview.new_node(); } - }, "octicon octicon-plus"); + }, "add"); }, onrender: function(node) { if(frappe.boot.user.can_read.indexOf("GL Entry") !== -1){ diff --git a/erpnext/support/doctype/issue/issue.js b/erpnext/support/doctype/issue/issue.js index 9e15757ce0..95ff197802 100644 --- a/erpnext/support/doctype/issue/issue.js +++ b/erpnext/support/doctype/issue/issue.js @@ -164,7 +164,7 @@ frappe.ui.form.on("Issue", { ${split_issue} `) .appendTo(frm.timeline.wrapper.find('.comment-header .asset-details:not([data-communication-type="Comment"])')) - if (!frm.timeline.wrapper.data("split-issue-event-attached")){ + if (!frm.timeline.wrapper.data("split-issue-event-attached")) { frm.timeline.wrapper.on('click', '.btn-split-issue', (e) => { var dialog = new frappe.ui.Dialog({ title: __("Split Issue"), From a324e9bd1252da3abadb0c2ae556c34d593d14d1 Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 27 Aug 2020 19:26:14 +0530 Subject: [PATCH 013/414] fix: remove text-muted and small class fromtree items --- erpnext/accounts/doctype/account/account_tree.js | 2 +- .../healthcare_service_unit/healthcare_service_unit_tree.js | 6 +++--- erpnext/stock/doctype/warehouse/warehouse_tree.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js index ea8ca0b7d8..e7539f86ed 100644 --- a/erpnext/accounts/doctype/account/account_tree.js +++ b/erpnext/accounts/doctype/account/account_tree.js @@ -130,7 +130,7 @@ frappe.treeview_settings["Account"] = { let dr_or_cr = balance > 0 ? "Dr": "Cr"; if (node.data && node.data.balance!==undefined) { - $('' + $('' + (node.data.balance_in_account_currency ? (format_currency(Math.abs(node.data.balance_in_account_currency), node.data.account_currency) + " / ") : "") diff --git a/erpnext/healthcare/doctype/healthcare_service_unit/healthcare_service_unit_tree.js b/erpnext/healthcare/doctype/healthcare_service_unit/healthcare_service_unit_tree.js index a03b579c50..bfb0ba13ce 100644 --- a/erpnext/healthcare/doctype/healthcare_service_unit/healthcare_service_unit_tree.js +++ b/erpnext/healthcare/doctype/healthcare_service_unit/healthcare_service_unit_tree.js @@ -13,19 +13,19 @@ frappe.treeview_settings["Healthcare Service Unit"] = { ignore_fields:["parent_healthcare_service_unit"], onrender: function(node) { if (node.data.occupied_out_of_vacant!==undefined){ - $('' + $('' + " " + node.data.occupied_out_of_vacant + '').insertBefore(node.$ul); } if (node.data && node.data.inpatient_occupancy!==undefined) { if (node.data.inpatient_occupancy == 1){ if (node.data.occupancy_status == "Occupied"){ - $('' + $('' + " " + node.data.occupancy_status + '').insertBefore(node.$ul); } if (node.data.occupancy_status == "Vacant"){ - $('' + $('' + " " + node.data.occupancy_status + '').insertBefore(node.$ul); } diff --git a/erpnext/stock/doctype/warehouse/warehouse_tree.js b/erpnext/stock/doctype/warehouse/warehouse_tree.js index 918d2f1559..3665c0530f 100644 --- a/erpnext/stock/doctype/warehouse/warehouse_tree.js +++ b/erpnext/stock/doctype/warehouse/warehouse_tree.js @@ -19,7 +19,7 @@ frappe.treeview_settings['Warehouse'] = { ignore_fields:["parent_warehouse"], onrender: function(node) { if (node.data && node.data.balance!==undefined) { - $('' + $('' + format_currency(Math.abs(node.data.balance), node.data.company_currency) + '').insertBefore(node.$ul); } From a6cb27cb8e89df0b959bdcb7c64250e86fac1fb7 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 28 Aug 2020 13:10:46 +0530 Subject: [PATCH 014/414] chore: trigger build From fa400820bb619ffd7c95e23a8208e2003226aa6d Mon Sep 17 00:00:00 2001 From: prssanna Date: Fri, 28 Aug 2020 15:02:04 +0530 Subject: [PATCH 015/414] fix: move leaderboard style to frappe --- erpnext/public/less/erpnext.less | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/erpnext/public/less/erpnext.less b/erpnext/public/less/erpnext.less index 1488bdd9c7..4076ebec1f 100644 --- a/erpnext/public/less/erpnext.less +++ b/erpnext/public/less/erpnext.less @@ -447,20 +447,6 @@ body[data-route="pos"] { } -// Leaderboard - -.leaderboard { - .result { - border-top: 1px solid #d1d8dd; - } - .list-item { - padding-left: 45px; - } - .list-item_content { - padding-right: 45px; - } -} - // Healthcare .exercise-card { From df00c5c84601e9a7b3ccf5f423671c1fcb59a9d3 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Tue, 1 Sep 2020 13:55:34 +0530 Subject: [PATCH 016/414] fix: Update erpnext logo --- erpnext/hooks.py | 2 +- erpnext/public/images/erpnext-logo.svg | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 erpnext/public/images/erpnext-logo.svg diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 1c36c2a30b..b71c4652d1 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -10,7 +10,7 @@ app_color = "#e74c3c" app_email = "info@erpnext.com" app_license = "GNU General Public License (v3)" source_link = "https://github.com/frappe/erpnext" -app_logo_url = '/assets/erpnext/images/erpnext_logo.svg' +app_logo_url = '/assets/erpnext/images/erpnext-logo.svg' develop_version = '13.x.x-develop' diff --git a/erpnext/public/images/erpnext-logo.svg b/erpnext/public/images/erpnext-logo.svg new file mode 100644 index 0000000000..a3ac3bb2ce --- /dev/null +++ b/erpnext/public/images/erpnext-logo.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file From 2b405b9bb3118f15f9a68de383fed878fed5a05d Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 10 Sep 2020 15:37:54 +0530 Subject: [PATCH 017/414] feat: add icon to healthcare desk page --- erpnext/healthcare/desk_page/healthcare/healthcare.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/healthcare/desk_page/healthcare/healthcare.json b/erpnext/healthcare/desk_page/healthcare/healthcare.json index 6546b08db9..353d86f4d7 100644 --- a/erpnext/healthcare/desk_page/healthcare/healthcare.json +++ b/erpnext/healthcare/desk_page/healthcare/healthcare.json @@ -61,10 +61,11 @@ "doctype": "Desk Page", "extends_another_page": 0, "hide_custom": 0, + "icon": "healthcare", "idx": 0, "is_standard": 1, "label": "Healthcare", - "modified": "2020-06-25 23:50:56.951698", + "modified": "2020-09-10 15:37:23.666787", "modified_by": "Administrator", "module": "Healthcare", "name": "Healthcare", @@ -75,7 +76,7 @@ "restrict_to_domain": "Healthcare", "shortcuts": [ { - "color": "#ffe8cd", + "color": "Orange", "format": "{} Open", "label": "Patient Appointment", "link_to": "Patient Appointment", @@ -83,7 +84,7 @@ "type": "DocType" }, { - "color": "#ffe8cd", + "color": "Orange", "format": "{} Active", "label": "Patient", "link_to": "Patient", @@ -91,7 +92,7 @@ "type": "DocType" }, { - "color": "#cef6d1", + "color": "Green", "format": "{} Vacant", "label": "Healthcare Service Unit", "link_to": "Healthcare Service Unit", From 67095d239f27e2e18ae3c61f183b84dcba911976 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 10 Sep 2020 17:15:52 +0530 Subject: [PATCH 018/414] fix: Custom dashboard sections --- .../opening_invoice_creation_tool.js | 3 ++- .../opening_invoice_creation_tool_dashboard.html | 1 - .../assets/doctype/asset_maintenance/asset_maintenance.js | 5 ++--- erpnext/hr/doctype/leave_application/leave_application.js | 3 ++- .../leave_application/leave_application_dashboard.html | 1 - erpnext/stock/doctype/batch/batch.js | 3 +-- erpnext/stock/doctype/item/item.js | 3 +-- 7 files changed, 8 insertions(+), 11 deletions(-) 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 699eb08e17..08e30b52e2 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 @@ -101,7 +101,8 @@ frappe.ui.form.on('Opening Invoice Creation Tool', { frappe.render_template('opening_invoice_creation_tool_dashboard', { data: opening_invoices_summary, max_count: max_count - }) + }), + __("Opening Invoices Summary") ); section.on('click', '.invoice-link', function() { diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool_dashboard.html b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool_dashboard.html index 5b136d4f66..afbcfa5602 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool_dashboard.html +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool_dashboard.html @@ -1,4 +1,3 @@ -
{{ __("Opening Invoices Summary") }}
{% $.each(data, (company, summary) => { %}
{{ company }}
diff --git a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.js b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.js index 001fc26ffe..70b8654509 100644 --- a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.js +++ b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.js @@ -40,14 +40,13 @@ frappe.ui.form.on('Asset Maintenance', { if(!r.message) { return; } - var section = frm.dashboard.add_section(`
- ${ __("Maintenance Log") }
`); + const section = frm.dashboard.add_section('', __("Maintenance Log")); var rows = $('
').appendTo(section); // show (r.message || []).forEach(function(d) { $(`
- ${d.maintenance_status} ${d.count} diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js index d62e418b17..9ccb915908 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.js +++ b/erpnext/hr/doctype/leave_application/leave_application.js @@ -75,7 +75,8 @@ frappe.ui.form.on("Leave Application", { frm.dashboard.add_section( frappe.render_template('leave_application_dashboard', { data: leave_details - }) + }), + __("Allocated Leaves") ); frm.dashboard.show(); let allowed_leave_types = Object.keys(leave_details); diff --git a/erpnext/hr/doctype/leave_application/leave_application_dashboard.html b/erpnext/hr/doctype/leave_application/leave_application_dashboard.html index d30e3b9f9c..6324b04927 100644 --- a/erpnext/hr/doctype/leave_application/leave_application_dashboard.html +++ b/erpnext/hr/doctype/leave_application/leave_application_dashboard.html @@ -1,6 +1,5 @@ {% if not jQuery.isEmptyObject(data) %} -
{{ __("Allocated Leaves") }}
diff --git a/erpnext/stock/doctype/batch/batch.js b/erpnext/stock/doctype/batch/batch.js index e2ea7f992c..71a3e7abca 100644 --- a/erpnext/stock/doctype/batch/batch.js +++ b/erpnext/stock/doctype/batch/batch.js @@ -47,8 +47,7 @@ frappe.ui.form.on('Batch', { return; } - var section = frm.dashboard.add_section(`
- ${ __("Stock Levels") }
`); + const section = frm.dashboard.add_section('', __("Stock Levels")); // sort by qty r.message.sort(function(a, b) { a.qty > b.qty ? 1 : -1 }); diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 38e5fe53a7..e07e653703 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -380,8 +380,7 @@ $.extend(erpnext.item, { // Show Stock Levels only if is_stock_item if (frm.doc.is_stock_item) { frappe.require('assets/js/item-dashboard.min.js', function() { - var section = frm.dashboard.add_section('
\ - ' + __("Stock Levels") + '
'); + const section = frm.dashboard.add_section('', __("Stock Levels")); erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({ parent: section, item_code: frm.doc.name From 1323a9a990ec8f4f05dcd997e52216a55eb93b34 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 30 Sep 2020 16:33:14 +0530 Subject: [PATCH 019/414] feat: set app name for ERPNext in install and patch --- erpnext/patches.txt | 1 + erpnext/patches/v13_0/set_app_name.py | 8 ++++++++ erpnext/setup/install.py | 5 +++++ 3 files changed, 14 insertions(+) create mode 100644 erpnext/patches/v13_0/set_app_name.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 6087ce29aa..95dfff797a 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -729,3 +729,4 @@ erpnext.patches.v13_0.setting_custom_roles_for_some_regional_reports erpnext.patches.v13_0.rename_issue_doctype_fields erpnext.patches.v13_0.change_default_pos_print_format erpnext.patches.v13_0.set_youtube_video_id +erpnext.patches.v13_0.set_app_name diff --git a/erpnext/patches/v13_0/set_app_name.py b/erpnext/patches/v13_0/set_app_name.py new file mode 100644 index 0000000000..0c78b65770 --- /dev/null +++ b/erpnext/patches/v13_0/set_app_name.py @@ -0,0 +1,8 @@ +import frappe +from frappe import _ + +def execute(): + frappe.reload_doctype("System Settings") + settings = frappe.get_doc("System Settings") + settings.app_name = _("ERPNext") + settings.save() \ No newline at end of file diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index 2225fe169f..0bb480bd4b 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -28,6 +28,7 @@ def after_install(): create_default_energy_point_rules() add_company_to_session_defaults() add_standard_navbar_items() + add_app_name() frappe.db.commit() @@ -158,3 +159,7 @@ def add_standard_navbar_items(): }) navbar_settings.save() + +def add_app_name(): + settings = frappe.get_doc("System Settings") + settings.app_name = _("ERPNext") \ No newline at end of file From 6a506b63bf5b4928481c9f5768bc847d30c464d6 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 5 Oct 2020 12:41:30 +0530 Subject: [PATCH 020/414] fix: variables path --- erpnext/public/scss/website.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/scss/website.scss b/erpnext/public/scss/website.scss index 617e916724..24a1b3780c 100644 --- a/erpnext/public/scss/website.scss +++ b/erpnext/public/scss/website.scss @@ -1,4 +1,4 @@ -@import "frappe/public/scss/variables"; +@import "frappe/public/scss/website/variables"; .product-image img { min-height: 20rem; From cb8457b9ae8de30522b132cbc97f8e3326227602 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 15 Oct 2020 13:53:12 +0530 Subject: [PATCH 021/414] feat: add description to Accounts onboarding --- erpnext/accounts/module_onboarding/accounts/accounts.json | 2 +- .../chart_of_accounts/chart_of_accounts.json | 6 +++++- .../configure_account_settings.json | 3 ++- .../create_a_customer/create_a_customer.json | 4 +++- .../onboarding_step/create_a_product/create_a_product.json | 3 ++- .../create_a_supplier/create_a_supplier.json | 3 ++- .../create_your_first_purchase_invoice.json | 3 ++- .../create_your_first_sales_invoice.json | 3 ++- .../accounts/onboarding_step/setup_taxes/setup_taxes.json | 3 ++- erpnext/stock/module_onboarding/stock/stock.json | 2 +- .../onboarding_step/create_a_product/create_a_product.json | 2 +- .../create_a_purchase_receipt.json | 2 +- .../create_a_stock_entry/create_a_stock_entry.json | 2 +- .../create_a_supplier/create_a_supplier.json | 2 +- .../introduction_to_stock_entry.json | 2 +- .../setup_your_warehouse/setup_your_warehouse.json | 2 +- .../onboarding_step/stock_settings/stock_settings.json | 2 +- 17 files changed, 29 insertions(+), 17 deletions(-) diff --git a/erpnext/accounts/module_onboarding/accounts/accounts.json b/erpnext/accounts/module_onboarding/accounts/accounts.json index ba1a779b4c..98272c3891 100644 --- a/erpnext/accounts/module_onboarding/accounts/accounts.json +++ b/erpnext/accounts/module_onboarding/accounts/accounts.json @@ -13,7 +13,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/accounts", "idx": 0, "is_complete": 0, - "modified": "2020-07-08 14:06:09.033880", + "modified": "2020-10-15 13:52:40.068450", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts", diff --git a/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json b/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json index cbd022bfdb..a1532302a1 100644 --- a/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json +++ b/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json @@ -1,14 +1,18 @@ { "action": "Go to Page", + "callback_message": "Great! Let's move to the next step!", + "callback_title": "Awesome Work", "creation": "2020-05-13 19:58:20.928127", + "description": "# Chart Of Accounts\n\n**The Chart of Accounts is the blueprint of the accounts in your organization.**\n\nThe overall structure of your Chart of Accounts is based on a system of double entry\naccounting that has become a standard all over the world to quantify how a\ncompany is doing financially.\n\nChart of Accounts is a tree view of the names of the Accounts (Ledgers and\nGroups) that a Company requires to manage its books of accounts. ERPNext sets\nup a simple chart of accounts for each Company you create, but you can\nmodify it according to your needs and legal requirements.\n\nFor each company, Chart of Accounts signifies the way to classify the accounting entries, mostly\nbased on statutory (tax, compliance to government regulations) requirements.\n\nThe Chart of Accounts helps you to answer questions like:\n\n * What is your organization worth?\n * How much debt have you taken?\n * How much profit are you making (and hence paying tax)?\n * How much are you selling?\n * What is your expense break-up?\n", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, + "intro_video_url": "https://www.youtube.com/embed/AcfMCT7wLLo", "is_complete": 0, "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-14 17:40:28.410447", + "modified": "2020-10-15 13:12:04.771355", "modified_by": "Administrator", "name": "Chart Of Accounts", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/configure_account_settings/configure_account_settings.json b/erpnext/accounts/onboarding_step/configure_account_settings/configure_account_settings.json index c8be357de0..1e8f1034a3 100644 --- a/erpnext/accounts/onboarding_step/configure_account_settings/configure_account_settings.json +++ b/erpnext/accounts/onboarding_step/configure_account_settings/configure_account_settings.json @@ -1,6 +1,7 @@ { "action": "Create Entry", "creation": "2020-05-14 17:53:00.876946", + "description": "# Account Settings\n\nThis is a crucial piece of configuration. There are various account settings in ERPNext to restrict and configure actions in the Accounting module.\n\nThe following settings are avaialble for you to configure\n\n1. Account Freezing \n2. Credit and Overbilling\n3. Invoicing and Tax Automations\n4. Balance Sheet configurations\n\nThere's much more, you can check it all out in this step", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, @@ -8,7 +9,7 @@ "is_mandatory": 0, "is_single": 1, "is_skipped": 0, - "modified": "2020-05-14 18:06:25.212923", + "modified": "2020-10-15 13:45:14.687458", "modified_by": "Administrator", "name": "Configure Account Settings", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json b/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json index 5a403b06cf..02434a09bf 100644 --- a/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json +++ b/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json @@ -1,14 +1,16 @@ { "action": "Create Entry", "creation": "2020-05-14 17:46:41.831517", + "description": "# Customer\n\nA customer, who is sometimes known as a client, buyer, or purchaser is the one who receives goods, services, products, or ideas, from a seller for a monetary consideration.\n\n### Creating a customer is easy and can be done in the following steps\n\n1. Go to the Customer list and click on New.\n2. Enter Full Name of the customer.\n3. Select **Company** if the customer represents a company or **Individual** otherwise in Type field.\n4. Select a Customer Group. A few groups are included by default, you can create additional groups if you need.\n5. Select the Territory.\n6. If the customer is being created against a lead, you can select the same in From Lead field.\n7. Save.\n\nUp next is a video about customers and suppliers that will give you more clarity on these concepts in ERPNext", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, + "intro_video_url": "https://www.youtube.com/watch?v=zsrrVDk6VBs", "is_complete": 0, "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-06-01 13:16:19.731719", + "modified": "2020-10-15 13:37:59.699228", "modified_by": "Administrator", "name": "Create a Customer", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json b/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json index d2068e167b..3214d8ecf1 100644 --- a/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json +++ b/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json @@ -1,6 +1,7 @@ { "action": "Create Entry", "creation": "2020-05-12 18:16:06.624554", + "description": "## Creating Products\n\nIn ERPNext, any product or a service offered by your company is called an Item. The term Item is also applicable to raw materials or components of products yet to be produced (before they can be sold to customers). ERPNext allows you to manage all sorts of items like raw-materials, sub-assemblies, finished goods, item variants, and service items.\n\nERPNext is optimized for itemized management of your sales and purchase. If you are in services, you can create an Item for each service that you offer. Completing the Item Master is very essential for the successful implementation of ERPNext.\n\nYou can access the Item section\n\n`Desk > Stock > Item`\n\n\n", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, @@ -8,7 +9,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-12 18:30:02.489949", + "modified": "2020-10-15 13:30:46.817174", "modified_by": "Administrator", "name": "Create a Product", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/create_a_supplier/create_a_supplier.json b/erpnext/accounts/onboarding_step/create_a_supplier/create_a_supplier.json index 7a64224bd4..62d643aa72 100644 --- a/erpnext/accounts/onboarding_step/create_a_supplier/create_a_supplier.json +++ b/erpnext/accounts/onboarding_step/create_a_supplier/create_a_supplier.json @@ -1,6 +1,7 @@ { "action": "Create Entry", "creation": "2020-05-14 22:09:10.043554", + "description": "## Let's add your Suppliers\n\nSuppliers are companies or individuals who provide you with products or services. A supplier may be distinguished from a contractor or subcontractor, who commonly adds specialized input to deliverables. A supplier is also known as a vendor. There are different types of suppliers based on the goods and products they supply.\n\nERPNext allows you to create your own categories of suppliers. These categories are known as Supplier Groups. For example, if your suppliers are mainly pharmaceutical companies and FMCG distributors, you can create a new Supplier Groups for them and name the groups accordingly.", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, @@ -8,7 +9,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-14 22:09:10.043554", + "modified": "2020-10-15 13:32:39.651700", "modified_by": "Administrator", "name": "Create a Supplier", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/create_your_first_purchase_invoice/create_your_first_purchase_invoice.json b/erpnext/accounts/onboarding_step/create_your_first_purchase_invoice/create_your_first_purchase_invoice.json index 3a2b8d3925..2e753d63b3 100644 --- a/erpnext/accounts/onboarding_step/create_your_first_purchase_invoice/create_your_first_purchase_invoice.json +++ b/erpnext/accounts/onboarding_step/create_your_first_purchase_invoice/create_your_first_purchase_invoice.json @@ -1,6 +1,7 @@ { "action": "Create Entry", "creation": "2020-05-14 22:10:07.049704", + "description": "# What's a Purchase Invoice?\n\nA Purchase Invoice is a bill you receive from your Suppliers against which you need to make the payment.\nPurchase Invoice is the exact opposite of your Sales Invoice. Here you accrue expenses to your Supplier. Making a Purchase Invoice is very similar to making a Purchase Order.\n\n![Purchase Flow](https://docs.erpnext.com/docs/assets/img/accounts/pi-flow.png)\n\n", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, @@ -8,7 +9,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-14 22:10:07.049704", + "modified": "2020-10-15 13:33:56.079882", "modified_by": "Administrator", "name": "Create Your First Purchase Invoice", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/create_your_first_sales_invoice/create_your_first_sales_invoice.json b/erpnext/accounts/onboarding_step/create_your_first_sales_invoice/create_your_first_sales_invoice.json index 473de5079f..bcf2c56dad 100644 --- a/erpnext/accounts/onboarding_step/create_your_first_sales_invoice/create_your_first_sales_invoice.json +++ b/erpnext/accounts/onboarding_step/create_your_first_sales_invoice/create_your_first_sales_invoice.json @@ -1,6 +1,7 @@ { "action": "Create Entry", "creation": "2020-05-14 17:48:21.019019", + "description": "# All about sales invoice\n\nA Sales Invoice is a bill that you send to your Customers against which the Customer makes the payment. Sales Invoice is an accounting transaction. On submission of Sales Invoice, the system updates the receivable and books income against a Customer Account.\n\nHere's the flow of how a sales invoice is generally created\n\n\n![Sales Flow](https://docs.erpnext.com/docs/assets/img/accounts/so-flow.png)", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, @@ -8,7 +9,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-14 17:48:21.019019", + "modified": "2020-10-15 13:39:43.970254", "modified_by": "Administrator", "name": "Create Your First Sales Invoice", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json b/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json index 8e0006762d..2eedf56a83 100644 --- a/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json +++ b/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json @@ -1,6 +1,7 @@ { "action": "Create Entry", "creation": "2020-05-13 19:29:43.844463", + "description": "# Setting up Taxes\n\nOne of the primary motivators for compulsory use of accounting tools is the calculation of taxes. ERPNext allows you to make configurable tax templates that you can apply to your sales or purchase transactions.\n\nThe templates created from this form can be used in Sales Orders and Sales Invoices. The way ERPNext sets up taxes is via templates. Other types of charges that may apply to your invoices (like shipping, insurance etc.) can also be configured as taxes.\n\nFor Tax Accounts that you want to use in the tax templates, go to:\n\n`> Home > Accounting > Chart of Accounts`\n\nSelect an account and click on edit. Select the 'Account Type' as 'Tax' for the account.\nIn this step we will guide you towards making the sales and taxes template.", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, @@ -8,7 +9,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-14 17:40:16.014413", + "modified": "2020-10-15 13:21:17.333438", "modified_by": "Administrator", "name": "Setup Taxes", "owner": "Administrator", diff --git a/erpnext/stock/module_onboarding/stock/stock.json b/erpnext/stock/module_onboarding/stock/stock.json index 1d5bf8c97c..847464822b 100644 --- a/erpnext/stock/module_onboarding/stock/stock.json +++ b/erpnext/stock/module_onboarding/stock/stock.json @@ -19,7 +19,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/stock", "idx": 0, "is_complete": 0, - "modified": "2020-07-08 14:22:07.951891", + "modified": "2020-10-14 14:54:42.741971", "modified_by": "Administrator", "module": "Stock", "name": "Stock", diff --git a/erpnext/stock/onboarding_step/create_a_product/create_a_product.json b/erpnext/stock/onboarding_step/create_a_product/create_a_product.json index d2068e167b..335137d852 100644 --- a/erpnext/stock/onboarding_step/create_a_product/create_a_product.json +++ b/erpnext/stock/onboarding_step/create_a_product/create_a_product.json @@ -8,7 +8,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-12 18:30:02.489949", + "modified": "2020-10-14 14:53:00.133574", "modified_by": "Administrator", "name": "Create a Product", "owner": "Administrator", diff --git a/erpnext/stock/onboarding_step/create_a_purchase_receipt/create_a_purchase_receipt.json b/erpnext/stock/onboarding_step/create_a_purchase_receipt/create_a_purchase_receipt.json index b7811a46df..9012493f57 100644 --- a/erpnext/stock/onboarding_step/create_a_purchase_receipt/create_a_purchase_receipt.json +++ b/erpnext/stock/onboarding_step/create_a_purchase_receipt/create_a_purchase_receipt.json @@ -8,7 +8,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-19 18:59:13.266713", + "modified": "2020-10-14 14:53:25.618434", "modified_by": "Administrator", "name": "Create a Purchase Receipt", "owner": "Administrator", diff --git a/erpnext/stock/onboarding_step/create_a_stock_entry/create_a_stock_entry.json b/erpnext/stock/onboarding_step/create_a_stock_entry/create_a_stock_entry.json index 2b83f657d6..09902b8844 100644 --- a/erpnext/stock/onboarding_step/create_a_stock_entry/create_a_stock_entry.json +++ b/erpnext/stock/onboarding_step/create_a_stock_entry/create_a_stock_entry.json @@ -8,7 +8,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-15 03:30:58.047696", + "modified": "2020-10-14 14:53:00.105905", "modified_by": "Administrator", "name": "Create a Stock Entry", "owner": "Administrator", diff --git a/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json b/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json index 7a64224bd4..ef61fa3b2e 100644 --- a/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json +++ b/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json @@ -8,7 +8,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-14 22:09:10.043554", + "modified": "2020-10-14 14:53:00.120455", "modified_by": "Administrator", "name": "Create a Supplier", "owner": "Administrator", diff --git a/erpnext/stock/onboarding_step/introduction_to_stock_entry/introduction_to_stock_entry.json b/erpnext/stock/onboarding_step/introduction_to_stock_entry/introduction_to_stock_entry.json index 009a44f6e4..212e5055ed 100644 --- a/erpnext/stock/onboarding_step/introduction_to_stock_entry/introduction_to_stock_entry.json +++ b/erpnext/stock/onboarding_step/introduction_to_stock_entry/introduction_to_stock_entry.json @@ -8,7 +8,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-05-26 15:55:41.457289", + "modified": "2020-10-14 14:53:00.075177", "modified_by": "Administrator", "name": "Introduction to Stock Entry", "owner": "Administrator", diff --git a/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json b/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json index 9457deee26..75940ed2a6 100644 --- a/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json +++ b/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json @@ -8,7 +8,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-07-04 12:33:16.970031", + "modified": "2020-10-14 14:53:25.538900", "modified_by": "Administrator", "name": "Setup your Warehouse", "owner": "Administrator", diff --git a/erpnext/stock/onboarding_step/stock_settings/stock_settings.json b/erpnext/stock/onboarding_step/stock_settings/stock_settings.json index 7591bff538..ae34afa695 100644 --- a/erpnext/stock/onboarding_step/stock_settings/stock_settings.json +++ b/erpnext/stock/onboarding_step/stock_settings/stock_settings.json @@ -8,7 +8,7 @@ "is_mandatory": 0, "is_single": 1, "is_skipped": 0, - "modified": "2020-05-15 03:55:15.444151", + "modified": "2020-10-14 14:53:00.092504", "modified_by": "Administrator", "name": "Stock Settings", "owner": "Administrator", From 12d4be7f3f9303f7ad42596cf26b1b2aaf159424 Mon Sep 17 00:00:00 2001 From: prssanna Date: Fri, 16 Oct 2020 11:31:47 +0530 Subject: [PATCH 022/414] feat: icons in leaderboard --- erpnext/startup/leaderboard.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/startup/leaderboard.py b/erpnext/startup/leaderboard.py index ef238f1165..8819a55c0a 100644 --- a/erpnext/startup/leaderboard.py +++ b/erpnext/startup/leaderboard.py @@ -12,6 +12,7 @@ def get_leaderboards(): {'fieldname': 'outstanding_amount', 'fieldtype': 'Currency'} ], "method": "erpnext.startup.leaderboard.get_all_customers", + "icon": "customer" }, "Item": { "fields": [ @@ -23,6 +24,7 @@ def get_leaderboards(): {'fieldname': 'available_stock_value', 'fieldtype': 'Currency'} ], "method": "erpnext.startup.leaderboard.get_all_items", + "icon": "stock" }, "Supplier": { "fields": [ @@ -31,6 +33,7 @@ def get_leaderboards(): {'fieldname': 'outstanding_amount', 'fieldtype': 'Currency'} ], "method": "erpnext.startup.leaderboard.get_all_suppliers", + "icon": "buying" }, "Sales Partner": { "fields": [ @@ -38,12 +41,14 @@ def get_leaderboards(): {'fieldname': 'total_commission', 'fieldtype': 'Currency'} ], "method": "erpnext.startup.leaderboard.get_all_sales_partner", + "icon": "hr" }, "Sales Person": { "fields": [ {'fieldname': 'total_sales_amount', 'fieldtype': 'Currency'} ], "method": "erpnext.startup.leaderboard.get_all_sales_person", + "icon": "customer" } } From 5418818683fb1d211772cb1e0467e7355c30eb3a Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 16 Oct 2020 14:24:00 +0530 Subject: [PATCH 023/414] feat: add tour for account settings --- .../accounts_settings/accounts_settings.js | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.js b/erpnext/accounts/doctype/accounts_settings/accounts_settings.js index 0627675de7..541901c9ab 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.js +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.js @@ -6,3 +6,46 @@ frappe.ui.form.on('Accounts Settings', { } }); + +frappe.tour['Accounts Settings'] = [ + { + fieldname: "acc_frozen_upto", + title: "Accounts Frozen Upto", + description: __("Freeze accounting transactions up to specified date, nobody can make/modify entry except the specified Role."), + }, + { + fieldname: "frozen_accounts_modifier", + title: "Role Allowed to Set Frozen Accounts & Edit Frozen Entries", + description: __("Users with this Role are allowed to set frozen accounts and create/modify accounting entries against frozen accounts.") + }, + { + fieldname: "determine_address_tax_category_from", + title: "Determine Address Tax Category From", + description: __("Tax category can be set on Addresses. An address can be Shipping or Billing address. Set which addres to select when applying Tax Category.") + }, + { + fieldname: "over_billing_allowance", + title: "Over Billing Allowance Percentage", + description: __("The percentage by which you can overbill transactions. For example, if the order value is $100 for an Item and percentage here is set as 10% then you are allowed to bill for $110.") + }, + { + fieldname: "credit_controller", + title: "Credit Controller", + description: __("Select the role that is allowed to submit transactions that exceed credit limits set. The credit limit can be set in the Customer form.") + }, + { + fieldname: "make_payment_via_journal_entry", + title: "Make Payment via Journal Entry", + description: __("When checked, if user proceeds to make payment from an invoice, the system will open a Journal Entry instead of a Payment Entry.") + }, + { + fieldname: "unlink_payment_on_cancellation_of_invoice", + title: "Unlink Payment on Cancellation of Invoice", + description: __("If checked, system will unlink the payment against the respective invoice.") + }, + { + fieldname: "unlink_advance_payment_on_cancelation_of_order", + title: "Unlink Advance Payment on Cancellation of Order", + description: __("Similar to the previous option, this unlinks any advance payments made against Purchase/Sales Orders.") + } +]; \ No newline at end of file From 8261df29c4f35fce8109d5df2258d263bcd64642 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 19 Oct 2020 13:52:35 +0530 Subject: [PATCH 024/414] feat: update splash logo --- erpnext/hooks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/hooks.py b/erpnext/hooks.py index b510208720..9fa60742bd 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -10,7 +10,7 @@ app_color = "#e74c3c" app_email = "info@erpnext.com" app_license = "GNU General Public License (v3)" source_link = "https://github.com/frappe/erpnext" -app_logo_url = '/assets/erpnext/images/erpnext-logo.svg' +app_logo_url = "/assets/erpnext/images/erpnext-logo.svg" develop_version = '13.x.x-develop' @@ -73,7 +73,7 @@ website_generators = ["Item Group", "Item", "BOM", "Sales Partner", website_context = { "favicon": "/assets/erpnext/images/favicon.png", - "splash_image": "/assets/erpnext/images/erp-icon.svg" + "splash_image": "/assets/erpnext/images/erpnext-logo.svg" } website_route_rules = [ From 2c2e7297ae254ee9f9c43fa5ddb5eb25b86c05d6 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 19 Oct 2020 14:44:02 +0530 Subject: [PATCH 025/414] feat: update accounts onboarding --- erpnext/accounts/module_onboarding/accounts/accounts.json | 2 +- .../onboarding_step/chart_of_accounts/chart_of_accounts.json | 4 ++-- .../configure_account_settings.json | 4 ++-- .../onboarding_step/create_a_customer/create_a_customer.json | 2 +- .../onboarding_step/create_a_product/create_a_product.json | 2 +- .../onboarding_step/create_a_supplier/create_a_supplier.json | 2 +- .../create_your_first_purchase_invoice.json | 2 +- .../create_your_first_sales_invoice.json | 2 +- erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/erpnext/accounts/module_onboarding/accounts/accounts.json b/erpnext/accounts/module_onboarding/accounts/accounts.json index 98272c3891..dc5c3207b0 100644 --- a/erpnext/accounts/module_onboarding/accounts/accounts.json +++ b/erpnext/accounts/module_onboarding/accounts/accounts.json @@ -13,7 +13,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/accounts", "idx": 0, "is_complete": 0, - "modified": "2020-10-15 13:52:40.068450", + "modified": "2020-10-19 14:43:45.080823", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts", diff --git a/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json b/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json index a1532302a1..ef20c19d56 100644 --- a/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json +++ b/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json @@ -1,6 +1,6 @@ { "action": "Go to Page", - "callback_message": "Great! Let's move to the next step!", + "callback_message": "You can continue with the onboarding after exploring this page", "callback_title": "Awesome Work", "creation": "2020-05-13 19:58:20.928127", "description": "# Chart Of Accounts\n\n**The Chart of Accounts is the blueprint of the accounts in your organization.**\n\nThe overall structure of your Chart of Accounts is based on a system of double entry\naccounting that has become a standard all over the world to quantify how a\ncompany is doing financially.\n\nChart of Accounts is a tree view of the names of the Accounts (Ledgers and\nGroups) that a Company requires to manage its books of accounts. ERPNext sets\nup a simple chart of accounts for each Company you create, but you can\nmodify it according to your needs and legal requirements.\n\nFor each company, Chart of Accounts signifies the way to classify the accounting entries, mostly\nbased on statutory (tax, compliance to government regulations) requirements.\n\nThe Chart of Accounts helps you to answer questions like:\n\n * What is your organization worth?\n * How much debt have you taken?\n * How much profit are you making (and hence paying tax)?\n * How much are you selling?\n * What is your expense break-up?\n", @@ -12,7 +12,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-15 13:12:04.771355", + "modified": "2020-10-19 14:25:31.427339", "modified_by": "Administrator", "name": "Chart Of Accounts", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/configure_account_settings/configure_account_settings.json b/erpnext/accounts/onboarding_step/configure_account_settings/configure_account_settings.json index 1e8f1034a3..083fbb52bf 100644 --- a/erpnext/accounts/onboarding_step/configure_account_settings/configure_account_settings.json +++ b/erpnext/accounts/onboarding_step/configure_account_settings/configure_account_settings.json @@ -1,5 +1,5 @@ { - "action": "Create Entry", + "action": "Show Form Tour", "creation": "2020-05-14 17:53:00.876946", "description": "# Account Settings\n\nThis is a crucial piece of configuration. There are various account settings in ERPNext to restrict and configure actions in the Accounting module.\n\nThe following settings are avaialble for you to configure\n\n1. Account Freezing \n2. Credit and Overbilling\n3. Invoicing and Tax Automations\n4. Balance Sheet configurations\n\nThere's much more, you can check it all out in this step", "docstatus": 0, @@ -9,7 +9,7 @@ "is_mandatory": 0, "is_single": 1, "is_skipped": 0, - "modified": "2020-10-15 13:45:14.687458", + "modified": "2020-10-19 14:40:55.584484", "modified_by": "Administrator", "name": "Configure Account Settings", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json b/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json index 02434a09bf..4a967b140b 100644 --- a/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json +++ b/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json @@ -10,7 +10,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-15 13:37:59.699228", + "modified": "2020-10-16 12:59:16.989156", "modified_by": "Administrator", "name": "Create a Customer", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json b/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json index 3214d8ecf1..0cbefee858 100644 --- a/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json +++ b/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json @@ -9,7 +9,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-15 13:30:46.817174", + "modified": "2020-10-16 12:59:16.983833", "modified_by": "Administrator", "name": "Create a Product", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/create_a_supplier/create_a_supplier.json b/erpnext/accounts/onboarding_step/create_a_supplier/create_a_supplier.json index 62d643aa72..eede11d979 100644 --- a/erpnext/accounts/onboarding_step/create_a_supplier/create_a_supplier.json +++ b/erpnext/accounts/onboarding_step/create_a_supplier/create_a_supplier.json @@ -9,7 +9,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-15 13:32:39.651700", + "modified": "2020-10-16 12:59:16.979176", "modified_by": "Administrator", "name": "Create a Supplier", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/create_your_first_purchase_invoice/create_your_first_purchase_invoice.json b/erpnext/accounts/onboarding_step/create_your_first_purchase_invoice/create_your_first_purchase_invoice.json index 2e753d63b3..2b53f46fe9 100644 --- a/erpnext/accounts/onboarding_step/create_your_first_purchase_invoice/create_your_first_purchase_invoice.json +++ b/erpnext/accounts/onboarding_step/create_your_first_purchase_invoice/create_your_first_purchase_invoice.json @@ -9,7 +9,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-15 13:33:56.079882", + "modified": "2020-10-16 12:59:16.976334", "modified_by": "Administrator", "name": "Create Your First Purchase Invoice", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/create_your_first_sales_invoice/create_your_first_sales_invoice.json b/erpnext/accounts/onboarding_step/create_your_first_sales_invoice/create_your_first_sales_invoice.json index bcf2c56dad..d56be9220d 100644 --- a/erpnext/accounts/onboarding_step/create_your_first_sales_invoice/create_your_first_sales_invoice.json +++ b/erpnext/accounts/onboarding_step/create_your_first_sales_invoice/create_your_first_sales_invoice.json @@ -9,7 +9,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-15 13:39:43.970254", + "modified": "2020-10-16 12:59:16.987507", "modified_by": "Administrator", "name": "Create Your First Sales Invoice", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json b/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json index 2eedf56a83..fa3eabd974 100644 --- a/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json +++ b/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json @@ -9,7 +9,7 @@ "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-15 13:21:17.333438", + "modified": "2020-10-16 12:59:16.991287", "modified_by": "Administrator", "name": "Setup Taxes", "owner": "Administrator", From 5e00ed926cc5f74b4d4fa8ada0a83347242106f4 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 21 Oct 2020 12:30:22 +0530 Subject: [PATCH 026/414] feat: update icons --- erpnext/accounts/desk_page/accounting/accounting.json | 4 ++-- erpnext/buying/desk_page/buying/buying.json | 2 +- erpnext/selling/desk_page/selling/selling.json | 2 +- erpnext/stock/desk_page/stock/stock.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/desk_page/accounting/accounting.json b/erpnext/accounts/desk_page/accounting/accounting.json index 45f75b1dcd..5de091667a 100644 --- a/erpnext/accounts/desk_page/accounting/accounting.json +++ b/erpnext/accounts/desk_page/accounting/accounting.json @@ -99,7 +99,7 @@ "idx": 0, "is_standard": 1, "label": "Accounting", - "modified": "2020-10-08 20:31:46.022470", + "modified": "2020-10-21 12:27:51.346915", "modified_by": "Administrator", "module": "Accounts", "name": "Accounting", @@ -109,7 +109,7 @@ "pin_to_top": 0, "shortcuts": [ { - "label": "Chart of Accounts", + "label": "Chart Of Accounts", "link_to": "Account", "type": "DocType" }, diff --git a/erpnext/buying/desk_page/buying/buying.json b/erpnext/buying/desk_page/buying/buying.json index 85f9bf6276..16df8dfdd8 100644 --- a/erpnext/buying/desk_page/buying/buying.json +++ b/erpnext/buying/desk_page/buying/buying.json @@ -61,7 +61,7 @@ "idx": 0, "is_standard": 1, "label": "Buying", - "modified": "2020-09-30 14:40:55.638458", + "modified": "2020-10-21 12:29:02.772723", "modified_by": "Administrator", "module": "Buying", "name": "Buying", diff --git a/erpnext/selling/desk_page/selling/selling.json b/erpnext/selling/desk_page/selling/selling.json index bc813bca23..82831ab61a 100644 --- a/erpnext/selling/desk_page/selling/selling.json +++ b/erpnext/selling/desk_page/selling/selling.json @@ -45,7 +45,7 @@ "idx": 0, "is_standard": 1, "label": "Selling", - "modified": "2020-10-08 10:23:09.984377", + "modified": "2020-10-21 12:30:12.164433", "modified_by": "Administrator", "module": "Selling", "name": "Selling", diff --git a/erpnext/stock/desk_page/stock/stock.json b/erpnext/stock/desk_page/stock/stock.json index 3e1618d7fa..9f8f346635 100644 --- a/erpnext/stock/desk_page/stock/stock.json +++ b/erpnext/stock/desk_page/stock/stock.json @@ -59,7 +59,7 @@ "idx": 0, "is_standard": 1, "label": "Stock", - "modified": "2020-10-07 18:40:17.130207", + "modified": "2020-10-21 12:28:55.503562", "modified_by": "Administrator", "module": "Stock", "name": "Stock", From b57b3c9f6c91ed8053f2464576654a531d0f1caa Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 22 Oct 2020 15:37:47 +0530 Subject: [PATCH 027/414] feat: hook to fetch additional print settings in print view --- erpnext/controllers/buying_controller.py | 10 +---- erpnext/controllers/print_settings.py | 50 ++++++++++++++++++++++- erpnext/controllers/selling_controller.py | 11 ++--- erpnext/hooks.py | 1 + erpnext/startup/filters.py | 6 +-- 5 files changed, 57 insertions(+), 21 deletions(-) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index e05c70e41c..de04abbca4 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -13,6 +13,7 @@ from erpnext.stock.stock_ledger import get_valuation_rate from erpnext.stock.doctype.stock_entry.stock_entry import get_used_alternative_items from erpnext.stock.doctype.serial_no.serial_no import get_auto_serial_nos, auto_make_serial_nos, get_serial_nos from frappe.contacts.doctype.address.address import get_address_display +from erpnext.controllers.print_settings import print_settings_for_taxes from erpnext.accounts.doctype.budget.budget import validate_expense_against_budget from erpnext.controllers.stock_controller import StockController @@ -20,14 +21,7 @@ from erpnext.controllers.stock_controller import StockController class BuyingController(StockController): def __setup__(self): if hasattr(self, "taxes"): - self.flags.print_taxes_with_zero_amount = cint(frappe.db.get_single_value("Print Settings", - "print_taxes_with_zero_amount")) - self.flags.show_inclusive_tax_in_print = self.is_inclusive_tax() - - self.print_templates = { - "total": "templates/print_formats/includes/total.html", - "taxes": "templates/print_formats/includes/taxes.html" - } + print_settings_for_taxes(self) def get_feed(self): if self.get("supplier_name"): diff --git a/erpnext/controllers/print_settings.py b/erpnext/controllers/print_settings.py index c41db25253..edd722dbe8 100644 --- a/erpnext/controllers/print_settings.py +++ b/erpnext/controllers/print_settings.py @@ -5,20 +5,31 @@ from __future__ import unicode_literals import frappe from frappe.utils import cint -def print_settings_for_item_table(doc): +def print_settings_for_item_table(doc, setting_value=None): doc.print_templates = { "qty": "templates/print_formats/includes/item_table_qty.html" } doc.hide_in_print_layout = ["uom", "stock_uom"] - doc.flags.compact_item_print = cint(frappe.db.get_single_value("Print Settings", "compact_item_print")) + doc.flags.compact_item_print = setting_value if setting_value is not None\ + else cint(frappe.db.get_single_value("Print Settings", "compact_item_print")) if doc.flags.compact_item_print: doc.print_templates["description"] = "templates/print_formats/includes/item_table_description.html" doc.flags.compact_item_fields = ["description", "qty", "rate", "amount"] doc.flags.format_columns = format_columns +def print_settings_for_taxes(doc, setting_value=None): + doc.flags.print_taxes_with_zero_amount = setting_value if setting_value is not None\ + else cint(frappe.db.get_single_value("Print Settings", "print_taxes_with_zero_amount")) + doc.flags.show_inclusive_tax_in_print = doc.is_inclusive_tax() + + doc.print_templates = { + "total": "templates/print_formats/includes/total.html", + "taxes": "templates/print_formats/includes/taxes.html" + } + def format_columns(display_columns, compact_fields): compact_fields = compact_fields + ["image", "item_code", "item_name"] final_columns = [] @@ -26,3 +37,38 @@ def format_columns(display_columns, compact_fields): if column not in compact_fields: final_columns.append(column) return final_columns + +@frappe.whitelist() +def show_compact_item_setting(doc): + meta = frappe.get_meta(doc.doctype) + items_field = meta.get_field('items') + if items_field and items_field.fieldtype == 'Table': + return True + return False + +@frappe.whitelist() +def show_taxes_setting(doc): + meta = frappe.get_meta(doc.doctype) + items_field = meta.get_field('taxes') + if items_field and items_field.fieldtype == 'Table': + return True + return False + +def get_print_settings(): + settings = { + 'compact_item_print': { + 'condition': 'erpnext.controllers.print_settings.show_compact_item_setting', + 'fieldtype': 'Check', + 'child_field': 'items', + 'label': 'Compact Item Print', + 'set_template': 'erpnext.controllers.print_settings.print_settings_for_item_table' + }, + 'print_taxes_with_zero_amount': { + 'condition': 'erpnext.controllers.print_settings.show_taxes_setting', + 'fieldtype': 'Check', + 'label': 'Print taxes with zero amount', + 'set_template': 'erpnext.controllers.print_settings.print_settings_for_taxes' + } + } + + return settings diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 58861715c2..ac26d3fea8 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -11,20 +11,15 @@ from erpnext.stock.get_item_details import get_conversion_factor from erpnext.stock.doctype.item.item import set_item_default from frappe.contacts.doctype.address.address import get_address_display from erpnext.controllers.accounts_controller import get_taxes_and_charges +from erpnext.controllers.print_settings import print_settings_for_taxes from erpnext.controllers.stock_controller import StockController class SellingController(StockController): def __setup__(self): if hasattr(self, "taxes"): - self.flags.print_taxes_with_zero_amount = cint(frappe.db.get_single_value("Print Settings", - "print_taxes_with_zero_amount")) - self.flags.show_inclusive_tax_in_print = self.is_inclusive_tax() + print_settings_for_taxes(self) - self.print_templates = { - "total": "templates/print_formats/includes/total.html", - "taxes": "templates/print_formats/includes/taxes.html" - } def get_feed(self): return _("To {0} | {1} {2}").format(self.customer_name, self.currency, @@ -189,7 +184,7 @@ class SellingController(StockController): for it in self.get("items"): if not it.item_code: continue - + last_purchase_rate, is_stock_item = frappe.get_cached_value("Item", it.item_code, ["last_purchase_rate", "is_stock_item"]) last_purchase_rate_in_sales_uom = last_purchase_rate * (it.conversion_factor or 1) if flt(it.base_net_rate) < flt(last_purchase_rate_in_sales_uom): diff --git a/erpnext/hooks.py b/erpnext/hooks.py index b510208720..d455972a56 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -41,6 +41,7 @@ notification_config = "erpnext.startup.notifications.get_notification_config" get_help_messages = "erpnext.utilities.activation.get_help_messages" leaderboards = "erpnext.startup.leaderboard.get_leaderboards" filters_config = "erpnext.startup.filters.get_filters_config" +additional_print_settings = "erpnext.controllers.print_settings.get_print_settings" on_session_creation = [ "erpnext.portal.utils.create_customer_or_supplier", diff --git a/erpnext/startup/filters.py b/erpnext/startup/filters.py index a99e49b491..ec07329ded 100644 --- a/erpnext/startup/filters.py +++ b/erpnext/startup/filters.py @@ -2,13 +2,13 @@ import frappe def get_filters_config(): - filters_config = { + filters_config = { "fiscal year": { "label": "Fiscal Year", "get_field": "erpnext.accounts.utils.get_fiscal_year_filter_field", "valid_for_fieldtypes": ["Date", "Datetime", "DateRange"], "depends_on": "company", } - } + } - return filters_config \ No newline at end of file + return filters_config \ No newline at end of file From 13c6e2f320c100de245a01b18ddf6a134bbed8b5 Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 22 Oct 2020 17:19:00 +0530 Subject: [PATCH 028/414] feat: contextual setting for print uom after quantity --- erpnext/controllers/print_settings.py | 46 +++++++++++++------ .../includes/item_table_qty.html | 2 +- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/erpnext/controllers/print_settings.py b/erpnext/controllers/print_settings.py index edd722dbe8..5c29556398 100644 --- a/erpnext/controllers/print_settings.py +++ b/erpnext/controllers/print_settings.py @@ -5,24 +5,24 @@ from __future__ import unicode_literals import frappe from frappe.utils import cint -def print_settings_for_item_table(doc, setting_value=None): - +def print_settings_for_item_table(doc, settings=None): doc.print_templates = { "qty": "templates/print_formats/includes/item_table_qty.html" } doc.hide_in_print_layout = ["uom", "stock_uom"] - doc.flags.compact_item_print = setting_value if setting_value is not None\ - else cint(frappe.db.get_single_value("Print Settings", "compact_item_print")) + setting_fields = ['compact_item_print', 'print_uom_after_quantity'] + set_doc_flags_from_settings(doc, setting_fields, settings) if doc.flags.compact_item_print: doc.print_templates["description"] = "templates/print_formats/includes/item_table_description.html" doc.flags.compact_item_fields = ["description", "qty", "rate", "amount"] doc.flags.format_columns = format_columns -def print_settings_for_taxes(doc, setting_value=None): - doc.flags.print_taxes_with_zero_amount = setting_value if setting_value is not None\ - else cint(frappe.db.get_single_value("Print Settings", "print_taxes_with_zero_amount")) +def print_settings_for_taxes(doc, settings=None): + + set_doc_flags_from_settings(doc, ['print_taxes_with_zero_amount'], settings) + doc.flags.show_inclusive_tax_in_print = doc.is_inclusive_tax() doc.print_templates = { @@ -30,6 +30,17 @@ def print_settings_for_taxes(doc, setting_value=None): "taxes": "templates/print_formats/includes/taxes.html" } +def set_doc_flags_from_settings(doc, fields, settings=None): + if not settings: settings = {} + + print_settings = frappe.get_single('Print Settings') + + for field in fields: + if field in settings: + doc.flags[field] = settings.get(field) + else: + doc.flags[field] = print_settings.get(field) + def format_columns(display_columns, compact_fields): compact_fields = compact_fields + ["image", "item_code", "item_name"] final_columns = [] @@ -38,33 +49,38 @@ def format_columns(display_columns, compact_fields): final_columns.append(column) return final_columns -@frappe.whitelist() -def show_compact_item_setting(doc): +def has_items_field(doc): meta = frappe.get_meta(doc.doctype) items_field = meta.get_field('items') if items_field and items_field.fieldtype == 'Table': return True return False -@frappe.whitelist() -def show_taxes_setting(doc): +def has_taxes_field(doc): meta = frappe.get_meta(doc.doctype) - items_field = meta.get_field('taxes') - if items_field and items_field.fieldtype == 'Table': + taxes_field = meta.get_field('taxes') + if taxes_field and taxes_field.fieldtype == 'Table': return True return False def get_print_settings(): settings = { 'compact_item_print': { - 'condition': 'erpnext.controllers.print_settings.show_compact_item_setting', + 'condition': 'erpnext.controllers.print_settings.has_items_field', 'fieldtype': 'Check', 'child_field': 'items', 'label': 'Compact Item Print', 'set_template': 'erpnext.controllers.print_settings.print_settings_for_item_table' }, + 'print_uom_after_quantity': { + 'condition': 'erpnext.controllers.print_settings.has_taxes_field', + 'fieldtype': 'Check', + 'child_field': 'items', + 'label': 'Print UOM after Quantity', + 'set_template': 'erpnext.controllers.print_settings.print_settings_for_item_table' + }, 'print_taxes_with_zero_amount': { - 'condition': 'erpnext.controllers.print_settings.show_taxes_setting', + 'condition': 'erpnext.controllers.print_settings.has_taxes_field', 'fieldtype': 'Check', 'label': 'Print taxes with zero amount', 'set_template': 'erpnext.controllers.print_settings.print_settings_for_taxes' diff --git a/erpnext/templates/print_formats/includes/item_table_qty.html b/erpnext/templates/print_formats/includes/item_table_qty.html index ecaaef42b5..1d992dc302 100644 --- a/erpnext/templates/print_formats/includes/item_table_qty.html +++ b/erpnext/templates/print_formats/includes/item_table_qty.html @@ -1,4 +1,4 @@ -{% set qty_first=frappe.db.get_single_value("Print Settings", "print_uom_after_quantity") %} +{% set qty_first=doc.flags.print_uom_after_quantity %} {% if qty_first %} {{ doc.get_formatted("qty", doc) }} {% if (doc.uom and not doc.is_print_hide("uom")) %} {{ _(doc.uom) }} From bc6a2b2f9c260b2073ed2195d3147289664389f1 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 27 Oct 2020 19:42:58 +0530 Subject: [PATCH 029/414] wip --- erpnext/controllers/buying_controller.py | 8 +++++ erpnext/controllers/print_settings.py | 14 +++----- erpnext/controllers/selling_controller.py | 11 +++++++ .../print_formats/includes/items.html | 33 +++++++++++++++++++ 4 files changed, 57 insertions(+), 9 deletions(-) create mode 100644 erpnext/templates/print_formats/includes/items.html diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index de04abbca4..596f6f4b57 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -23,6 +23,14 @@ class BuyingController(StockController): if hasattr(self, "taxes"): print_settings_for_taxes(self) + def before_print(self): + pass + + def get_print_settings(self): + items_field = self.meta.get_field('items') + if items_field and items_field.fieldtype == 'Table': + return ['compact_item_print', 'print_uom_after_quantity'] + def get_feed(self): if self.get("supplier_name"): return _("From {0} | {1} {2}").format(self.supplier_name, self.currency, diff --git a/erpnext/controllers/print_settings.py b/erpnext/controllers/print_settings.py index 5c29556398..418d8eb328 100644 --- a/erpnext/controllers/print_settings.py +++ b/erpnext/controllers/print_settings.py @@ -64,26 +64,22 @@ def has_taxes_field(doc): return False def get_print_settings(): + + # return ['comp'] settings = { 'compact_item_print': { 'condition': 'erpnext.controllers.print_settings.has_items_field', - 'fieldtype': 'Check', 'child_field': 'items', - 'label': 'Compact Item Print', - 'set_template': 'erpnext.controllers.print_settings.print_settings_for_item_table' + # 'set_template': 'erpnext.controllers.print_settings.print_settings_for_item_table' }, 'print_uom_after_quantity': { 'condition': 'erpnext.controllers.print_settings.has_taxes_field', - 'fieldtype': 'Check', 'child_field': 'items', - 'label': 'Print UOM after Quantity', - 'set_template': 'erpnext.controllers.print_settings.print_settings_for_item_table' + # 'set_template': 'erpnext.controllers.print_settings.print_settings_for_item_table' }, 'print_taxes_with_zero_amount': { 'condition': 'erpnext.controllers.print_settings.has_taxes_field', - 'fieldtype': 'Check', - 'label': 'Print taxes with zero amount', - 'set_template': 'erpnext.controllers.print_settings.print_settings_for_taxes' + # 'set_template': 'erpnext.controllers.print_settings.print_settings_for_taxes' } } diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index ac26d3fea8..4c87e8c2f6 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -20,6 +20,17 @@ class SellingController(StockController): if hasattr(self, "taxes"): print_settings_for_taxes(self) + def before_print(self): + self.print_templates = { + "items": "templates/print_formats/includes/items.html", + } + self.flags.compact_item_fields = ['description'] + + def get_print_settings(self): + items_field = self.meta.get_field('items') + if items_field and items_field.fieldtype == 'Table': + return ['compact_item_print', 'print_uom_after_quantity'] + def get_feed(self): return _("To {0} | {1} {2}").format(self.customer_name, self.currency, diff --git a/erpnext/templates/print_formats/includes/items.html b/erpnext/templates/print_formats/includes/items.html new file mode 100644 index 0000000000..933ae17c2a --- /dev/null +++ b/erpnext/templates/print_formats/includes/items.html @@ -0,0 +1,33 @@ +{%- if data -%} + {%- set visible_columns = get_visible_columns(doc.get(df.fieldname), + table_meta, df) -%} + +
+
+ + + + {% for tdf in visible_columns %} + {% if (data and not print_settings.compact_item_print) or tdf.fieldname in doc.get(df.fieldname)[0].flags.compact_item_fields %} + + {% endif %} + {% endfor %} + + + + {% for d in data %} + + + {% for tdf in visible_columns %} + {% if not doc.get(df.fieldname)[0].flags.compact_item_print or tdf.fieldname in doc.get(df.fieldname)[0].flags.compact_item_fields %} + + {% endif %} + {% endfor %} + + {% endfor %} + +
{{ _("Sr") }} + {{ _(tdf.label) }}
{{ d.idx }} +
{{ print_value(tdf, d, doc, visible_columns) }}
+
+{%- endif -%} From 71e5b60df11035b21aba47b08c955bd9f30cf158 Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 29 Oct 2020 14:19:34 +0530 Subject: [PATCH 030/414] refactor: refactor contextual print setting implementation --- .../purchase_invoice_item.py | 5 +- .../sales_invoice_item/sales_invoice_item.py | 4 +- .../sales_invoice_return.html | 11 ++- .../purchase_order_item.py | 5 +- .../supplier_quotation_item.py | 5 +- erpnext/controllers/accounts_controller.py | 19 ++++- erpnext/controllers/buying_controller.py | 12 --- erpnext/controllers/print_settings.py | 80 +++++-------------- erpnext/controllers/selling_controller.py | 16 ---- erpnext/projects/doctype/project/project.py | 2 +- .../doctype/quotation_item/quotation_item.py | 4 +- .../sales_order_item/sales_order_item.py | 4 +- .../doctype/delivery_note/delivery_note.py | 2 +- .../delivery_note_item/delivery_note_item.py | 4 +- .../material_request_item.py | 4 +- .../purchase_receipt_item.py | 4 +- .../includes/item_table_description.html | 6 +- .../includes/item_table_qty.html | 2 +- .../print_formats/includes/items.html | 12 ++- .../print_formats/includes/taxes.html | 2 +- 20 files changed, 68 insertions(+), 135 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py index 56576df079..50ec7d8b4d 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py @@ -6,8 +6,5 @@ import frappe from frappe.model.document import Document -from erpnext.controllers.print_settings import print_settings_for_item_table - class PurchaseInvoiceItem(Document): - def __setup__(self): - print_settings_for_item_table(self) + pass diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py index 7a62f8e281..a73b03acc8 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py @@ -5,8 +5,6 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document -from erpnext.controllers.print_settings import print_settings_for_item_table class SalesInvoiceItem(Document): - def __setup__(self): - print_settings_for_item_table(self) + pass diff --git a/erpnext/accounts/print_format/sales_invoice_return/sales_invoice_return.html b/erpnext/accounts/print_format/sales_invoice_return/sales_invoice_return.html index 1d758e8935..3d5a9b1da9 100644 --- a/erpnext/accounts/print_format/sales_invoice_return/sales_invoice_return.html +++ b/erpnext/accounts/print_format/sales_invoice_return/sales_invoice_return.html @@ -1,5 +1,5 @@ {%- from "templates/print_formats/standard_macros.html" import add_header, render_field, print_value, fieldmeta, - get_width, get_align_class -%} + get_width, get_align_class with context -%} {%- macro render_currency(df, doc) -%}
@@ -63,14 +63,19 @@ {{ d.idx }} {% for tdf in visible_columns %} - {% if not d.flags.compact_item_print or tdf.fieldname in doc.get(df.fieldname)[0].flags.compact_item_fields %} + {% if not print_settings.compact_item_print or tdf.fieldname in doc.flags.compact_item_fields %} {% if tdf.fieldname == 'qty' %}
{{ (d[tdf.fieldname])|abs }}
{% elif tdf.fieldtype == 'Currency' %}
{{ frappe.utils.fmt_money((d[tdf.fieldname])|abs, currency=doc.currency) }}
{% else %} -
{{ print_value(tdf, d, doc, visible_columns) }}
+ {% if doc.child_print_templates %} + {%- set child_templates = doc.child_print_templates.get(df.fieldname) -%} +
{{ print_value(tdf, d, doc, visible_columns, child_templates) }}
+ {% else %} +
{{ print_value(tdf, d, doc, visible_columns) }}
+ {% endif %} {% endif %} {% endif %} {% endfor %} diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py index b711e36bf9..8bdcd47e02 100644 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py @@ -6,11 +6,8 @@ import frappe from frappe.model.document import Document -from erpnext.controllers.print_settings import print_settings_for_item_table - class PurchaseOrderItem(Document): - def __setup__(self): - print_settings_for_item_table(self) + pass def on_doctype_update(): frappe.db.add_index("Purchase Order Item", ["item_code", "warehouse"]) \ No newline at end of file diff --git a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.py b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.py index f24e5be076..64dda87945 100644 --- a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.py +++ b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.py @@ -6,8 +6,5 @@ import frappe from frappe.model.document import Document -from erpnext.controllers.print_settings import print_settings_for_item_table - class SupplierQuotationItem(Document): - def __setup__(self): - print_settings_for_item_table(self) + pass diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 166564961d..c016090314 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -22,6 +22,7 @@ from six import text_type from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_accounting_dimensions from erpnext.stock.get_item_details import get_item_warehouse, _get_item_tax_template, get_item_tax_map from erpnext.stock.doctype.packed_item.packed_item import make_packing_list +from erpnext.controllers.print_settings import set_print_templates_for_item_table, set_print_templates_for_taxes force_item_fields = ("item_group", "brand", "stock_uom", "is_fixed_asset", "item_tax_rate", "pricing_rules") @@ -29,6 +30,19 @@ class AccountsController(TransactionBase): def __init__(self, *args, **kwargs): super(AccountsController, self).__init__(*args, **kwargs) + def get_print_settings(self): + print_setting_fields = [] + items_field = self.meta.get_field('items') + + if items_field and items_field.fieldtype == 'Table': + print_setting_fields += ['compact_item_print', 'print_uom_after_quantity'] + + taxes_field = self.meta.get_field('taxes') + if taxes_field and taxes_field.fieldtype == 'Table': + print_setting_fields += ['print_taxes_with_zero_amount'] + + return print_setting_fields + @property def company_currency(self): if not hasattr(self, "__company_currency"): @@ -138,7 +152,7 @@ class AccountsController(TransactionBase): elif self.doctype in ("Quotation", "Purchase Order", "Sales Order"): self.validate_non_invoice_documents_schedule() - def before_print(self): + def before_print(self, settings=None): if self.doctype in ['Purchase Order', 'Sales Order', 'Sales Invoice', 'Purchase Invoice', 'Supplier Quotation', 'Purchase Receipt', 'Delivery Note', 'Quotation']: if self.get("group_same_items"): @@ -151,6 +165,9 @@ class AccountsController(TransactionBase): else: df.set("print_hide", 1) + set_print_templates_for_item_table(self, settings) + set_print_templates_for_taxes(self, settings) + def calculate_paid_amount(self): if hasattr(self, "is_pos") or hasattr(self, "is_paid"): is_paid = self.get("is_pos") or self.get("is_paid") diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 596f6f4b57..353bc09810 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -13,23 +13,11 @@ from erpnext.stock.stock_ledger import get_valuation_rate from erpnext.stock.doctype.stock_entry.stock_entry import get_used_alternative_items from erpnext.stock.doctype.serial_no.serial_no import get_auto_serial_nos, auto_make_serial_nos, get_serial_nos from frappe.contacts.doctype.address.address import get_address_display -from erpnext.controllers.print_settings import print_settings_for_taxes from erpnext.accounts.doctype.budget.budget import validate_expense_against_budget from erpnext.controllers.stock_controller import StockController class BuyingController(StockController): - def __setup__(self): - if hasattr(self, "taxes"): - print_settings_for_taxes(self) - - def before_print(self): - pass - - def get_print_settings(self): - items_field = self.meta.get_field('items') - if items_field and items_field.fieldtype == 'Table': - return ['compact_item_print', 'print_uom_after_quantity'] def get_feed(self): if self.get("supplier_name"): diff --git a/erpnext/controllers/print_settings.py b/erpnext/controllers/print_settings.py index 418d8eb328..e08c400068 100644 --- a/erpnext/controllers/print_settings.py +++ b/erpnext/controllers/print_settings.py @@ -5,41 +5,33 @@ from __future__ import unicode_literals import frappe from frappe.utils import cint -def print_settings_for_item_table(doc, settings=None): +def set_print_templates_for_item_table(doc, settings): doc.print_templates = { - "qty": "templates/print_formats/includes/item_table_qty.html" + "items": "templates/print_formats/includes/items.html", } - doc.hide_in_print_layout = ["uom", "stock_uom"] - setting_fields = ['compact_item_print', 'print_uom_after_quantity'] - set_doc_flags_from_settings(doc, setting_fields, settings) + doc.child_print_templates = { + "items": { + "qty": "templates/print_formats/includes/item_table_qty.html", + } + } - if doc.flags.compact_item_print: - doc.print_templates["description"] = "templates/print_formats/includes/item_table_description.html" - doc.flags.compact_item_fields = ["description", "qty", "rate", "amount"] + if doc.meta.get_field("items"): + doc.meta.get_field("items").hide_in_print_layout = ["uom", "stock_uom"] + + doc.flags.compact_item_fields = ["description", "qty", "rate", "amount"] + + if settings.compact_item_print: + doc.child_print_templates["items"]["description"] =\ + "templates/print_formats/includes/item_table_description.html" doc.flags.format_columns = format_columns -def print_settings_for_taxes(doc, settings=None): - - set_doc_flags_from_settings(doc, ['print_taxes_with_zero_amount'], settings) - +def set_print_templates_for_taxes(doc, settings): doc.flags.show_inclusive_tax_in_print = doc.is_inclusive_tax() - - doc.print_templates = { + doc.print_templates.update({ "total": "templates/print_formats/includes/total.html", "taxes": "templates/print_formats/includes/taxes.html" - } - -def set_doc_flags_from_settings(doc, fields, settings=None): - if not settings: settings = {} - - print_settings = frappe.get_single('Print Settings') - - for field in fields: - if field in settings: - doc.flags[field] = settings.get(field) - else: - doc.flags[field] = print_settings.get(field) + }) def format_columns(display_columns, compact_fields): compact_fields = compact_fields + ["image", "item_code", "item_name"] @@ -48,39 +40,3 @@ def format_columns(display_columns, compact_fields): if column not in compact_fields: final_columns.append(column) return final_columns - -def has_items_field(doc): - meta = frappe.get_meta(doc.doctype) - items_field = meta.get_field('items') - if items_field and items_field.fieldtype == 'Table': - return True - return False - -def has_taxes_field(doc): - meta = frappe.get_meta(doc.doctype) - taxes_field = meta.get_field('taxes') - if taxes_field and taxes_field.fieldtype == 'Table': - return True - return False - -def get_print_settings(): - - # return ['comp'] - settings = { - 'compact_item_print': { - 'condition': 'erpnext.controllers.print_settings.has_items_field', - 'child_field': 'items', - # 'set_template': 'erpnext.controllers.print_settings.print_settings_for_item_table' - }, - 'print_uom_after_quantity': { - 'condition': 'erpnext.controllers.print_settings.has_taxes_field', - 'child_field': 'items', - # 'set_template': 'erpnext.controllers.print_settings.print_settings_for_item_table' - }, - 'print_taxes_with_zero_amount': { - 'condition': 'erpnext.controllers.print_settings.has_taxes_field', - # 'set_template': 'erpnext.controllers.print_settings.print_settings_for_taxes' - } - } - - return settings diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 4c87e8c2f6..de3cda540a 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -11,26 +11,10 @@ from erpnext.stock.get_item_details import get_conversion_factor from erpnext.stock.doctype.item.item import set_item_default from frappe.contacts.doctype.address.address import get_address_display from erpnext.controllers.accounts_controller import get_taxes_and_charges -from erpnext.controllers.print_settings import print_settings_for_taxes from erpnext.controllers.stock_controller import StockController class SellingController(StockController): - def __setup__(self): - if hasattr(self, "taxes"): - print_settings_for_taxes(self) - - def before_print(self): - self.print_templates = { - "items": "templates/print_formats/includes/items.html", - } - self.flags.compact_item_fields = ['description'] - - def get_print_settings(self): - items_field = self.meta.get_field('items') - if items_field and items_field.fieldtype == 'Table': - return ['compact_item_print', 'print_uom_after_quantity'] - def get_feed(self): return _("To {0} | {1} {2}").format(self.customer_name, self.currency, diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index 5bbd29c4c4..24d0dc16bf 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -26,7 +26,7 @@ class Project(Document): self.update_costing() - def before_print(self): + def before_print(self, settings=None): self.onload() diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.py b/erpnext/selling/doctype/quotation_item/quotation_item.py index 966b542c41..7384871ed4 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.py +++ b/erpnext/selling/doctype/quotation_item/quotation_item.py @@ -5,8 +5,6 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document -from erpnext.controllers.print_settings import print_settings_for_item_table class QuotationItem(Document): - def __setup__(self): - print_settings_for_item_table(self) + pass diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.py b/erpnext/selling/doctype/sales_order_item/sales_order_item.py index 4a87a0c28a..27f303d43b 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.py +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.py @@ -5,11 +5,9 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document -from erpnext.controllers.print_settings import print_settings_for_item_table class SalesOrderItem(Document): - def __setup__(self): - print_settings_for_item_table(self) + pass def on_doctype_update(): frappe.db.add_index("Sales Order Item", ["item_code", "warehouse"]) \ No newline at end of file diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index d04cf785ab..1994dfd204 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -71,7 +71,7 @@ class DeliveryNote(SellingController): where name=`tabSales Invoice Item`.parent and is_return=1 and update_stock=1)""" }) - def before_print(self): + def before_print(self, settings=None): def toggle_print_hide(meta, fieldname): df = meta.get_field(fieldname) if self.get("print_without_amount"): diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py index aaca802f5c..5030595789 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py @@ -5,8 +5,6 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document -from erpnext.controllers.print_settings import print_settings_for_item_table class DeliveryNoteItem(Document): - def __setup__(self): - print_settings_for_item_table(self) + pass \ No newline at end of file diff --git a/erpnext/stock/doctype/material_request_item/material_request_item.py b/erpnext/stock/doctype/material_request_item/material_request_item.py index 6c6ecfea83..16f007f6a2 100644 --- a/erpnext/stock/doctype/material_request_item/material_request_item.py +++ b/erpnext/stock/doctype/material_request_item/material_request_item.py @@ -6,12 +6,10 @@ from __future__ import unicode_literals import frappe -from erpnext.controllers.print_settings import print_settings_for_item_table from frappe.model.document import Document class MaterialRequestItem(Document): - def __setup__(self): - print_settings_for_item_table(self) + pass def on_doctype_update(): frappe.db.add_index("Material Request Item", ["item_code", "warehouse"]) \ No newline at end of file diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py index 679bd1e242..b79bb5d043 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py @@ -5,8 +5,6 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document -from erpnext.controllers.print_settings import print_settings_for_item_table class PurchaseReceiptItem(Document): - def __setup__(self): - print_settings_for_item_table(self) + pass diff --git a/erpnext/templates/print_formats/includes/item_table_description.html b/erpnext/templates/print_formats/includes/item_table_description.html index 070cca5eb2..ed46c9e224 100644 --- a/erpnext/templates/print_formats/includes/item_table_description.html +++ b/erpnext/templates/print_formats/includes/item_table_description.html @@ -1,7 +1,7 @@ -{%- set compact = doc.flags.compact_item_print -%} -{%- set compact_fields = doc.flags.compact_item_fields -%} +{%- set compact = print_settings.compact_item_print -%} +{%- set compact_fields = parent_doc.flags.compact_item_fields -%} {%- set display_columns = visible_columns|map(attribute="fieldname")| list -%} -{%- set columns = doc.flags.format_columns(display_columns, compact_fields) -%} +{%- set columns = parent_doc.flags.format_columns(display_columns, compact_fields) -%} {% if doc.in_format_data("image") and doc.get("image") and "image" in display_columns -%}
diff --git a/erpnext/templates/print_formats/includes/item_table_qty.html b/erpnext/templates/print_formats/includes/item_table_qty.html index 1d992dc302..8e68f1cc63 100644 --- a/erpnext/templates/print_formats/includes/item_table_qty.html +++ b/erpnext/templates/print_formats/includes/item_table_qty.html @@ -1,4 +1,4 @@ -{% set qty_first=doc.flags.print_uom_after_quantity %} +{% set qty_first=print_settings.print_uom_after_quantity %} {% if qty_first %} {{ doc.get_formatted("qty", doc) }} {% if (doc.uom and not doc.is_print_hide("uom")) %} {{ _(doc.uom) }} diff --git a/erpnext/templates/print_formats/includes/items.html b/erpnext/templates/print_formats/includes/items.html index 933ae17c2a..55598e7e22 100644 --- a/erpnext/templates/print_formats/includes/items.html +++ b/erpnext/templates/print_formats/includes/items.html @@ -1,14 +1,13 @@ {%- if data -%} {%- set visible_columns = get_visible_columns(doc.get(df.fieldname), table_meta, df) -%} -
{% for tdf in visible_columns %} - {% if (data and not print_settings.compact_item_print) or tdf.fieldname in doc.get(df.fieldname)[0].flags.compact_item_fields %} + {% if (data and not print_settings.compact_item_print) or tdf.fieldname in doc.flags.compact_item_fields %} {% endif %} @@ -20,9 +19,14 @@ {% for tdf in visible_columns %} - {% if not doc.get(df.fieldname)[0].flags.compact_item_print or tdf.fieldname in doc.get(df.fieldname)[0].flags.compact_item_fields %} + {% if not print_settings.compact_item_print or tdf.fieldname in doc.flags.compact_item_fields %} + {% if doc.child_print_templates %} + {%- set child_templates = doc.child_print_templates.get(df.fieldname) %} +
{{ print_value(tdf, d, doc, visible_columns, child_templates) }}
+ {% else %} +
{{ print_value(tdf, d, doc, visible_columns) }}
+ {% endif %} {% endif %} {% endfor %} diff --git a/erpnext/templates/print_formats/includes/taxes.html b/erpnext/templates/print_formats/includes/taxes.html index 6e984f3901..334ac7834e 100644 --- a/erpnext/templates/print_formats/includes/taxes.html +++ b/erpnext/templates/print_formats/includes/taxes.html @@ -17,7 +17,7 @@ {{ render_discount_amount(doc) }} {%- endif -%} {%- for charge in data -%} - {%- if (charge.tax_amount or doc.flags.print_taxes_with_zero_amount) and (not charge.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%} + {%- if (charge.tax_amount or print_settings.print_taxes_with_zero_amount) and (not charge.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%}
From 18ef17f3ba5760569ea650288c45c197abc9f7dd Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 30 Oct 2020 15:41:36 +0530 Subject: [PATCH 031/414] feat: add tour for sales taxes template --- .../sales_taxes_and_charges_template.js | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.js b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.js index 97a6fdd336..0e011883b1 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.js +++ b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.js @@ -5,3 +5,25 @@ cur_frm.cscript.tax_table = "Sales Taxes and Charges"; {% include "erpnext/public/js/controllers/accounts.js" %} +frappe.tour['Sales Taxes and Charges Template'] = [ + { + fieldname: "title", + title: __("Title"), + description: __("A name by which you will identify this template. You can change this later."), + }, + { + fieldname: "company", + title: __("Company"), + description: __("Company for which this tax template will be applicable"), + }, + { + fieldname: "is_default", + title: __("Is this Default?"), + description: __("Set this template as the default for all sales transactions"), + }, + { + fieldname: "taxes", + title: __("Taxes Table"), + description: __("You can add a row for a tax rule here. These rules can be applied on the net total, or can be a flat amount."), + } +]; From 2d1f8341f97fe9cf5849b86b0e187e6b43944870 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 30 Oct 2020 15:41:58 +0530 Subject: [PATCH 032/414] feat: update onboarding for accounts --- .../accounts/module_onboarding/accounts/accounts.json | 2 +- .../chart_of_accounts/chart_of_accounts.json | 7 ++++--- .../configure_account_settings.json | 2 +- .../create_a_customer/create_a_customer.json | 7 +++---- .../create_a_product/create_a_product.json | 9 +++++---- .../create_a_supplier/create_a_supplier.json | 6 +++--- .../create_your_first_purchase_invoice.json | 6 +++--- .../create_your_first_sales_invoice.json | 2 +- .../onboarding_step/setup_taxes/setup_taxes.json | 7 ++++--- 9 files changed, 25 insertions(+), 23 deletions(-) diff --git a/erpnext/accounts/module_onboarding/accounts/accounts.json b/erpnext/accounts/module_onboarding/accounts/accounts.json index 83748dd972..6b5c5a1db8 100644 --- a/erpnext/accounts/module_onboarding/accounts/accounts.json +++ b/erpnext/accounts/module_onboarding/accounts/accounts.json @@ -13,7 +13,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/accounts", "idx": 0, "is_complete": 0, - "modified": "2020-10-19 14:43:45.080823", + "modified": "2020-10-30 15:41:15.547225", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts", diff --git a/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json b/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json index ff9dfd2d73..fc49bd652b 100644 --- a/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json +++ b/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json @@ -1,23 +1,24 @@ { "action": "Go to Page", + "action_label": "View Chart of Accounts", "callback_message": "You can continue with the onboarding after exploring this page", "callback_title": "Awesome Work", "creation": "2020-05-13 19:58:20.928127", - "description": "# Chart Of Accounts\n\n**The Chart of Accounts is the blueprint of the accounts in your organization.**\n\nThe overall structure of your Chart of Accounts is based on a system of double entry\naccounting that has become a standard all over the world to quantify how a\ncompany is doing financially.\n\nChart of Accounts is a tree view of the names of the Accounts (Ledgers and\nGroups) that a Company requires to manage its books of accounts. ERPNext sets\nup a simple chart of accounts for each Company you create, but you can\nmodify it according to your needs and legal requirements.\n\nFor each company, Chart of Accounts signifies the way to classify the accounting entries, mostly\nbased on statutory (tax, compliance to government regulations) requirements.\n\nThe Chart of Accounts helps you to answer questions like:\n\n * What is your organization worth?\n * How much debt have you taken?\n * How much profit are you making (and hence paying tax)?\n * How much are you selling?\n * What is your expense break-up?\n", + "description": "# Chart Of Accounts\n\nThe Chart of Accounts is the blueprint of the accounts in your organization.\nIt is a tree view of the names of the Accounts (Ledgers and Groups) that a Company requires to manage its books of accounts. ERPNext sets up a simple chart of accounts for each Company you create, but you can modify it according to your needs and legal requirements.\n\nFor each company, Chart of Accounts signifies the way to classify the accounting entries, mostly\nbased on statutory (tax, compliance to government regulations) requirements.\n\nThere's a brief video tutorial about chart of accounts in the next step.", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, "intro_video_url": "https://www.youtube.com/embed/AcfMCT7wLLo", "is_complete": 0, - "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-19 14:25:31.427339", + "modified": "2020-10-30 14:35:59.474920", "modified_by": "Administrator", "name": "Chart of Accounts", "owner": "Administrator", "path": "Tree/Account", "reference_document": "Account", + "show_form_tour": 0, "show_full_form": 0, "title": "Review Chart of Accounts", "validate_action": 0 diff --git a/erpnext/accounts/onboarding_step/configure_account_settings/configure_account_settings.json b/erpnext/accounts/onboarding_step/configure_account_settings/configure_account_settings.json index 083fbb52bf..c84430a0c6 100644 --- a/erpnext/accounts/onboarding_step/configure_account_settings/configure_account_settings.json +++ b/erpnext/accounts/onboarding_step/configure_account_settings/configure_account_settings.json @@ -6,7 +6,6 @@ "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, - "is_mandatory": 0, "is_single": 1, "is_skipped": 0, "modified": "2020-10-19 14:40:55.584484", @@ -14,6 +13,7 @@ "name": "Configure Account Settings", "owner": "Administrator", "reference_document": "Accounts Settings", + "show_form_tour": 0, "show_full_form": 1, "title": "Configure Account Settings", "validate_action": 1 diff --git a/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json b/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json index 4a967b140b..0b6750c5f8 100644 --- a/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json +++ b/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json @@ -1,20 +1,19 @@ { "action": "Create Entry", "creation": "2020-05-14 17:46:41.831517", - "description": "# Customer\n\nA customer, who is sometimes known as a client, buyer, or purchaser is the one who receives goods, services, products, or ideas, from a seller for a monetary consideration.\n\n### Creating a customer is easy and can be done in the following steps\n\n1. Go to the Customer list and click on New.\n2. Enter Full Name of the customer.\n3. Select **Company** if the customer represents a company or **Individual** otherwise in Type field.\n4. Select a Customer Group. A few groups are included by default, you can create additional groups if you need.\n5. Select the Territory.\n6. If the customer is being created against a lead, you can select the same in From Lead field.\n7. Save.\n\nUp next is a video about customers and suppliers that will give you more clarity on these concepts in ERPNext", + "description": "## Who is a Customer?\n\nA customer, who is sometimes known as a client, buyer, or purchaser is the one who receives goods, services, products, or ideas, from a seller for a monetary consideration.\n\nEvery customer needs to be assigned a unique id. Customer name itself can be the id or you can set a naming series for ids to be generated in Selling Settings.\n\nJust like the supplier, let's quickly create a customer.", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, - "intro_video_url": "https://www.youtube.com/watch?v=zsrrVDk6VBs", "is_complete": 0, - "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-16 12:59:16.989156", + "modified": "2020-10-30 15:28:46.659660", "modified_by": "Administrator", "name": "Create a Customer", "owner": "Administrator", "reference_document": "Customer", + "show_form_tour": 0, "show_full_form": 0, "title": "Create a Customer", "validate_action": 1 diff --git a/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json b/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json index 0cbefee858..d76f645d96 100644 --- a/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json +++ b/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json @@ -1,20 +1,21 @@ { "action": "Create Entry", "creation": "2020-05-12 18:16:06.624554", - "description": "## Creating Products\n\nIn ERPNext, any product or a service offered by your company is called an Item. The term Item is also applicable to raw materials or components of products yet to be produced (before they can be sold to customers). ERPNext allows you to manage all sorts of items like raw-materials, sub-assemblies, finished goods, item variants, and service items.\n\nERPNext is optimized for itemized management of your sales and purchase. If you are in services, you can create an Item for each service that you offer. Completing the Item Master is very essential for the successful implementation of ERPNext.\n\nYou can access the Item section\n\n`Desk > Stock > Item`\n\n\n", + "description": "## Products and Services\n\nDepending on the nature of your business, you might be selling products or services to your clients or even both. \nERPNext is optimized for itemized management of your sales and purchase.\n\nThe **Item Master** is where you can add all your sales items. If you are in services, you can create an Item for each service that you offer. If you run a manufacturing business, the same master is used for keeping a record of raw materials, sub-assemblies etc.\n\nCompleting the Item Master is very essential for the successful implementation of ERPNext. We have a brief video introducing the item master for you, you can watch it in the next step.", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, + "intro_video_url": "https://www.youtube.com/watch?v=Sl5UFA5H5EQ", "is_complete": 0, - "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-16 12:59:16.983833", + "modified": "2020-10-30 15:20:30.133495", "modified_by": "Administrator", "name": "Create a Product", "owner": "Administrator", "reference_document": "Item", + "show_form_tour": 0, "show_full_form": 0, - "title": "Create a Product", + "title": "Create a Sales Item", "validate_action": 1 } \ No newline at end of file diff --git a/erpnext/accounts/onboarding_step/create_a_supplier/create_a_supplier.json b/erpnext/accounts/onboarding_step/create_a_supplier/create_a_supplier.json index eede11d979..64bc7bbfef 100644 --- a/erpnext/accounts/onboarding_step/create_a_supplier/create_a_supplier.json +++ b/erpnext/accounts/onboarding_step/create_a_supplier/create_a_supplier.json @@ -1,19 +1,19 @@ { "action": "Create Entry", "creation": "2020-05-14 22:09:10.043554", - "description": "## Let's add your Suppliers\n\nSuppliers are companies or individuals who provide you with products or services. A supplier may be distinguished from a contractor or subcontractor, who commonly adds specialized input to deliverables. A supplier is also known as a vendor. There are different types of suppliers based on the goods and products they supply.\n\nERPNext allows you to create your own categories of suppliers. These categories are known as Supplier Groups. For example, if your suppliers are mainly pharmaceutical companies and FMCG distributors, you can create a new Supplier Groups for them and name the groups accordingly.", + "description": "## Who is a Supplier?\n\nSuppliers are companies or individuals who provide you with products or services. ERPNext has comprehensive features for purchase cycles. \n\nLet's quickly create a supplier with the minimal details required. You need the name of the supplier, assign the supplier to a group, and select the type of the supplier, viz. Company or Individual.", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, - "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-16 12:59:16.979176", + "modified": "2020-10-30 15:26:48.315772", "modified_by": "Administrator", "name": "Create a Supplier", "owner": "Administrator", "reference_document": "Supplier", + "show_form_tour": 0, "show_full_form": 0, "title": "Create a Supplier", "validate_action": 1 diff --git a/erpnext/accounts/onboarding_step/create_your_first_purchase_invoice/create_your_first_purchase_invoice.json b/erpnext/accounts/onboarding_step/create_your_first_purchase_invoice/create_your_first_purchase_invoice.json index 2b53f46fe9..ddbc89ec0a 100644 --- a/erpnext/accounts/onboarding_step/create_your_first_purchase_invoice/create_your_first_purchase_invoice.json +++ b/erpnext/accounts/onboarding_step/create_your_first_purchase_invoice/create_your_first_purchase_invoice.json @@ -1,19 +1,19 @@ { "action": "Create Entry", "creation": "2020-05-14 22:10:07.049704", - "description": "# What's a Purchase Invoice?\n\nA Purchase Invoice is a bill you receive from your Suppliers against which you need to make the payment.\nPurchase Invoice is the exact opposite of your Sales Invoice. Here you accrue expenses to your Supplier. Making a Purchase Invoice is very similar to making a Purchase Order.\n\n![Purchase Flow](https://docs.erpnext.com/docs/assets/img/accounts/pi-flow.png)\n\n", + "description": "# What's a Purchase Invoice?\n\nA Purchase Invoice is a bill you receive from your Suppliers against which you need to make the payment.\nPurchase Invoice is the exact opposite of your Sales Invoice. Here you accrue expenses to your Supplier. \n\nThe following is what a typical purchase cycle looks like, however you can create a purchase invoice directly as well.\n\n![Purchase Flow](https://docs.erpnext.com/docs/assets/img/accounts/pi-flow.png)\n\n", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, - "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-16 12:59:16.976334", + "modified": "2020-10-30 15:30:26.337773", "modified_by": "Administrator", "name": "Create Your First Purchase Invoice", "owner": "Administrator", "reference_document": "Purchase Invoice", + "show_form_tour": 0, "show_full_form": 1, "title": "Create Your First Purchase Invoice ", "validate_action": 1 diff --git a/erpnext/accounts/onboarding_step/create_your_first_sales_invoice/create_your_first_sales_invoice.json b/erpnext/accounts/onboarding_step/create_your_first_sales_invoice/create_your_first_sales_invoice.json index d56be9220d..9e7dd67900 100644 --- a/erpnext/accounts/onboarding_step/create_your_first_sales_invoice/create_your_first_sales_invoice.json +++ b/erpnext/accounts/onboarding_step/create_your_first_sales_invoice/create_your_first_sales_invoice.json @@ -6,7 +6,6 @@ "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, - "is_mandatory": 0, "is_single": 0, "is_skipped": 0, "modified": "2020-10-16 12:59:16.987507", @@ -14,6 +13,7 @@ "name": "Create Your First Sales Invoice", "owner": "Administrator", "reference_document": "Sales Invoice", + "show_form_tour": 0, "show_full_form": 1, "title": "Create Your First Sales Invoice ", "validate_action": 1 diff --git a/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json b/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json index fa3eabd974..a4922013da 100644 --- a/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json +++ b/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json @@ -1,19 +1,20 @@ { "action": "Create Entry", + "action_label": "Make a Sales Tax Template", "creation": "2020-05-13 19:29:43.844463", - "description": "# Setting up Taxes\n\nOne of the primary motivators for compulsory use of accounting tools is the calculation of taxes. ERPNext allows you to make configurable tax templates that you can apply to your sales or purchase transactions.\n\nThe templates created from this form can be used in Sales Orders and Sales Invoices. The way ERPNext sets up taxes is via templates. Other types of charges that may apply to your invoices (like shipping, insurance etc.) can also be configured as taxes.\n\nFor Tax Accounts that you want to use in the tax templates, go to:\n\n`> Home > Accounting > Chart of Accounts`\n\nSelect an account and click on edit. Select the 'Account Type' as 'Tax' for the account.\nIn this step we will guide you towards making the sales and taxes template.", + "description": "# Setting up Taxes\n\nAny sophisticated accounting system, including ERPNext will have automatic tax calculations for your transactions. These calculations are based on user defined rules in compliance to local rules and regulations.\n\nERPNext allows this via *Tax Templates*. These templates can be used in Sales Orders and Sales Invoices. Other types of charges that may apply to your invoices (like shipping, insurance etc.) can also be configured as taxes.\n\nFor Tax Accounts that you want to use in the tax templates, go to:\n\n`> Accounting > Taxes > Sales Taxes and Charges Template`\n\nYou can read more about these templates in our documentation [here](https://docs.erpnext.com/docs/user/manual/en/selling/sales-taxes-and-charges-template)\n", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, - "is_mandatory": 0, "is_single": 0, "is_skipped": 0, - "modified": "2020-10-16 12:59:16.991287", + "modified": "2020-10-30 14:54:18.087383", "modified_by": "Administrator", "name": "Setup Taxes", "owner": "Administrator", "reference_document": "Sales Taxes and Charges Template", + "show_form_tour": 1, "show_full_form": 1, "title": "Lets create a Tax Template for Sales ", "validate_action": 0 From e3b71b9b249946b2e8c8d0d5ebe5096ac7f038bf Mon Sep 17 00:00:00 2001 From: prssanna Date: Tue, 10 Nov 2020 17:23:24 +0530 Subject: [PATCH 033/414] fix: compact item print style --- .../print_formats/includes/item_table_description.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/templates/print_formats/includes/item_table_description.html b/erpnext/templates/print_formats/includes/item_table_description.html index ed46c9e224..7569e50b45 100644 --- a/erpnext/templates/print_formats/includes/item_table_description.html +++ b/erpnext/templates/print_formats/includes/item_table_description.html @@ -11,11 +11,11 @@
{% if doc.in_format_data("item_code") and "item_code" in display_columns -%} -
- {% if compact %}{% endif %} - {{ _(doc.item_code) }} - {% if compact %}{% endif %} + {% if compact %} +
+ {{ _(doc.item_code) }}
+ {% endif %} {%- endif %} {%- if doc.in_format_data("item_name") and "item_name" in display_columns and From f9e4f6b57a238f6f391754a7a7392928d6061294 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 17 Nov 2020 16:34:05 +0530 Subject: [PATCH 034/414] feat: add templates for online store --- .../shopping_cart/web_template/__init__.py | 0 .../web_template/hero_slider/__init__.py | 0 .../web_template/hero_slider/hero_slider.html | 0 .../web_template/hero_slider/hero_slider.json | 142 ++++++++ .../web_template/item_card_group/__init__.py | 0 .../item_card_group/item_card_group.html | 0 .../item_card_group/item_card_group.json | 312 ++++++++++++++++++ .../web_template/product_card/__init__.py | 0 .../product_card/product_card.html | 0 .../product_card/product_card.json | 33 ++ .../product_category_cards/__init__.py | 0 .../product_category_cards.html | 0 .../product_category_cards.json | 95 ++++++ 13 files changed, 582 insertions(+) create mode 100644 erpnext/shopping_cart/web_template/__init__.py create mode 100644 erpnext/shopping_cart/web_template/hero_slider/__init__.py create mode 100644 erpnext/shopping_cart/web_template/hero_slider/hero_slider.html create mode 100644 erpnext/shopping_cart/web_template/hero_slider/hero_slider.json create mode 100644 erpnext/shopping_cart/web_template/item_card_group/__init__.py create mode 100644 erpnext/shopping_cart/web_template/item_card_group/item_card_group.html create mode 100644 erpnext/shopping_cart/web_template/item_card_group/item_card_group.json create mode 100644 erpnext/shopping_cart/web_template/product_card/__init__.py create mode 100644 erpnext/shopping_cart/web_template/product_card/product_card.html create mode 100644 erpnext/shopping_cart/web_template/product_card/product_card.json create mode 100644 erpnext/shopping_cart/web_template/product_category_cards/__init__.py create mode 100644 erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.html create mode 100644 erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.json diff --git a/erpnext/shopping_cart/web_template/__init__.py b/erpnext/shopping_cart/web_template/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/hero_slider/__init__.py b/erpnext/shopping_cart/web_template/hero_slider/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json new file mode 100644 index 0000000000..a8ce2cd3cb --- /dev/null +++ b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json @@ -0,0 +1,142 @@ +{ + "__unsaved": 1, + "creation": "2020-11-17 15:21:51.207221", + "docstatus": 0, + "doctype": "Web Template", + "fields": [ + { + "__unsaved": 1, + "fieldname": "slide_1_image", + "fieldtype": "Attach Image", + "label": "Image", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_1_title", + "fieldtype": "Data", + "label": "Title", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_1_subtitle", + "fieldtype": "Data", + "label": "Subtitle", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_1_primary_action_label", + "fieldtype": "Data", + "label": "Primary Action Label", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_1_primary_action", + "fieldtype": "Data", + "label": "Primary Action", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2", + "fieldtype": "Section Break", + "label": "Slide 2", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2_image", + "fieldtype": "Attach Image", + "label": "Image ", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2_title", + "fieldtype": "Data", + "label": "Title ", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2_subtitle", + "fieldtype": "Data", + "label": "Subtitle ", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2_primary_action_label", + "fieldtype": "Data", + "label": "Primary Action Label ", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2_primary_action", + "fieldtype": "Data", + "label": "Primary Action ", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3", + "fieldtype": "Section Break", + "label": "Slide 3", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_image", + "fieldtype": "Attach Image", + "label": "Image ", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_title", + "fieldtype": "Data", + "label": "Title ", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_subtitle", + "fieldtype": "Data", + "label": "Subtitle ", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_primary_action_label", + "fieldtype": "Data", + "label": "Primary Action Label ", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_primary_action", + "fieldtype": "Data", + "label": "Primary Action ", + "reqd": 0 + } + ], + "idx": 0, + "modified": "2020-11-17 15:23:48.584868", + "modified_by": "Administrator", + "module": "Shopping Cart", + "name": "Hero Slider", + "owner": "Administrator", + "standard": 1, + "template": "", + "type": "Section" +} \ No newline at end of file diff --git a/erpnext/shopping_cart/web_template/item_card_group/__init__.py b/erpnext/shopping_cart/web_template/item_card_group/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/item_card_group/item_card_group.html b/erpnext/shopping_cart/web_template/item_card_group/item_card_group.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/item_card_group/item_card_group.json b/erpnext/shopping_cart/web_template/item_card_group/item_card_group.json new file mode 100644 index 0000000000..f1a70a99ad --- /dev/null +++ b/erpnext/shopping_cart/web_template/item_card_group/item_card_group.json @@ -0,0 +1,312 @@ +{ + "__unsaved": 1, + "creation": "2020-11-17 15:35:05.285322", + "docstatus": 0, + "doctype": "Web Template", + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "label": "Title", + "reqd": 1 + }, + { + "fieldname": "subtitle", + "fieldtype": "Data", + "label": "Subtitle", + "reqd": 0 + }, + { + "fieldname": "card_1", + "fieldtype": "Section Break", + "label": "Card 1", + "reqd": 0 + }, + { + "fieldname": "card_1_item", + "fieldtype": "Link", + "label": "Item", + "options": "Item", + "reqd": 0 + }, + { + "fieldname": "card_1_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_2", + "fieldtype": "Section Break", + "label": "Card 2", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_2_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_2_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_3", + "fieldtype": "Section Break", + "label": "Card 3", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_3_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_3_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_4", + "fieldtype": "Section Break", + "label": "Card 4", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_4_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_4_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_5", + "fieldtype": "Section Break", + "label": "Card 5", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_5_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_5_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_6", + "fieldtype": "Section Break", + "label": "Card 6", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_6_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_6_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_7", + "fieldtype": "Section Break", + "label": "Card 7", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_7_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_7_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_8", + "fieldtype": "Section Break", + "label": "Card 8", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_8_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_8_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_9", + "fieldtype": "Section Break", + "label": "Card 9", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_9_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_9_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_10", + "fieldtype": "Section Break", + "label": "Card 10", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_10_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_10_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_11", + "fieldtype": "Section Break", + "label": "Card 11", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_11_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_11_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_12", + "fieldtype": "Section Break", + "label": "Card 12", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_12_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_12_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + } + ], + "idx": 0, + "modified": "2020-11-17 16:37:46.325181", + "modified_by": "Administrator", + "module": "Shopping Cart", + "name": "Item Card Group", + "owner": "Administrator", + "standard": 1, + "template": "", + "type": "Section" +} \ No newline at end of file diff --git a/erpnext/shopping_cart/web_template/product_card/__init__.py b/erpnext/shopping_cart/web_template/product_card/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/product_card/product_card.html b/erpnext/shopping_cart/web_template/product_card/product_card.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/product_card/product_card.json b/erpnext/shopping_cart/web_template/product_card/product_card.json new file mode 100644 index 0000000000..1059c1b251 --- /dev/null +++ b/erpnext/shopping_cart/web_template/product_card/product_card.json @@ -0,0 +1,33 @@ +{ + "__unsaved": 1, + "creation": "2020-11-17 15:28:47.809342", + "docstatus": 0, + "doctype": "Web Template", + "fields": [ + { + "__unsaved": 1, + "fieldname": "item", + "fieldtype": "Link", + "label": "Item", + "options": "Item", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "featured", + "fieldtype": "Check", + "label": "Featured", + "options": "", + "reqd": 0 + } + ], + "idx": 0, + "modified": "2020-11-17 15:33:34.982515", + "modified_by": "Administrator", + "module": "Shopping Cart", + "name": "Product Card", + "owner": "Administrator", + "standard": 1, + "template": "", + "type": "Component" +} \ No newline at end of file diff --git a/erpnext/shopping_cart/web_template/product_category_cards/__init__.py b/erpnext/shopping_cart/web_template/product_category_cards/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.html b/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.json b/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.json new file mode 100644 index 0000000000..1a3143c209 --- /dev/null +++ b/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.json @@ -0,0 +1,95 @@ +{ + "__unsaved": 1, + "creation": "2020-11-17 15:25:50.855934", + "docstatus": 0, + "doctype": "Web Template", + "fields": [ + { + "__unsaved": 1, + "fieldname": "title", + "fieldtype": "Data", + "label": "Title", + "reqd": 1 + }, + { + "__unsaved": 1, + "fieldname": "subtitle", + "fieldtype": "Data", + "label": "Subtitle", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_1_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_2_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_3_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_4_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_5_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_6_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_7_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_8_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + } + ], + "idx": 0, + "modified": "2020-11-17 15:27:36.250460", + "modified_by": "Administrator", + "module": "Shopping Cart", + "name": "Product Category Cards", + "owner": "Administrator", + "standard": 1, + "template": "", + "type": "Section" +} \ No newline at end of file From 542bc017184db1187be0dcab948dbee0ba753a91 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 18 Nov 2020 15:00:34 +0530 Subject: [PATCH 035/414] fix(minor): update routes --- .../opening_invoice_creation_tool.py | 6 +++--- erpnext/assets/doctype/asset/asset.py | 8 ++++---- .../supplier_quotation/supplier_quotation.py | 2 +- erpnext/config/education.py | 2 +- erpnext/config/projects.py | 6 +++--- .../assessment_result_tool.js | 2 +- .../course_scheduling_tool.js | 2 +- .../program_enrollment/program_enrollment.py | 2 +- .../tally_migration/tally_migration.js | 4 ++-- .../clinical_procedure/clinical_procedure.js | 2 +- .../inpatient_record/inpatient_record.py | 2 +- .../patient_appointment.py | 4 ++-- erpnext/healthcare/utils.py | 10 +++++----- .../employee_transfer/employee_transfer.py | 2 +- .../leave_allocation/leave_allocation.py | 2 +- .../leave_application/leave_application.py | 2 +- .../hr/doctype/shift_request/shift_request.py | 2 +- erpnext/hr/utils.py | 2 +- erpnext/manufacturing/doctype/bom/bom.js | 2 +- .../doctype/bom/bom_item_preview.html | 4 ++-- .../production_plan/production_plan.py | 4 ++-- .../bom_stock_report/bom_stock_report.js | 4 ++-- .../doctype/payroll_period/payroll_period.py | 2 +- erpnext/projects/doctype/task/task_list.js | 2 +- erpnext/public/js/call_popup/call_popup.js | 4 ++-- erpnext/public/js/communication.js | 2 +- .../js/education/assessment_result_tool.html | 6 +++--- .../doctype/sales_order/sales_order.js | 4 ++-- .../page/point_of_sale/pos_controller.js | 20 +++++++++---------- .../welcome_to_erpnext.html | 1 - erpnext/stock/dashboard/item_dashboard.js | 2 +- erpnext/stock/doctype/batch/batch.js | 2 +- erpnext/stock/doctype/item/item.js | 4 ++-- erpnext/stock/doctype/item/item.py | 2 +- .../stock/doctype/item_price/item_price.js | 2 +- erpnext/support/doctype/issue/issue.js | 2 +- erpnext/support/doctype/issue/issue.py | 2 +- erpnext/utilities/bot.py | 4 ++-- 38 files changed, 68 insertions(+), 69 deletions(-) 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 d51856a8a4..0e1d140b2e 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 @@ -64,11 +64,11 @@ class OpeningInvoiceCreationTool(Document): prepare_invoice_summary(doctype, invoices) return invoices_summary, max_count - + def validate_company(self): if not self.company: frappe.throw(_("Please select the Company")) - + def set_missing_values(self, row): row.qty = row.qty or 1.0 row.temporary_opening_account = row.temporary_opening_account or get_temporary_opening_account(self.company) @@ -209,7 +209,7 @@ def start_import(invoices): frappe.db.commit() if errors: frappe.msgprint(_("You had {} errors while creating opening invoices. Check {} for more details") - .format(errors, "Error Log"), indicator="red", title=_("Error Occured")) + .format(errors, "Error Log"), indicator="red", title=_("Error Occured")) return names def publish(index, total, doctype): diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 30abc66a02..1793dad494 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -471,7 +471,7 @@ class Asset(AccountsController): asset_bought_with_invoice = (purchase_document == self.purchase_invoice) fixed_asset_account = self.get_fixed_asset_account() - + cwip_enabled = is_cwip_accounting_enabled(self.asset_category) cwip_account = self.get_cwip_account(cwip_enabled=cwip_enabled) @@ -503,10 +503,10 @@ class Asset(AccountsController): purchase_document = self.purchase_invoice if asset_bought_with_invoice else self.purchase_receipt return purchase_document - + def get_fixed_asset_account(self): return get_asset_category_account('fixed_asset_account', None, self.name, None, self.asset_category, self.company) - + def get_cwip_account(self, cwip_enabled=False): cwip_account = None try: @@ -659,7 +659,7 @@ def transfer_asset(args): frappe.db.commit() - frappe.msgprint(_("Asset Movement record {0} created").format("{0}").format(movement_entry.name)) + frappe.msgprint(_("Asset Movement record {0} created").format("{0}").format(movement_entry.name)) @frappe.whitelist() def get_item_details(item_code, asset_category): diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py index ae5611f3c4..6a4c02c075 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py @@ -71,7 +71,7 @@ class SupplierQuotation(BuyingController): doc_sup = doc_sup[0] if doc_sup else None if not doc_sup: frappe.throw(_("Supplier {0} not found in {1}").format(self.supplier, - " Request for Quotation {0} ".format(doc.name))) + " Request for Quotation {0} ".format(doc.name))) quote_status = _('Received') for item in doc.items: diff --git a/erpnext/config/education.py b/erpnext/config/education.py index 4efaaa65cd..1c8ab10f53 100644 --- a/erpnext/config/education.py +++ b/erpnext/config/education.py @@ -173,7 +173,7 @@ def get_data(): { "type": "doctype", "name": "Course Schedule", - "route": "#List/Course Schedule/Calendar" + "route": "/app/List/Course Schedule/Calendar" }, { "type": "doctype", diff --git a/erpnext/config/projects.py b/erpnext/config/projects.py index 47700d10b2..ab4db96477 100644 --- a/erpnext/config/projects.py +++ b/erpnext/config/projects.py @@ -16,13 +16,13 @@ def get_data(): { "type": "doctype", "name": "Task", - "route": "#List/Task", + "route": "/app/List/Task", "description": _("Project activity / task."), "onboard": 1, }, { "type": "report", - "route": "#List/Task/Gantt", + "route": "/app/List/Task/Gantt", "doctype": "Task", "name": "Gantt Chart", "description": _("Gantt chart of all tasks."), @@ -97,5 +97,5 @@ def get_data(): }, ] }, - + ] diff --git a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.js b/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.js index 3cd451209f..e213309c5e 100644 --- a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.js +++ b/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.js @@ -128,7 +128,7 @@ frappe.ui.form.on('Assessment Result Tool', { result_table.find(`span[data-student=${assessment_result.student}].total-score-grade`).html(assessment_result.grade); let link_span = result_table.find(`span[data-student=${assessment_result.student}].total-result-link`); $(link_span).css("display", "block"); - $(link_span).find("a").attr("href", "#Form/Assessment Result/"+assessment_result.name); + $(link_span).find("a").attr("href", "/desk/Form/Assessment Result/"+assessment_result.name); } }); } diff --git a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js index 20503f919c..f408dae7bd 100644 --- a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js +++ b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js @@ -25,7 +25,7 @@ frappe.ui.form.on('Course Scheduling Tool', {
${course_schedules.map( - c => ` + c => `` ).join('')} diff --git a/erpnext/education/doctype/program_enrollment/program_enrollment.py b/erpnext/education/doctype/program_enrollment/program_enrollment.py index 6fbcd8aa97..3045db7f32 100644 --- a/erpnext/education/doctype/program_enrollment/program_enrollment.py +++ b/erpnext/education/doctype/program_enrollment/program_enrollment.py @@ -87,7 +87,7 @@ class ProgramEnrollment(Document): fees.submit() fee_list.append(fees.name) if fee_list: - fee_list = ["""%s""" % \ + fee_list = ["""%s""" % \ (fee, fee) for fee in fee_list] msgprint(_("Fee Records Created - {0}").format(comma_and(fee_list))) diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js index fd16d1e84a..e8641114be 100644 --- a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js +++ b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js @@ -23,10 +23,10 @@ frappe.ui.form.on("Tally Migration", { frappe.msgprint({ message: __("An error has occurred during {0}. Check {1} for more details", [ - repl("%(tally_document)s", { + repl("%(tally_document)s", { tally_document: frm.docname }), - "Error Log" + "Error Log" ] ), title: __("Tally Migration Error"), diff --git a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js index eb7d4bdeba..19bddbb191 100644 --- a/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js +++ b/erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js @@ -86,7 +86,7 @@ frappe.ui.form.on('Clinical Procedure', { if (r.message) { frappe.show_alert({ message: __('Stock Entry {0} created', - ['' + r.message + '']), + ['' + r.message + '']), indicator: 'green' }); } diff --git a/erpnext/healthcare/doctype/inpatient_record/inpatient_record.py b/erpnext/healthcare/doctype/inpatient_record/inpatient_record.py index bc76970601..c7ab447860 100644 --- a/erpnext/healthcare/doctype/inpatient_record/inpatient_record.py +++ b/erpnext/healthcare/doctype/inpatient_record/inpatient_record.py @@ -50,7 +50,7 @@ class InpatientRecord(Document): if ip_record: msg = _(("Already {0} Patient {1} with Inpatient Record ").format(ip_record[0].status, self.patient) \ - + """ {0}""".format(ip_record[0].name)) + + """ {0}""".format(ip_record[0].name)) frappe.throw(msg) def admit(self, service_unit, check_in, expected_discharge=None): diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py index e685b20a8c..90d9023278 100755 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py @@ -63,7 +63,7 @@ class PatientAppointment(Document): if overlaps: overlapping_details = _('Appointment overlaps with ') - overlapping_details += "{0}
".format(overlaps[0][0]) + overlapping_details += "{0}
".format(overlaps[0][0]) overlapping_details += _('{0} has appointment scheduled with {1} at {2} having {3} minute(s) duration.').format( overlaps[0][1], overlaps[0][2], overlaps[0][3], overlaps[0][4]) frappe.throw(overlapping_details, title=_('Appointments Overlapping')) @@ -75,7 +75,7 @@ class PatientAppointment(Document): if frappe.db.get_single_value('Healthcare Settings', 'automate_appointment_invoicing'): if not frappe.db.get_value('Patient', self.patient, 'customer'): msg = _("Please set a Customer linked to the Patient") - msg += " {0}".format(self.patient) + msg += " {0}".format(self.patient) frappe.throw(msg, title=_('Customer Not Found')) def update_prescription_details(self): diff --git a/erpnext/healthcare/utils.py b/erpnext/healthcare/utils.py index 96282f50a9..248692332c 100644 --- a/erpnext/healthcare/utils.py +++ b/erpnext/healthcare/utils.py @@ -32,7 +32,7 @@ def get_healthcare_services_to_invoice(patient, company): def validate_customer_created(patient): if not frappe.db.get_value('Patient', patient.name, 'customer'): msg = _("Please set a Customer linked to the Patient") - msg += " {0}".format(patient.name) + msg += " {0}".format(patient.name) frappe.throw(msg, title=_('Customer Not Found')) @@ -169,7 +169,7 @@ def get_clinical_procedures_to_invoice(patient, company): service_item = get_healthcare_service_item('clinical_procedure_consumable_item') if not service_item: msg = _('Please Configure Clinical Procedure Consumable Item in ') - msg += '''Healthcare Settings''' + msg += '''Healthcare Settings''' frappe.throw(msg, title=_('Missing Configuration')) clinical_procedures_to_invoice.append({ @@ -324,7 +324,7 @@ def throw_config_service_item(is_inpatient): service_item_label = _('Inpatient Visit Charge Item') msg = _(('Please Configure {0} in ').format(service_item_label) \ - + '''Healthcare Settings''') + + '''Healthcare Settings''') frappe.throw(msg, title=_('Missing Configuration')) @@ -334,7 +334,7 @@ def throw_config_practitioner_charge(is_inpatient, practitioner): charge_name = _('Inpatient Visit Charge') msg = _(('Please Configure {0} for Healthcare Practitioner').format(charge_name) \ - + ''' {0}'''.format(practitioner)) + + ''' {0}'''.format(practitioner)) frappe.throw(msg, title=_('Missing Configuration')) @@ -654,6 +654,6 @@ def render_doc_as_html(doctype, docname, exclude_fields = []): >
" \ + section_html + html +'
' if doc_html: - doc_html = "
" %(doctype, docname) + doc_html + '
' + doc_html = "
" %(doctype, docname) + doc_html + '
' return {'html': doc_html} diff --git a/erpnext/hr/doctype/employee_transfer/employee_transfer.py b/erpnext/hr/doctype/employee_transfer/employee_transfer.py index c730e022a5..37d616f14d 100644 --- a/erpnext/hr/doctype/employee_transfer/employee_transfer.py +++ b/erpnext/hr/doctype/employee_transfer/employee_transfer.py @@ -50,7 +50,7 @@ class EmployeeTransfer(Document): employee = frappe.get_doc("Employee", self.employee) if self.create_new_employee_id: if self.new_employee_id: - frappe.throw(_("Please delete the Employee {0}\ + frappe.throw(_("Please delete the Employee {0}\ to cancel this document").format(self.new_employee_id)) #mark the employee as active employee.status = "Active" diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.py b/erpnext/hr/doctype/leave_allocation/leave_allocation.py index 03fe3fa035..32c5456239 100755 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation.py +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.py @@ -82,7 +82,7 @@ class LeaveAllocation(Document): frappe.msgprint(_("{0} already allocated for Employee {1} for period {2} to {3}") .format(self.leave_type, self.employee, formatdate(self.from_date), formatdate(self.to_date))) - frappe.throw(_('Reference') + ': {0}' + frappe.throw(_('Reference') + ': {0}' .format(leave_allocation[0][0]), OverlapError) def validate_back_dated_allocation(self): diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py index 3f25f58383..35c3ea77ea 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.py +++ b/erpnext/hr/doctype/leave_application/leave_application.py @@ -246,7 +246,7 @@ class LeaveApplication(Document): def throw_overlap_error(self, d): msg = _("Employee {0} has already applied for {1} between {2} and {3} : ").format(self.employee, d['leave_type'], formatdate(d['from_date']), formatdate(d['to_date'])) \ - + """ {0}""".format(d["name"]) + + """ {0}""".format(d["name"]) frappe.throw(msg, OverlapError) def get_total_leaves_on_half_day(self): diff --git a/erpnext/hr/doctype/shift_request/shift_request.py b/erpnext/hr/doctype/shift_request/shift_request.py index 1c2801bf08..473193d5ac 100644 --- a/erpnext/hr/doctype/shift_request/shift_request.py +++ b/erpnext/hr/doctype/shift_request/shift_request.py @@ -87,5 +87,5 @@ class ShiftRequest(Document): def throw_overlap_error(self, d): msg = _("Employee {0} has already applied for {1} between {2} and {3} : ").format(self.employee, d['shift_type'], formatdate(d['from_date']), formatdate(d['to_date'])) \ - + """ {0}""".format(d["name"]) + + """ {0}""".format(d["name"]) frappe.throw(msg, OverlapError) \ No newline at end of file diff --git a/erpnext/hr/utils.py b/erpnext/hr/utils.py index 8d95924681..3b8d73b0f0 100644 --- a/erpnext/hr/utils.py +++ b/erpnext/hr/utils.py @@ -211,7 +211,7 @@ def get_doc_condition(doctype): def throw_overlap_error(doc, exists_for, overlap_doc, from_date, to_date): msg = _("A {0} exists between {1} and {2} (").format(doc.doctype, formatdate(from_date), formatdate(to_date)) \ - + """ {1}""".format(doc.doctype, overlap_doc) \ + + """ {1}""".format(doc.doctype, overlap_doc) \ + _(") for {0}").format(exists_for) frappe.throw(msg) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 1c4b7a1e1c..55f7a1b8a9 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -134,7 +134,7 @@ frappe.ui.form.on("BOM", { frm.set_intro(__('This is a Template BOM and will be used to make the work order for {0} of the item {1}', [ `variants`, - `${frm.doc.item}`, + `${frm.doc.item}`, ]), true); frm.$wrapper.find(".variants-intro").on("click", () => { diff --git a/erpnext/manufacturing/doctype/bom/bom_item_preview.html b/erpnext/manufacturing/doctype/bom/bom_item_preview.html index c782f7bf0e..6cd5f8cb3c 100644 --- a/erpnext/manufacturing/doctype/bom/bom_item_preview.html +++ b/erpnext/manufacturing/doctype/bom/bom_item_preview.html @@ -12,11 +12,11 @@

{% if data.value %} - + {{ __("Open BOM {0}", [data.value.bold()]) }} {% endif %} {% if data.item_code %} - + {{ __("Open Item {0}", [data.item_code.bold()]) }} {% endif %}

diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 3833e86d27..8f9dd05217 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -319,7 +319,7 @@ class ProductionPlan(Document): frappe.flags.mute_messages = False if wo_list: - wo_list = ["""%s""" % \ + wo_list = ["""%s""" % \ (p, p) for p in wo_list] msgprint(_("{0} created").format(comma_and(wo_list))) else : @@ -423,7 +423,7 @@ class ProductionPlan(Document): frappe.flags.mute_messages = False if material_request_list: - material_request_list = ["""{1}""".format(m.name, m.name) \ + material_request_list = ["""{1}""".format(m.name, m.name) \ for m in material_request_list] msgprint(_("{0} created").format(comma_and(material_request_list))) else : diff --git a/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.js b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.js index 2ac6fa073b..2f18d1704b 100644 --- a/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.js +++ b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.js @@ -27,9 +27,9 @@ frappe.query_reports["BOM Stock Report"] = { value = default_formatter(value, row, column, data); if (column.id == "Item"){ if (data["Enough Parts to Build"] > 0){ - value = `${data['Item']}` + value = `${data['Item']}` } else { - value = `${data['Item']}` + value = `${data['Item']}` } } return value diff --git a/erpnext/payroll/doctype/payroll_period/payroll_period.py b/erpnext/payroll/doctype/payroll_period/payroll_period.py index d7893d0657..1c8cc53deb 100644 --- a/erpnext/payroll/doctype/payroll_period/payroll_period.py +++ b/erpnext/payroll/doctype/payroll_period/payroll_period.py @@ -41,7 +41,7 @@ class PayrollPeriod(Document): if overlap_doc: msg = _("A {0} exists between {1} and {2} (").format(self.doctype, formatdate(self.start_date), formatdate(self.end_date)) \ - + """ {1}""".format(self.doctype, overlap_doc[0].name) \ + + """ {1}""".format(self.doctype, overlap_doc[0].name) \ + _(") for {0}").format(self.company) frappe.throw(msg) diff --git a/erpnext/projects/doctype/task/task_list.js b/erpnext/projects/doctype/task/task_list.js index 941fe97546..7c620317de 100644 --- a/erpnext/projects/doctype/task/task_list.js +++ b/erpnext/projects/doctype/task/task_list.js @@ -26,7 +26,7 @@ frappe.listview_settings['Task'] = { }, gantt_custom_popup_html: function(ganttobj, task) { var html = `
${ganttobj.name}
`; + href="/desk/Form/Task/${ganttobj.id}""> ${ganttobj.name} `; if(task.project) html += `

Project: ${task.project}

`; html += `

Progress: ${ganttobj.progress}

`; diff --git a/erpnext/public/js/call_popup/call_popup.js b/erpnext/public/js/call_popup/call_popup.js index 5e4d4a585f..378d6d131d 100644 --- a/erpnext/public/js/call_popup/call_popup.js +++ b/erpnext/public/js/call_popup/call_popup.js @@ -85,7 +85,7 @@ class CallPopup {
+ href="/desk/Form/Call Log/${this.call_log.name}"> ${__('View call log')} `, @@ -167,7 +167,7 @@ class CallPopup { const issue_field = this.dialog.get_field("last_issue"); issue_field.set_value(issue.subject); issue_field.$wrapper.append(` - + ${__('View all issues from {0}', [issue.customer])} `); diff --git a/erpnext/public/js/communication.js b/erpnext/public/js/communication.js index 26e5ab8b32..38778e2ab0 100644 --- a/erpnext/public/js/communication.js +++ b/erpnext/public/js/communication.js @@ -84,7 +84,7 @@ frappe.ui.form.on("Communication", { frm.reload_doc(); frappe.show_alert({ message: __("Opportunity {0} created", - ['' + r.message + '']), + ['' + r.message + '']), indicator: 'green' }); } diff --git a/erpnext/public/js/education/assessment_result_tool.html b/erpnext/public/js/education/assessment_result_tool.html index 9fc17f7be1..b591010ec8 100644 --- a/erpnext/public/js/education/assessment_result_tool.html +++ b/erpnext/public/js/education/assessment_result_tool.html @@ -19,7 +19,7 @@ {% for s in students %} - @@ -29,7 +29,7 @@ ${course_schedules.map( - c => ` + c => `` ).join('')} diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js index e8641114be..5482b9cc69 100644 --- a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js +++ b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js @@ -23,10 +23,10 @@ frappe.ui.form.on("Tally Migration", { frappe.msgprint({ message: __("An error has occurred during {0}. Check {1} for more details", [ - repl("%(tally_document)s", { + repl("%(tally_document)s", { tally_document: frm.docname }), - "Error Log" + "Error Log" ] ), title: __("Tally Migration Error"), diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 55f7a1b8a9..42662f6f8f 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -134,7 +134,7 @@ frappe.ui.form.on("BOM", { frm.set_intro(__('This is a Template BOM and will be used to make the work order for {0} of the item {1}', [ `variants`, - `${frm.doc.item}`, + `${frm.doc.item}`, ]), true); frm.$wrapper.find(".variants-intro").on("click", () => { diff --git a/erpnext/projects/doctype/task/task_list.js b/erpnext/projects/doctype/task/task_list.js index 7c620317de..1b6c5fd9fe 100644 --- a/erpnext/projects/doctype/task/task_list.js +++ b/erpnext/projects/doctype/task/task_list.js @@ -26,7 +26,7 @@ frappe.listview_settings['Task'] = { }, gantt_custom_popup_html: function(ganttobj, task) { var html = `
${ganttobj.name}
`; + href="/app/task/${ganttobj.id}""> ${ganttobj.name} `; if(task.project) html += `

Project: ${task.project}

`; html += `

Progress: ${ganttobj.progress}

`; diff --git a/erpnext/public/js/call_popup/call_popup.js b/erpnext/public/js/call_popup/call_popup.js index 16e9cdb503..be1745e54f 100644 --- a/erpnext/public/js/call_popup/call_popup.js +++ b/erpnext/public/js/call_popup/call_popup.js @@ -85,7 +85,7 @@ class CallPopup {
+ href="/app/call-log/${this.call_log.name}"> ${__('View call log')} `, @@ -167,7 +167,7 @@ class CallPopup { const issue_field = this.dialog.get_field("last_issue"); issue_field.set_value(issue.subject); issue_field.$wrapper.append(` - + ${__('View all issues from {0}', [issue.customer])} `); diff --git a/erpnext/public/js/communication.js b/erpnext/public/js/communication.js index 38778e2ab0..7ce8b0913c 100644 --- a/erpnext/public/js/communication.js +++ b/erpnext/public/js/communication.js @@ -84,7 +84,7 @@ frappe.ui.form.on("Communication", { frm.reload_doc(); frappe.show_alert({ message: __("Opportunity {0} created", - ['' + r.message + '']), + ['' + r.message + '']), indicator: 'green' }); } diff --git a/erpnext/public/js/setup_wizard.js b/erpnext/public/js/setup_wizard.js index 092f83903e..ef03b01698 100644 --- a/erpnext/public/js/setup_wizard.js +++ b/erpnext/public/js/setup_wizard.js @@ -127,11 +127,9 @@ erpnext.setup.slides_settings = [ options: "", fieldtype: 'Select' }, { fieldname: 'view_coa', label: __('View Chart of Accounts'), fieldtype: 'Button' }, - - { fieldtype: "Section Break", label: __('Financial Year') }, - { fieldname: 'fy_start_date', label: __('Start Date'), fieldtype: 'Date', reqd: 1 }, - { fieldtype: "Column Break" }, - { fieldname: 'fy_end_date', label: __('End Date'), fieldtype: 'Date', reqd: 1 }, + { fieldname: 'fy_start_date', label: __('Financial Year Begins On'), fieldtype: 'Date', reqd: 1 }, + // end date should be hidden (auto calculated) + { fieldname: 'fy_end_date', label: __('End Date'), fieldtype: 'Date', reqd: 1, hidden: 1 }, ], onload: function (slide) { diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index df812ad450..1cb71aeea1 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -436,7 +436,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend( callback: function(r) { if(r.message) { frappe.msgprint(__('Material Request {0} submitted.', - ['' + r.message.name+ ''])); + ['' + r.message.name+ ''])); } d.hide(); me.frm.reload_doc(); diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js index faa9b5df2f..f64d5931ae 100644 --- a/erpnext/stock/dashboard/item_dashboard.js +++ b/erpnext/stock/dashboard/item_dashboard.js @@ -198,7 +198,7 @@ erpnext.stock.move_item = function(item, source, target, actual_qty, rate, callb freeze: true, callback: function(r) { frappe.show_alert(__('Stock Entry {0} created', - ['' + r.message.name+ ''])); + ['' + r.message.name+ ''])); dialog.hide(); callback(r); }, diff --git a/erpnext/stock/doctype/batch/batch.js b/erpnext/stock/doctype/batch/batch.js index 7b2edff7e0..3b07e4e80c 100644 --- a/erpnext/stock/doctype/batch/batch.js +++ b/erpnext/stock/doctype/batch/batch.js @@ -102,7 +102,7 @@ frappe.ui.form.on('Batch', { }, callback: (r) => { frappe.show_alert(__('Stock Entry {0} created', - ['' + r.message.name+ ''])); + ['' + r.message.name+ ''])); frm.refresh(); }, }); diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 43e18d16fc..9e0941146a 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -85,7 +85,7 @@ frappe.ui.form.on("Item", { } if (frm.doc.variant_of) { frm.set_intro(__('This Item is a Variant of {0} (Template).', - [`${frm.doc.variant_of}`]), true); + [`${frm.doc.variant_of}`]), true); } if (frappe.defaults.get_default("item_naming_by")!="Naming Series" || frm.doc.variant_of) { @@ -649,7 +649,7 @@ $.extend(erpnext.item, { if (r.message) { var variant = r.message; frappe.msgprint_dialog = frappe.msgprint(__("Item Variant {0} already exists with same attributes", - [repl('%(item)s', { + [repl('%(item)s', { item_encoded: encodeURIComponent(variant), item: variant })] diff --git a/erpnext/stock/doctype/item_price/item_price.js b/erpnext/stock/doctype/item_price/item_price.js index 773fddcf96..017d248ffc 100644 --- a/erpnext/stock/doctype/item_price/item_price.js +++ b/erpnext/stock/doctype/item_price/item_price.js @@ -14,6 +14,6 @@ frappe.ui.form.on("Item Price", { frm.add_fetch("item_code", "stock_uom", "uom"); frm.set_df_property("bulk_import_help", "options", - '' + __("Import in Bulk") + ''); + '' + __("Import in Bulk") + ''); } }); diff --git a/erpnext/support/doctype/issue/issue.js b/erpnext/support/doctype/issue/issue.js index 5b295d7254..158416ba79 100644 --- a/erpnext/support/doctype/issue/issue.js +++ b/erpnext/support/doctype/issue/issue.js @@ -189,10 +189,7 @@ frappe.ui.form.on("Issue", { subject: dialog.fields_dict.subject.value, communication_id: e.currentTarget.closest(".timeline-item").getAttribute("data-name") }, (r) => { - let url = window.location.href - let arr = url.split("/"); - let result = arr[0] + "//" + arr[2] - frappe.msgprint(`New issue created: ${r.message}`) + frappe.msgprint(`New issue created: ${r.message}`) frm.reload_doc(); dialog.hide(); }); From fa102e4713be1eadc6b873c0f94ad3a44fe74c31 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 17 Nov 2020 16:34:05 +0530 Subject: [PATCH 093/414] feat: add templates for online store --- .../shopping_cart/web_template/__init__.py | 0 .../web_template/hero_slider/__init__.py | 0 .../web_template/hero_slider/hero_slider.html | 0 .../web_template/hero_slider/hero_slider.json | 142 ++++++++ .../web_template/item_card_group/__init__.py | 0 .../item_card_group/item_card_group.html | 0 .../item_card_group/item_card_group.json | 312 ++++++++++++++++++ .../web_template/product_card/__init__.py | 0 .../product_card/product_card.html | 0 .../product_card/product_card.json | 33 ++ .../product_category_cards/__init__.py | 0 .../product_category_cards.html | 0 .../product_category_cards.json | 95 ++++++ 13 files changed, 582 insertions(+) create mode 100644 erpnext/shopping_cart/web_template/__init__.py create mode 100644 erpnext/shopping_cart/web_template/hero_slider/__init__.py create mode 100644 erpnext/shopping_cart/web_template/hero_slider/hero_slider.html create mode 100644 erpnext/shopping_cart/web_template/hero_slider/hero_slider.json create mode 100644 erpnext/shopping_cart/web_template/item_card_group/__init__.py create mode 100644 erpnext/shopping_cart/web_template/item_card_group/item_card_group.html create mode 100644 erpnext/shopping_cart/web_template/item_card_group/item_card_group.json create mode 100644 erpnext/shopping_cart/web_template/product_card/__init__.py create mode 100644 erpnext/shopping_cart/web_template/product_card/product_card.html create mode 100644 erpnext/shopping_cart/web_template/product_card/product_card.json create mode 100644 erpnext/shopping_cart/web_template/product_category_cards/__init__.py create mode 100644 erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.html create mode 100644 erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.json diff --git a/erpnext/shopping_cart/web_template/__init__.py b/erpnext/shopping_cart/web_template/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/hero_slider/__init__.py b/erpnext/shopping_cart/web_template/hero_slider/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json new file mode 100644 index 0000000000..a8ce2cd3cb --- /dev/null +++ b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json @@ -0,0 +1,142 @@ +{ + "__unsaved": 1, + "creation": "2020-11-17 15:21:51.207221", + "docstatus": 0, + "doctype": "Web Template", + "fields": [ + { + "__unsaved": 1, + "fieldname": "slide_1_image", + "fieldtype": "Attach Image", + "label": "Image", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_1_title", + "fieldtype": "Data", + "label": "Title", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_1_subtitle", + "fieldtype": "Data", + "label": "Subtitle", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_1_primary_action_label", + "fieldtype": "Data", + "label": "Primary Action Label", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_1_primary_action", + "fieldtype": "Data", + "label": "Primary Action", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2", + "fieldtype": "Section Break", + "label": "Slide 2", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2_image", + "fieldtype": "Attach Image", + "label": "Image ", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2_title", + "fieldtype": "Data", + "label": "Title ", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2_subtitle", + "fieldtype": "Data", + "label": "Subtitle ", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2_primary_action_label", + "fieldtype": "Data", + "label": "Primary Action Label ", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2_primary_action", + "fieldtype": "Data", + "label": "Primary Action ", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3", + "fieldtype": "Section Break", + "label": "Slide 3", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_image", + "fieldtype": "Attach Image", + "label": "Image ", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_title", + "fieldtype": "Data", + "label": "Title ", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_subtitle", + "fieldtype": "Data", + "label": "Subtitle ", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_primary_action_label", + "fieldtype": "Data", + "label": "Primary Action Label ", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_primary_action", + "fieldtype": "Data", + "label": "Primary Action ", + "reqd": 0 + } + ], + "idx": 0, + "modified": "2020-11-17 15:23:48.584868", + "modified_by": "Administrator", + "module": "Shopping Cart", + "name": "Hero Slider", + "owner": "Administrator", + "standard": 1, + "template": "", + "type": "Section" +} \ No newline at end of file diff --git a/erpnext/shopping_cart/web_template/item_card_group/__init__.py b/erpnext/shopping_cart/web_template/item_card_group/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/item_card_group/item_card_group.html b/erpnext/shopping_cart/web_template/item_card_group/item_card_group.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/item_card_group/item_card_group.json b/erpnext/shopping_cart/web_template/item_card_group/item_card_group.json new file mode 100644 index 0000000000..f1a70a99ad --- /dev/null +++ b/erpnext/shopping_cart/web_template/item_card_group/item_card_group.json @@ -0,0 +1,312 @@ +{ + "__unsaved": 1, + "creation": "2020-11-17 15:35:05.285322", + "docstatus": 0, + "doctype": "Web Template", + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "label": "Title", + "reqd": 1 + }, + { + "fieldname": "subtitle", + "fieldtype": "Data", + "label": "Subtitle", + "reqd": 0 + }, + { + "fieldname": "card_1", + "fieldtype": "Section Break", + "label": "Card 1", + "reqd": 0 + }, + { + "fieldname": "card_1_item", + "fieldtype": "Link", + "label": "Item", + "options": "Item", + "reqd": 0 + }, + { + "fieldname": "card_1_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_2", + "fieldtype": "Section Break", + "label": "Card 2", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_2_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_2_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_3", + "fieldtype": "Section Break", + "label": "Card 3", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_3_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_3_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_4", + "fieldtype": "Section Break", + "label": "Card 4", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_4_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_4_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_5", + "fieldtype": "Section Break", + "label": "Card 5", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_5_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_5_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_6", + "fieldtype": "Section Break", + "label": "Card 6", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_6_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_6_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_7", + "fieldtype": "Section Break", + "label": "Card 7", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_7_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_7_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_8", + "fieldtype": "Section Break", + "label": "Card 8", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_8_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_8_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_9", + "fieldtype": "Section Break", + "label": "Card 9", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_9_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_9_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_10", + "fieldtype": "Section Break", + "label": "Card 10", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_10_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_10_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_11", + "fieldtype": "Section Break", + "label": "Card 11", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_11_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_11_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_12", + "fieldtype": "Section Break", + "label": "Card 12", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_12_item", + "fieldtype": "Link", + "label": "Item", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "card_12_featured", + "fieldtype": "Check", + "label": "Featured", + "reqd": 0 + } + ], + "idx": 0, + "modified": "2020-11-17 16:37:46.325181", + "modified_by": "Administrator", + "module": "Shopping Cart", + "name": "Item Card Group", + "owner": "Administrator", + "standard": 1, + "template": "", + "type": "Section" +} \ No newline at end of file diff --git a/erpnext/shopping_cart/web_template/product_card/__init__.py b/erpnext/shopping_cart/web_template/product_card/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/product_card/product_card.html b/erpnext/shopping_cart/web_template/product_card/product_card.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/product_card/product_card.json b/erpnext/shopping_cart/web_template/product_card/product_card.json new file mode 100644 index 0000000000..1059c1b251 --- /dev/null +++ b/erpnext/shopping_cart/web_template/product_card/product_card.json @@ -0,0 +1,33 @@ +{ + "__unsaved": 1, + "creation": "2020-11-17 15:28:47.809342", + "docstatus": 0, + "doctype": "Web Template", + "fields": [ + { + "__unsaved": 1, + "fieldname": "item", + "fieldtype": "Link", + "label": "Item", + "options": "Item", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "featured", + "fieldtype": "Check", + "label": "Featured", + "options": "", + "reqd": 0 + } + ], + "idx": 0, + "modified": "2020-11-17 15:33:34.982515", + "modified_by": "Administrator", + "module": "Shopping Cart", + "name": "Product Card", + "owner": "Administrator", + "standard": 1, + "template": "", + "type": "Component" +} \ No newline at end of file diff --git a/erpnext/shopping_cart/web_template/product_category_cards/__init__.py b/erpnext/shopping_cart/web_template/product_category_cards/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.html b/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.json b/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.json new file mode 100644 index 0000000000..1a3143c209 --- /dev/null +++ b/erpnext/shopping_cart/web_template/product_category_cards/product_category_cards.json @@ -0,0 +1,95 @@ +{ + "__unsaved": 1, + "creation": "2020-11-17 15:25:50.855934", + "docstatus": 0, + "doctype": "Web Template", + "fields": [ + { + "__unsaved": 1, + "fieldname": "title", + "fieldtype": "Data", + "label": "Title", + "reqd": 1 + }, + { + "__unsaved": 1, + "fieldname": "subtitle", + "fieldtype": "Data", + "label": "Subtitle", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_1_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_2_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_3_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_4_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_5_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_6_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_7_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "category_8_group", + "fieldtype": "Link", + "label": "Item Group", + "options": "Item Group", + "reqd": 0 + } + ], + "idx": 0, + "modified": "2020-11-17 15:27:36.250460", + "modified_by": "Administrator", + "module": "Shopping Cart", + "name": "Product Category Cards", + "owner": "Administrator", + "standard": 1, + "template": "", + "type": "Section" +} \ No newline at end of file From 09c8aaa87aa40a1a7dc287cddcfb2613938f8446 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 18 Nov 2020 17:09:45 +0530 Subject: [PATCH 094/414] feat: add slider template --- .../web_template/hero_slider/hero_slider.html | 112 +++++++++ .../web_template/hero_slider/hero_slider.json | 230 ++++++++++++++++-- 2 files changed, 323 insertions(+), 19 deletions(-) diff --git a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html index e69de29bb2..e8b79743ab 100644 --- a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html +++ b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html @@ -0,0 +1,112 @@ +{%- macro slide(image, title, subtitle, action, label, index, align="Left", theme="Dark") -%} +{%- set align_class = resolve_class({ + 'text-right': align == 'Right', + 'text-centre': align == 'Center', + 'text-left': align == 'Left', +}) -%} + +{%- set heading_class = resolve_class({ + 'text-white': theme == 'Dark', + '': theme == 'Light', +}) -%} + +{%- endmacro -%} + + + + + + \ No newline at end of file diff --git a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json index a8ce2cd3cb..496fc7995e 100644 --- a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json +++ b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json @@ -5,35 +5,56 @@ "doctype": "Web Template", "fields": [ { - "__unsaved": 1, + "fieldname": "slider_name", + "fieldtype": "Data", + "label": "Slider Name", + "reqd": 1 + }, + { + "default": "1", + "fieldname": "show_indicators", + "fieldtype": "Check", + "label": "Show Indicators", + "reqd": 0 + }, + { + "default": "1", + "fieldname": "show_controls", + "fieldtype": "Check", + "label": "Show Controls", + "reqd": 0 + }, + { + "fieldname": "slide_1", + "fieldtype": "Section Break", + "label": "Slide 1", + "reqd": 0 + }, + { "fieldname": "slide_1_image", "fieldtype": "Attach Image", "label": "Image", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_1_title", "fieldtype": "Data", "label": "Title", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_1_subtitle", - "fieldtype": "Data", + "fieldtype": "Small Text", "label": "Subtitle", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_1_primary_action_label", "fieldtype": "Data", "label": "Primary Action Label", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_1_primary_action", "fieldtype": "Data", "label": "Primary Action", @@ -41,46 +62,73 @@ }, { "__unsaved": 1, + "fieldname": "slide_1_content_align", + "fieldtype": "Select", + "label": "Content Align", + "options": "Left\nCentre\nRight", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_1_theme", + "fieldtype": "Select", + "label": "Slide Theme", + "options": "Dark\nLight", + "reqd": 0 + }, + { "fieldname": "slide_2", "fieldtype": "Section Break", "label": "Slide 2", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_2_image", "fieldtype": "Attach Image", "label": "Image ", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_2_title", "fieldtype": "Data", "label": "Title ", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_2_subtitle", - "fieldtype": "Data", + "fieldtype": "Small Text", "label": "Subtitle ", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_2_primary_action_label", "fieldtype": "Data", "label": "Primary Action Label ", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_2_primary_action", "fieldtype": "Data", "label": "Primary Action ", "reqd": 0 }, + { + "__unsaved": 1, + "default": "Left", + "fieldname": "slide_2_content_align", + "fieldtype": "Select", + "label": "Content Align", + "options": "Left\nCentre\nRight", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2_theme", + "fieldtype": "Select", + "label": "Slide Theme", + "options": "Dark\nLight", + "reqd": 0 + }, { "__islocal": 1, "__unsaved": 1, @@ -94,7 +142,7 @@ "__unsaved": 1, "fieldname": "slide_3_image", "fieldtype": "Attach Image", - "label": "Image ", + "label": "Image", "reqd": 0 }, { @@ -102,15 +150,15 @@ "__unsaved": 1, "fieldname": "slide_3_title", "fieldtype": "Data", - "label": "Title ", + "label": "Title", "reqd": 0 }, { "__islocal": 1, "__unsaved": 1, "fieldname": "slide_3_subtitle", - "fieldtype": "Data", - "label": "Subtitle ", + "fieldtype": "Small Text", + "label": "Subtitle", "reqd": 0 }, { @@ -118,7 +166,7 @@ "__unsaved": 1, "fieldname": "slide_3_primary_action_label", "fieldtype": "Data", - "label": "Primary Action Label ", + "label": "Primary Action Label", "reqd": 0 }, { @@ -126,12 +174,156 @@ "__unsaved": 1, "fieldname": "slide_3_primary_action", "fieldtype": "Data", - "label": "Primary Action ", + "label": "Primary Action", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_content_align", + "fieldtype": "Select", + "label": "Content Align", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_theme", + "fieldtype": "Select", + "label": "Slide Theme", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4", + "fieldtype": "Section Break", + "label": "Slide 4", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_image", + "fieldtype": "Attach Image", + "label": "Image", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_title", + "fieldtype": "Data", + "label": "Title", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_subtitle", + "fieldtype": "Small Text", + "label": "Subtitle", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_primary_action_label", + "fieldtype": "Data", + "label": "Primary Action Label", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_primary_action", + "fieldtype": "Data", + "label": "Primary Action", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_content_align", + "fieldtype": "Select", + "label": "Content Align", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_theme", + "fieldtype": "Select", + "label": "Slide Theme", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5", + "fieldtype": "Section Break", + "label": "Slide 5", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_image", + "fieldtype": "Attach Image", + "label": "Image", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_title", + "fieldtype": "Data", + "label": "Title", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_subtitle", + "fieldtype": "Small Text", + "label": "Subtitle", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_primary_action_label", + "fieldtype": "Data", + "label": "Primary Action Label", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_primary_action", + "fieldtype": "Data", + "label": "Primary Action", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_content_align", + "fieldtype": "Select", + "label": "Content Align", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_theme", + "fieldtype": "Select", + "label": "Slide Theme", "reqd": 0 } ], "idx": 0, - "modified": "2020-11-17 15:23:48.584868", + "modified": "2020-11-18 17:09:31.323198", "modified_by": "Administrator", "module": "Shopping Cart", "name": "Hero Slider", From e40926b4cc3fb9c678fd901007cc84f6881b1f43 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 18 Nov 2020 17:10:02 +0530 Subject: [PATCH 095/414] fix: don't use primary action for create --- erpnext/stock/doctype/item/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 9e0941146a..2d5ab5ac69 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -81,7 +81,7 @@ frappe.ui.form.on("Item", { }, __('Create')); } - frm.page.set_inner_btn_group_as_primary(__('Create')); + // frm.page.set_inner_btn_group_as_primary(__('Create')); } if (frm.doc.variant_of) { frm.set_intro(__('This Item is a Variant of {0} (Template).', From b4946c31b40903899effa767878cc5e0ac55216b Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 18 Nov 2020 17:39:17 +0530 Subject: [PATCH 096/414] refactor: use h1 for slidetitle --- erpnext/shopping_cart/web_template/hero_slider/hero_slider.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html index e8b79743ab..3f0419e564 100644 --- a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html +++ b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html @@ -14,7 +14,7 @@ {%- if title or subtitle -%} {%- endmacro -%} -
+
{%- if title -%}

{{ title }}

{%- endif -%} @@ -37,17 +37,4 @@
diff --git a/erpnext/templates/generators/item/item.html b/erpnext/templates/generators/item/item.html index d3691a6e99..55c45e256a 100644 --- a/erpnext/templates/generators/item/item.html +++ b/erpnext/templates/generators/item/item.html @@ -7,17 +7,19 @@ {% endblock %} {% block page_content %} -{% from "erpnext/templates/includes/macros.html" import product_image %} -
-
-
- {% include "templates/generators/item/item_image.html" %} - {% include "templates/generators/item/item_details.html" %} +
+ {% from "erpnext/templates/includes/macros.html" import product_image %} +
+
+
+ {% include "templates/generators/item/item_image.html" %} + {% include "templates/generators/item/item_details.html" %} +
+ + {% include "templates/generators/item/item_specifications.html" %} + + {{ doc.website_content or '' }}
- - {% include "templates/generators/item/item_specifications.html" %} - - {{ doc.website_content or '' }}
{% endblock %} diff --git a/erpnext/templates/generators/item/item_add_to_cart.html b/erpnext/templates/generators/item/item_add_to_cart.html index dbf15de1e4..3210e2497f 100644 --- a/erpnext/templates/generators/item/item_add_to_cart.html +++ b/erpnext/templates/generators/item/item_add_to_cart.html @@ -6,10 +6,10 @@
{% if cart_settings.show_price and product_info.price %} -

+
{{ product_info.price.formatted_price_sales_uom }} - ({{ product_info.price.formatted_price }} / {{ product_info.uom }}) -

+ ({{ product_info.price.formatted_price }} / {{ product_info.uom }}) +
{% else %} {{ _("Unit of Measurement") }} : {{ product_info.uom }} {% endif %} @@ -17,11 +17,11 @@ {% if cart_settings.show_stock_availability %}
{% if product_info.in_stock == 0 %} - + {{ _('Not in stock') }} {% elif product_info.in_stock == 1 %} - + {{ _('In stock') }} {% if product_info.show_stock_qty and product_info.stock_qty %} ({{ product_info.stock_qty[0][0] }}) diff --git a/erpnext/templates/generators/item/item_details.html b/erpnext/templates/generators/item/item_details.html index 4cbecb0215..9a0bb5cfc3 100644 --- a/erpnext/templates/generators/item/item_details.html +++ b/erpnext/templates/generators/item/item_details.html @@ -1,14 +1,21 @@
-

+
{{ item_name }} -

-

+

+

{{ _("Item Code") }}: {{ doc.name }}

+{% if has_variants %} + + {% include "templates/generators/item/item_configure.html" %} +{% else %} + + {% include "templates/generators/item/item_add_to_cart.html" %} +{% endif %} -
+
{% if frappe.utils.strip_html(doc.web_long_description or '') %} {{ doc.web_long_description | safe }} {% elif frappe.utils.strip_html(doc.description or '') %} @@ -17,12 +24,4 @@ {{ _("No description given") }} {% endif %}
- -{% if has_variants %} - - {% include "templates/generators/item/item_configure.html" %} -{% else %} - - {% include "templates/generators/item/item_add_to_cart.html" %} -{% endif %}
diff --git a/erpnext/templates/generators/item/item_image.html b/erpnext/templates/generators/item/item_image.html index 5d46a45053..fa70ebe998 100644 --- a/erpnext/templates/generators/item/item_image.html +++ b/erpnext/templates/generators/item/item_image.html @@ -1,42 +1,42 @@ -
-{% if slides %} -{{ product_image(slides[0].image, 'product-image') }} -
- {% for item in slides %} - {{ item.heading }} - {% endfor %} -
- - -{% else %} -{{ product_image(website_image or image or 'no-image.jpg', alt=website_image_alt or item_name) }} -{% endif %} + $('.item-slideshow-image').removeClass('active'); + $img.addClass('active'); + }); + }) + + {% else %} + {{ product_image(website_image or image or 'no-image.jpg', alt=website_image_alt or item_name) }} + {% endif %} - + - +
{{ _("Sr") }} {{ _(tdf.label) }}
{{ d.idx }} -
{{ print_value(tdf, d, doc, visible_columns) }}
${__("Course")}${__("Date")}
${c.name}
${c.name} ${c.schedule_date}
{% if(s.assessment_details) { %} - {{s.assessment_details[c.assessment_criteria][1]}} + {{s.assessment_details[c.assessment_criteria][1]}} {% } %} - + diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index 73cc0b836e..96d265c989 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -328,7 +328,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend( frappe.msgprint({ message: __('Work Orders Created: {0}', [r.message.map(function(d) { - return repl('%(name)s', {name:d}) + return repl('%(name)s', {name:d}) }).join(', ')]), indicator: 'green' }) @@ -437,7 +437,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend( callback: function(r) { if(r.message) { frappe.msgprint(__('Material Request {0} submitted.', - ['' + r.message.name+ ''])); + ['' + r.message.name+ ''])); } d.hide(); me.frm.reload_doc(); diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 970d840665..288084d245 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -45,7 +45,7 @@ erpnext.PointOfSale.Controller = class { { fieldname: "opening_amount", fieldtype: "Currency", in_list_view: 1, label: "Opening Amount", - options: "company:company_currency", + options: "company:company_currency", change: function () { dialog.fields_dict.balance_details.df.data.some(d => { if (d.idx == this.doc.idx) { @@ -134,7 +134,7 @@ erpnext.PointOfSale.Controller = class { set_opening_entry_status() { this.page.set_title_sub( ` - + Opened at ${moment(this.pos_opening_time).format("Do MMMM, h:mma")} `); @@ -199,7 +199,7 @@ erpnext.PointOfSale.Controller = class { if (this.frm.doc.items.length == 0) { frappe.show_alert({ - message:__("You must add atleast one item to save it as draft."), + message:__("You must add atleast one item to save it as draft."), indicator:'red' }); frappe.utils.play_sound("error"); @@ -208,7 +208,7 @@ erpnext.PointOfSale.Controller = class { this.frm.save(undefined, undefined, undefined, () => { frappe.show_alert({ - message:__("There was an error saving the document."), + message:__("There was an error saving the document."), indicator:'red' }); frappe.utils.play_sound("error"); @@ -256,7 +256,7 @@ erpnext.PointOfSale.Controller = class { cart_item_clicked: (item_code, batch_no, uom) => { const item_row = this.frm.doc.items.find( - i => i.item_code === item_code + i => i.item_code === item_code && i.uom === uom && (!batch_no || (batch_no && i.batch_no === batch_no)) ); @@ -429,7 +429,7 @@ erpnext.PointOfSale.Controller = class { }) } - + toggle_recent_order_list(show) { this.toggle_components(!show); @@ -539,7 +539,7 @@ erpnext.PointOfSale.Controller = class { const qty_needed = field === 'qty' ? value * item_row.conversion_factor : item_row.qty * value; await this.check_stock_availability(item_row, qty_needed, this.frm.doc.set_warehouse); } - + if (this.is_current_item_being_edited(item_row) || item_selected_from_selector) { await frappe.model.set_value(item_row.doctype, item_row.name, field, value); this.update_cart_html(item_row); @@ -577,7 +577,7 @@ erpnext.PointOfSale.Controller = class { this.check_serial_batch_selection_needed(item_row) && this.edit_item_details_of(item_row); this.update_cart_html(item_row); - } + } } catch (error) { console.log(error); } finally { @@ -588,7 +588,7 @@ erpnext.PointOfSale.Controller = class { get_item_from_frm(item_code, batch_no, uom) { const has_batch_no = batch_no; return this.frm.doc.items.find( - i => i.item_code === item_code + i => i.item_code === item_code && (!has_batch_no || (has_batch_no && i.batch_no === batch_no)) && (i.uom === uom) ); @@ -617,7 +617,7 @@ erpnext.PointOfSale.Controller = class { const no_serial_selected = !item_row.serial_no; const no_batch_selected = !item_row.batch_no; - if ((serialized && no_serial_selected) || (batched && no_batch_selected) || + if ((serialized && no_serial_selected) || (batched && no_batch_selected) || (serialized && batched && (no_batch_selected || no_serial_selected))) { return true; } diff --git a/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html b/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html index 5808ce73ee..7166ba3786 100644 --- a/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html +++ b/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html @@ -21,7 +21,6 @@

{%= __("Next Steps") %}

diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js index 9bd03d45cb..faa9b5df2f 100644 --- a/erpnext/stock/dashboard/item_dashboard.js +++ b/erpnext/stock/dashboard/item_dashboard.js @@ -198,7 +198,7 @@ erpnext.stock.move_item = function(item, source, target, actual_qty, rate, callb freeze: true, callback: function(r) { frappe.show_alert(__('Stock Entry {0} created', - ['' + r.message.name+ ''])); + ['' + r.message.name+ ''])); dialog.hide(); callback(r); }, diff --git a/erpnext/stock/doctype/batch/batch.js b/erpnext/stock/doctype/batch/batch.js index 71a3e7abca..7b2edff7e0 100644 --- a/erpnext/stock/doctype/batch/batch.js +++ b/erpnext/stock/doctype/batch/batch.js @@ -102,7 +102,7 @@ frappe.ui.form.on('Batch', { }, callback: (r) => { frappe.show_alert(__('Stock Entry {0} created', - ['' + r.message.name+ ''])); + ['' + r.message.name+ ''])); frm.refresh(); }, }); diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index faf4accc73..43e18d16fc 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -85,7 +85,7 @@ frappe.ui.form.on("Item", { } if (frm.doc.variant_of) { frm.set_intro(__('This Item is a Variant of {0} (Template).', - [`${frm.doc.variant_of}`]), true); + [`${frm.doc.variant_of}`]), true); } if (frappe.defaults.get_default("item_naming_by")!="Naming Series" || frm.doc.variant_of) { @@ -649,7 +649,7 @@ $.extend(erpnext.item, { if (r.message) { var variant = r.message; frappe.msgprint_dialog = frappe.msgprint(__("Item Variant {0} already exists with same attributes", - [repl('%(item)s', { + [repl('%(item)s', { item_encoded: encodeURIComponent(variant), item: variant })] diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 3b62c38b86..1993d56a6c 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -860,7 +860,7 @@ class Item(WebsiteGenerator): rows = '' for docname, attr_list in not_included.items(): - link = "{0}".format(frappe.bold(_(docname))) + link = "{0}".format(frappe.bold(_(docname))) rows += table_row(link, body(attr_list)) error_description = _('The following deleted attributes exist in Variants but not in the Template. You can either delete the Variants or keep the attribute(s) in template.') diff --git a/erpnext/stock/doctype/item_price/item_price.js b/erpnext/stock/doctype/item_price/item_price.js index 2729f4b15e..773fddcf96 100644 --- a/erpnext/stock/doctype/item_price/item_price.js +++ b/erpnext/stock/doctype/item_price/item_price.js @@ -14,6 +14,6 @@ frappe.ui.form.on("Item Price", { frm.add_fetch("item_code", "stock_uom", "uom"); frm.set_df_property("bulk_import_help", "options", - '' + __("Import in Bulk") + ''); + '' + __("Import in Bulk") + ''); } }); diff --git a/erpnext/support/doctype/issue/issue.js b/erpnext/support/doctype/issue/issue.js index 940b940aba..e58ac22d0b 100644 --- a/erpnext/support/doctype/issue/issue.js +++ b/erpnext/support/doctype/issue/issue.js @@ -184,7 +184,7 @@ frappe.ui.form.on("Issue", { let url = window.location.href let arr = url.split("/"); let result = arr[0] + "//" + arr[2] - frappe.msgprint(`New issue created: ${r.message}`) + frappe.msgprint(`New issue created: ${r.message}`) frm.reload_doc(); dialog.hide(); }); diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py index 62b39cced5..e4e7b2543b 100644 --- a/erpnext/support/doctype/issue/issue.py +++ b/erpnext/support/doctype/issue/issue.py @@ -207,7 +207,7 @@ class Issue(Document): "comment_type": "Info", "reference_doctype": "Issue", "reference_name": replicated_issue.name, - "content": " - Split the Issue from {1}".format(self.name, frappe.bold(self.name)), + "content": " - Split the Issue from {1}".format(self.name, frappe.bold(self.name)), }).insert(ignore_permissions=True) return replicated_issue.name diff --git a/erpnext/utilities/bot.py b/erpnext/utilities/bot.py index 0e5e95d1a8..b2e74da921 100644 --- a/erpnext/utilities/bot.py +++ b/erpnext/utilities/bot.py @@ -26,12 +26,12 @@ class FindItemBot(BotParser): for warehouse in warehouses: qty = frappe.db.get_value("Bin", {'item_code': item[0], 'warehouse': warehouse.name}, 'actual_qty') if qty: - out.append(_('{0} units of [{1}](#Form/Item/{1}) found in [{2}](#Form/Warehouse/{2})').format(qty, + out.append(_('{0} units of [{1}](/app/Form/Item/{1}) found in [{2}](/app/Form/Warehouse/{2})').format(qty, item[0], warehouse.name)) found = True if not found: - out.append(_('[{0}](#Form/Item/{0}) is out of stock').format(item[0])) + out.append(_('[{0}](/app/Form/Item/{0}) is out of stock').format(item[0])) return "\n\n".join(out) From 8cf3bdd044aa26559ee6e7c4c9a10a5ac86a258f Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 18 Nov 2020 17:09:45 +0530 Subject: [PATCH 036/414] feat: add slider template --- .../web_template/hero_slider/hero_slider.html | 112 +++++++++ .../web_template/hero_slider/hero_slider.json | 230 ++++++++++++++++-- 2 files changed, 323 insertions(+), 19 deletions(-) diff --git a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html index e69de29bb2..e8b79743ab 100644 --- a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html +++ b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html @@ -0,0 +1,112 @@ +{%- macro slide(image, title, subtitle, action, label, index, align="Left", theme="Dark") -%} +{%- set align_class = resolve_class({ + 'text-right': align == 'Right', + 'text-centre': align == 'Center', + 'text-left': align == 'Left', +}) -%} + +{%- set heading_class = resolve_class({ + 'text-white': theme == 'Dark', + '': theme == 'Light', +}) -%} + +{%- endmacro -%} + + + + + + \ No newline at end of file diff --git a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json index a8ce2cd3cb..496fc7995e 100644 --- a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json +++ b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.json @@ -5,35 +5,56 @@ "doctype": "Web Template", "fields": [ { - "__unsaved": 1, + "fieldname": "slider_name", + "fieldtype": "Data", + "label": "Slider Name", + "reqd": 1 + }, + { + "default": "1", + "fieldname": "show_indicators", + "fieldtype": "Check", + "label": "Show Indicators", + "reqd": 0 + }, + { + "default": "1", + "fieldname": "show_controls", + "fieldtype": "Check", + "label": "Show Controls", + "reqd": 0 + }, + { + "fieldname": "slide_1", + "fieldtype": "Section Break", + "label": "Slide 1", + "reqd": 0 + }, + { "fieldname": "slide_1_image", "fieldtype": "Attach Image", "label": "Image", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_1_title", "fieldtype": "Data", "label": "Title", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_1_subtitle", - "fieldtype": "Data", + "fieldtype": "Small Text", "label": "Subtitle", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_1_primary_action_label", "fieldtype": "Data", "label": "Primary Action Label", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_1_primary_action", "fieldtype": "Data", "label": "Primary Action", @@ -41,46 +62,73 @@ }, { "__unsaved": 1, + "fieldname": "slide_1_content_align", + "fieldtype": "Select", + "label": "Content Align", + "options": "Left\nCentre\nRight", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_1_theme", + "fieldtype": "Select", + "label": "Slide Theme", + "options": "Dark\nLight", + "reqd": 0 + }, + { "fieldname": "slide_2", "fieldtype": "Section Break", "label": "Slide 2", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_2_image", "fieldtype": "Attach Image", "label": "Image ", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_2_title", "fieldtype": "Data", "label": "Title ", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_2_subtitle", - "fieldtype": "Data", + "fieldtype": "Small Text", "label": "Subtitle ", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_2_primary_action_label", "fieldtype": "Data", "label": "Primary Action Label ", "reqd": 0 }, { - "__unsaved": 1, "fieldname": "slide_2_primary_action", "fieldtype": "Data", "label": "Primary Action ", "reqd": 0 }, + { + "__unsaved": 1, + "default": "Left", + "fieldname": "slide_2_content_align", + "fieldtype": "Select", + "label": "Content Align", + "options": "Left\nCentre\nRight", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "slide_2_theme", + "fieldtype": "Select", + "label": "Slide Theme", + "options": "Dark\nLight", + "reqd": 0 + }, { "__islocal": 1, "__unsaved": 1, @@ -94,7 +142,7 @@ "__unsaved": 1, "fieldname": "slide_3_image", "fieldtype": "Attach Image", - "label": "Image ", + "label": "Image", "reqd": 0 }, { @@ -102,15 +150,15 @@ "__unsaved": 1, "fieldname": "slide_3_title", "fieldtype": "Data", - "label": "Title ", + "label": "Title", "reqd": 0 }, { "__islocal": 1, "__unsaved": 1, "fieldname": "slide_3_subtitle", - "fieldtype": "Data", - "label": "Subtitle ", + "fieldtype": "Small Text", + "label": "Subtitle", "reqd": 0 }, { @@ -118,7 +166,7 @@ "__unsaved": 1, "fieldname": "slide_3_primary_action_label", "fieldtype": "Data", - "label": "Primary Action Label ", + "label": "Primary Action Label", "reqd": 0 }, { @@ -126,12 +174,156 @@ "__unsaved": 1, "fieldname": "slide_3_primary_action", "fieldtype": "Data", - "label": "Primary Action ", + "label": "Primary Action", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_content_align", + "fieldtype": "Select", + "label": "Content Align", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_3_theme", + "fieldtype": "Select", + "label": "Slide Theme", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4", + "fieldtype": "Section Break", + "label": "Slide 4", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_image", + "fieldtype": "Attach Image", + "label": "Image", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_title", + "fieldtype": "Data", + "label": "Title", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_subtitle", + "fieldtype": "Small Text", + "label": "Subtitle", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_primary_action_label", + "fieldtype": "Data", + "label": "Primary Action Label", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_primary_action", + "fieldtype": "Data", + "label": "Primary Action", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_content_align", + "fieldtype": "Select", + "label": "Content Align", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_4_theme", + "fieldtype": "Select", + "label": "Slide Theme", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5", + "fieldtype": "Section Break", + "label": "Slide 5", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_image", + "fieldtype": "Attach Image", + "label": "Image", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_title", + "fieldtype": "Data", + "label": "Title", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_subtitle", + "fieldtype": "Small Text", + "label": "Subtitle", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_primary_action_label", + "fieldtype": "Data", + "label": "Primary Action Label", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_primary_action", + "fieldtype": "Data", + "label": "Primary Action", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_content_align", + "fieldtype": "Select", + "label": "Content Align", + "reqd": 0 + }, + { + "__islocal": 1, + "__unsaved": 1, + "fieldname": "slide_5_theme", + "fieldtype": "Select", + "label": "Slide Theme", "reqd": 0 } ], "idx": 0, - "modified": "2020-11-17 15:23:48.584868", + "modified": "2020-11-18 17:09:31.323198", "modified_by": "Administrator", "module": "Shopping Cart", "name": "Hero Slider", From 3bec3cfef16f33945440b334a3fa98d851b73ed2 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 18 Nov 2020 17:10:02 +0530 Subject: [PATCH 037/414] fix: don't use primary action for create --- erpnext/stock/doctype/item/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index faf4accc73..8b8b70031c 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -81,7 +81,7 @@ frappe.ui.form.on("Item", { }, __('Create')); } - frm.page.set_inner_btn_group_as_primary(__('Create')); + // frm.page.set_inner_btn_group_as_primary(__('Create')); } if (frm.doc.variant_of) { frm.set_intro(__('This Item is a Variant of {0} (Template).', From ca3809831cb7f2d423f7289ed2df1f39bd24b03a Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 18 Nov 2020 17:39:17 +0530 Subject: [PATCH 038/414] refactor: use h1 for slidetitle --- erpnext/shopping_cart/web_template/hero_slider/hero_slider.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html index e8b79743ab..3f0419e564 100644 --- a/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html +++ b/erpnext/shopping_cart/web_template/hero_slider/hero_slider.html @@ -14,7 +14,7 @@ {%- if title or subtitle -%}
${__("Course")}${__("Date")}
${c.name}
${c.name} ${c.schedule_date}