Merge branch 'develop'
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index f356bbc..a7f0787 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'''
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py
index 0812790..61a9700 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/config/schools.py b/erpnext/config/schools.py
index ee1a8cb..ad4372b 100644
--- a/erpnext/config/schools.py
+++ b/erpnext/config/schools.py
@@ -13,10 +13,24 @@
},
{
"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 @@
{
"type": "doctype",
"name": "Program Enrollment Tool"
- },
- {
- "type": "doctype",
- "name": "Student Group Creation Tool"
}
]
},
@@ -47,11 +57,11 @@
},
{
"type": "doctype",
- "name": "Scheduling Tool"
+ "name": "Examination"
},
{
"type": "doctype",
- "name": "Examination"
+ "name": "Scheduling Tool"
}
]
},
@@ -79,6 +89,23 @@
]
},
{
+ "label": _("LMS"),
+ "items": [
+ {
+ "type": "doctype",
+ "name": "Announcement"
+ },
+ {
+ "type": "doctype",
+ "name": "Topic"
+ },
+ {
+ "type": "doctype",
+ "name": "Discussion"
+ }
+ ]
+ },
+ {
"label": _("Setup"),
"items": [
{
diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py
index 1e57878..7978882 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.py
+++ b/erpnext/crm/doctype/opportunity/opportunity.py
@@ -43,15 +43,15 @@
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 = ''
diff --git a/erpnext/hr/doctype/employment_type/employment_type.json b/erpnext/hr/doctype/employment_type/employment_type.json
index 5bd58d4..3b9604d 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 604d7d4..7bc7a2e 100644
--- a/erpnext/patches/v7_0/update_home_page.py
+++ b/erpnext/patches/v7_0/update_home_page.py
@@ -5,6 +5,8 @@
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):
diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py
index 6881e0b..e882346 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.py
+++ b/erpnext/projects/doctype/timesheet/timesheet.py
@@ -91,9 +91,6 @@
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)
diff --git a/erpnext/public/css/erpnext.css b/erpnext/public/css/erpnext.css
index 9a015c2..b8d51c0 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 90766e9..0638b84 100644
--- a/erpnext/public/js/payment/payments.js
+++ b/erpnext/public/js/payment/payments.js
@@ -11,7 +11,6 @@
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 223850c..c5d963a 100644
--- a/erpnext/public/js/payment/pos_payment.html
+++ b/erpnext/public/js/payment/pos_payment.html
@@ -1,40 +1,36 @@
<div class="pos_payment row">
- <div class="col-sm-6">
- <div class="row">
- <div class="col-xs-6 text-center">
- <p class="amount-label"> Total <h3>{%= format_currency(grand_total, currency) %} </h3></p>
- </div>
- <div class="col-xs-6 text-center">
- <p class="amount-label"> Paid <h3 class="paid_amount">{%= format_currency(paid_amount, currency) %}</h3></p>
- </div>
- </div>
- <hr>
- <div class="multimode-payments">
- </div>
- </div>
- <div class="col-sm-6">
- <div class="row">
- <div class="col-xs-6 text-center">
- <p class="amount-label"> Outstanding <h3 class="outstanding_amount">{%= format_currency(outstanding_amount, currency) %} </h3></p>
- </div>
- <div class="col-xs-6 text-center">
- <p class="amount-label"> Change <h3 class="change_amount">{%= format_currency(change_amount, currency) %}</h3></p>
- </div>
- </div>
- <hr>
- <div class="payment-toolbar">
- {% for(var i=0; i<3; i++) { %}
- <div class="row">
- {% for(var j=i*3; j<(i+1)*3; j++) { %}
- <button type="button" class="btn btn-default pos-keyboard-key">{{j+1}}</button>
- {% } %}
- </div>
- {% } %}
+ <div class="row amount-row">
+ <div class="col-xs-6 col-sm-3 text-center">
+ <p class="amount-label"> Total <h3>{%= format_currency(grand_total, currency) %} </h3></p>
+ </div>
+ <div class="col-xs-6 col-sm-3 text-center">
+ <p class="amount-label"> Paid <h3 class="paid_amount">{%= format_currency(paid_amount, currency) %}</h3></p>
+ </div>
+ <div class="col-xs-6 col-sm-3 text-center">
+ <p class="amount-label"> Outstanding <h3 class="outstanding_amount">{%= format_currency(outstanding_amount, currency) %} </h3></p>
+ </div>
+ <div class="col-xs-6 col-sm-3 text-center">
+ <p class="amount-label"> Change <h3 class="change_amount">{%= format_currency(change_amount, currency) %}</h3>
+ </p>
+ </div>
+ </div>
+ <hr>
+ <div class="row">
+ <div class="col-sm-6 multimode-payments">
+ </div>
+ <div class="col-sm-6 payment-toolbar">
+ {% for(var i=0; i<3; i++) { %}
<div class="row">
- <button type="button" class="btn btn-default delete-btn">Del</button>
- <button type="button" class="btn btn-default pos-keyboard-key">0</button>
- <button type="button" class="btn btn-default pos-keyboard-key">.</button>
+ {% for(var j=i*3; j<(i+1)*3; j++) { %}
+ <button type="button" class="btn btn-default pos-keyboard-key">{{j+1}}</button>
+ {% } %}
</div>
- </div>
- </div>
+ {% } %}
+ <div class="row">
+ <button type="button" class="btn btn-default delete-btn">Del</button>
+ <button type="button" class="btn btn-default pos-keyboard-key">0</button>
+ <button type="button" class="btn btn-default pos-keyboard-key">.</button>
+ </div>
+ </div>
+ </div>
</div>
diff --git a/erpnext/public/less/erpnext.less b/erpnext/public/less/erpnext.less
index 404540a..896aee7 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;
}
diff --git a/erpnext/schools/doctype/student_batch/student_batch.json b/erpnext/schools/doctype/student_batch/student_batch.json
index f153845..a806ae3 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",
diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json
index f07bc8e..c53c6b6 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",
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index 62ae091..28817cc 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -79,7 +79,7 @@
// stop
cur_frm.add_custom_button(__('Stop'),
- cur_frm.cscript['Stop Material Request'], __("Status"));
+ cur_frm.cscript['Stop Material Request']);
}
}
@@ -102,7 +102,7 @@
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 da6790d..8547df1 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': [
{