From 6cfb60dc98e8c28dc46a113bf4a1f1c8fce2db5f Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Fri, 22 Jul 2016 19:05:48 +0530 Subject: [PATCH 1/8] Minor fixed for Schools --- erpnext/config/schools.py | 39 ++++++++++++++++--- .../doctype/student_batch/student_batch.json | 4 +- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/erpnext/config/schools.py b/erpnext/config/schools.py index ee1a8cbf1a..ad4372b88b 100644 --- a/erpnext/config/schools.py +++ b/erpnext/config/schools.py @@ -11,10 +11,24 @@ def get_data(): "type": "doctype", "name": "Student" }, + { + "type": "doctype", + "name": "Student Batch" + }, { "type": "doctype", "name": "Student Group" }, + { + "type": "doctype", + "name": "Student Group Creation Tool" + } + ] + }, + { + "label": _("Admission"), + "items": [ + { "type": "doctype", "name": "Student Applicant" @@ -26,10 +40,6 @@ def get_data(): { "type": "doctype", "name": "Program Enrollment Tool" - }, - { - "type": "doctype", - "name": "Student Group Creation Tool" } ] }, @@ -47,11 +57,11 @@ def get_data(): }, { "type": "doctype", - "name": "Scheduling Tool" + "name": "Examination" }, { "type": "doctype", - "name": "Examination" + "name": "Scheduling Tool" } ] }, @@ -78,6 +88,23 @@ def get_data(): } ] }, + { + "label": _("LMS"), + "items": [ + { + "type": "doctype", + "name": "Announcement" + }, + { + "type": "doctype", + "name": "Topic" + }, + { + "type": "doctype", + "name": "Discussion" + } + ] + }, { "label": _("Setup"), "items": [ diff --git a/erpnext/schools/doctype/student_batch/student_batch.json b/erpnext/schools/doctype/student_batch/student_batch.json index f153845986..a806ae32f7 100644 --- a/erpnext/schools/doctype/student_batch/student_batch.json +++ b/erpnext/schools/doctype/student_batch/student_batch.json @@ -126,7 +126,7 @@ "label": "Academic Term", "length": 0, "no_copy": 0, - "options": "Academic Year", + "options": "Academic Term", "permlevel": 0, "precision": "", "print_hide": 0, @@ -199,7 +199,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-07-22 05:31:12.683404", + "modified": "2016-07-22 09:19:51.141234", "modified_by": "Administrator", "module": "Schools", "name": "Student Batch", From 29517d0b8c7f0368b1fe34d5040c8ff31ac128ab Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 22 Jul 2016 13:25:33 +0530 Subject: [PATCH 2/8] [fix] purchase order dashboard --- .../purchase_order/purchase_order_dashboard.py | 16 ++++++++++++++-- .../doctype/material_request/material_request.js | 4 ++-- .../material_request_dashboard.py | 1 - 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py index 0812790350..61a9700eba 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py @@ -1,12 +1,24 @@ from frappe import _ data = { - 'docstatus': 1, 'fieldname': 'purchase_order', + 'internal_links': { + 'Material Request': ['items', 'material_request'], + 'Supplier Quotation': ['items', 'supplier_quotation'], + 'Project': ['project'], + }, 'transactions': [ { 'label': _('Related'), - 'items': ['Purchase Receipt', 'Purchase Invoice', 'Stock Entry'] + 'items': ['Purchase Receipt', 'Purchase Invoice'] + }, + { + 'label': _('Reference'), + 'items': ['Material Request', 'Supplier Quotation', 'Project'] + }, + { + 'label': _('Sub-contracting'), + 'items': ['Stock Entry'] }, ] } \ No newline at end of file diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index 62ae091162..28817cc25d 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -79,7 +79,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten // stop cur_frm.add_custom_button(__('Stop'), - cur_frm.cscript['Stop Material Request'], __("Status")); + cur_frm.cscript['Stop Material Request']); } } @@ -102,7 +102,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten if(doc.docstatus == 1 && doc.status == 'Stopped') cur_frm.add_custom_button(__('Re-open'), - cur_frm.cscript['Unstop Material Request'], __("Status")); + cur_frm.cscript['Unstop Material Request']); }, diff --git a/erpnext/stock/doctype/material_request/material_request_dashboard.py b/erpnext/stock/doctype/material_request/material_request_dashboard.py index da6790d1d7..8547df18c1 100644 --- a/erpnext/stock/doctype/material_request/material_request_dashboard.py +++ b/erpnext/stock/doctype/material_request/material_request_dashboard.py @@ -1,7 +1,6 @@ from frappe import _ data = { - 'docstatus': 1, 'fieldname': 'material_request', 'transactions': [ { From e7399dff2dfae73e0c4ebe8e9513f6e8de788fe8 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 22 Jul 2016 21:00:12 +0530 Subject: [PATCH 3/8] [fix] homepage patch --- .../hr/doctype/employment_type/employment_type.json | 12 ++++++++++-- erpnext/patches/v7_0/update_home_page.py | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/employment_type/employment_type.json b/erpnext/hr/doctype/employment_type/employment_type.json index 5bd58d4f13..3b9604dfd5 100644 --- a/erpnext/hr/doctype/employment_type/employment_type.json +++ b/erpnext/hr/doctype/employment_type/employment_type.json @@ -3,11 +3,13 @@ "allow_import": 1, "allow_rename": 1, "autoname": "field:employee_type_name", + "beta": 0, "creation": "2013-01-10 16:34:14", "custom": 0, "docstatus": 0, "doctype": "DocType", "document_type": "Setup", + "editable_grid": 0, "fields": [ { "allow_on_submit": 0, @@ -17,6 +19,7 @@ "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 1, "label": "Employment Type", @@ -26,6 +29,7 @@ "oldfieldtype": "Data", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 1, @@ -38,13 +42,14 @@ "hide_toolbar": 0, "icon": "icon-flag", "idx": 1, + "image_view": 0, "in_create": 0, "in_dialog": 0, "is_submittable": 0, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2015-11-16 06:29:46.733350", + "modified": "2016-07-22 05:34:43.238512", "modified_by": "Administrator", "module": "HR", "name": "Employment Type", @@ -91,6 +96,9 @@ "write": 1 } ], + "quick_entry": 1, "read_only": 0, - "read_only_onload": 0 + "read_only_onload": 0, + "sort_order": "DESC", + "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/patches/v7_0/update_home_page.py b/erpnext/patches/v7_0/update_home_page.py index 604d7d4671..7bc7a2e202 100644 --- a/erpnext/patches/v7_0/update_home_page.py +++ b/erpnext/patches/v7_0/update_home_page.py @@ -5,6 +5,8 @@ def execute(): frappe.reload_doc('portal', 'doctype', 'homepage_featured_product') frappe.reload_doc('portal', 'doctype', 'homepage') frappe.reload_doc('portal', 'doctype', 'products_settings') + frappe.reload_doctype('Item') + frappe.reload_doctype('Item Group') website_settings = frappe.get_doc('Website Settings', 'Website Settings') if frappe.db.exists('Web Page', website_settings.home_page): From 39c952a3f2058a494bf12ee806f25db6bb28da74 Mon Sep 17 00:00:00 2001 From: Kanchan Chauhan Date: Sat, 23 Jul 2016 14:39:01 +0530 Subject: [PATCH 4/8] [Minor Fix] --- erpnext/selling/doctype/quotation/quotation.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index f07bc8e535..c53c6b60f5 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -5,8 +5,7 @@ "autoname": "naming_series:", "beta": 0, "creation": "2013-05-24 19:29:08", - "custom": 0, - "default_print_format": "test123", + "custom": 0, "docstatus": 0, "doctype": "DocType", "document_type": "Document", From f027fd0c66acb8485ec017cf48b9c9f42448ba2b Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sun, 24 Jul 2016 00:38:10 +0530 Subject: [PATCH 5/8] [Fix] Timesheet patch --- erpnext/projects/doctype/timesheet/timesheet.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index 6881e0b80b..e882346435 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -91,9 +91,6 @@ class Timesheet(Document): frappe.throw(_("Row {0}: Completed Qty cannot be more than {0} for operation {1}").format(data.idx, pending_qty, self.operation), OverProductionLoggedError) - if data.billable and flt(data.billing_rate) == 0.0 and data.activity_type: - frappe.throw(_("Row {0}: Billing Rate must be greater than zero.").format(data.idx)) - def update_production_order(self, time_sheet): if self.production_order: pro = frappe.get_doc('Production Order', self.production_order) From 8e282c2ed82128858605b543096d92c0e3948040 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Sun, 24 Jul 2016 11:36:19 +0530 Subject: [PATCH 6/8] [mobile ui] fix pos payment layout #5780 --- erpnext/public/css/erpnext.css | 37 +++++++++++- erpnext/public/js/payment/payments.js | 1 - erpnext/public/js/payment/pos_payment.html | 68 ++++++++++------------ erpnext/public/less/erpnext.less | 40 ++++++++++++- 4 files changed, 106 insertions(+), 40 deletions(-) diff --git a/erpnext/public/css/erpnext.css b/erpnext/public/css/erpnext.css index 9a015c2fc2..b8d51c02bd 100644 --- a/erpnext/public/css/erpnext.css +++ b/erpnext/public/css/erpnext.css @@ -127,8 +127,9 @@ .dashboard-list-item:last-child { border-bottom: none; } -.payment-toolbar { - margin-left: 35px; +.payment-toolbar .row { + width: 323px; + margin: 0 auto; } .payment-mode { cursor: pointer; @@ -159,6 +160,38 @@ background-color: #FDFDFD; border-color: #e8e8e8; } +.multimode-payments { + padding-left: 30px; +} +.payment-toolbar { + padding-right: 30px; +} +body[data-route="pos"] .modal-dialog { + width: 750px; +} +@media (max-width: 767px) { + body[data-route="pos"] .modal-dialog { + width: auto; + } + body[data-route="pos"] .modal-dialog .modal-content { + height: auto; + } +} +@media (max-width: 767px) { + .amount-row h3 { + font-size: 15px; + } + .pos-keyboard-key, + .delete-btn { + height: 50px; + } + .multimode-payments { + padding-left: 15px; + } + .payment-toolbar { + padding-right: 15px; + } +} .amount-label { font-size: 16px; } diff --git a/erpnext/public/js/payment/payments.js b/erpnext/public/js/payment/payments.js index 90766e9eb6..0638b84ffa 100644 --- a/erpnext/public/js/payment/payments.js +++ b/erpnext/public/js/payment/payments.js @@ -11,7 +11,6 @@ erpnext.payments = erpnext.stock.StockController.extend({ this.dialog.show(); this.$body = this.dialog.body; - this.dialog.$wrapper.find('.modal-dialog').css("width", "750px"); this.set_payment_primary_action(); this.make_keyboard(); }, diff --git a/erpnext/public/js/payment/pos_payment.html b/erpnext/public/js/payment/pos_payment.html index 223850c504..c5d963aa85 100644 --- a/erpnext/public/js/payment/pos_payment.html +++ b/erpnext/public/js/payment/pos_payment.html @@ -1,40 +1,36 @@
-
-
-
-

Total

{%= format_currency(grand_total, currency) %}

-
-
-

Paid

-
-
-
-
-
-
-
-
-
-

Outstanding

{%= format_currency(outstanding_amount, currency) %}

-
-
-

Change

{%= format_currency(change_amount, currency) %}

-
-
-
-
- {% for(var i=0; i<3; i++) { %} -
- {% for(var j=i*3; j<(i+1)*3; j++) { %} - - {% } %} -
- {% } %} +
+
+

Total

{%= format_currency(grand_total, currency) %}

+
+
+

Paid

+
+
+

Outstanding

{%= format_currency(outstanding_amount, currency) %}

+
+
+

Change

{%= format_currency(change_amount, currency) %}

+

+
+
+
+
+
+
+
+ {% for(var i=0; i<3; i++) { %}
- - - + {% for(var j=i*3; j<(i+1)*3; j++) { %} + + {% } %}
-
-
+ {% } %} +
+ + + +
+
+
diff --git a/erpnext/public/less/erpnext.less b/erpnext/public/less/erpnext.less index 404540a3d9..896aee79d9 100644 --- a/erpnext/public/less/erpnext.less +++ b/erpnext/public/less/erpnext.less @@ -162,7 +162,10 @@ } .payment-toolbar { - margin-left: 35px; + .row { + width: 323px; + margin: 0 auto; + } } .payment-mode { @@ -197,6 +200,41 @@ border-color: #e8e8e8; } +.multimode-payments { + padding-left: 30px; +} + +.payment-toolbar { + padding-right: 30px; +} + +body[data-route="pos"] .modal-dialog { + width: 750px; + + @media (max-width: @screen-xs) { + width: auto; + + .modal-content { + height: auto; + } + } +} + +@media (max-width: @screen-xs) { + .amount-row h3 { + font-size: 15px; + } + .pos-keyboard-key, .delete-btn { + height: 50px; + } + .multimode-payments { + padding-left: 15px; + } + .payment-toolbar { + padding-right: 15px; + } +} + .amount-label { font-size: 16px; } From cd385c37350cd4f3fc059d94116eb856f05b6b2d Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Sun, 24 Jul 2016 13:06:08 +0530 Subject: [PATCH 7/8] [fix] [minor] email pulling error, via scheduler log --- erpnext/crm/doctype/opportunity/opportunity.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 1e57878df6..79788822a6 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -43,15 +43,15 @@ class Opportunity(TransactionBase): def make_new_lead_if_required(self): """Set lead against new opportunity""" - if not (self.lead or self.customer): + if not (self.lead or self.customer) and self.contact_email: lead_name = frappe.db.get_value("Lead", {"email_id": self.contact_email}) if not lead_name: sender_name = get_fullname(self.contact_email) if sender_name == self.contact_email: sender_name = None - if not sender_name and self.contact_email.index('@'): - email_name = self.contact_email[0:self.contact_email.index('@')] + if not sender_name and ('@' in self.contact_email): + email_name = self.contact_email.split('@')[0] email_split = email_name.split('.') sender_name = '' From 581a12c56a6e111c7e620156c7df28ec6d17cf8c Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Sun, 24 Jul 2016 17:47:43 +0600 Subject: [PATCH 8/8] bumped to version 7.0.1 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index f356bbcbb3..a7f0787ba6 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import frappe -__version__ = '7.0.0' +__version__ = '7.0.1' def get_default_company(user=None): '''Get default company for user'''