Merge branch 'develop'

This commit is contained in:
Rushabh Mehta 2016-03-21 15:45:22 +05:30
commit dda0906458
66 changed files with 21391 additions and 19887 deletions

View File

@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '6.27.1'
__version__ = '6.27.2'

View File

@ -43,6 +43,10 @@ def get_data(filters, conditions):
inc, cond= '',''
query_details = conditions["based_on_select"] + conditions["period_wise_select"]
posting_date = 't1.transaction_date'
if conditions.get('trans') in ['Sales Invoice', 'Purchase Invoice', 'Purchase Receipt', 'Delivery Note']:
posting_date = 't1.posting_date'
if conditions["based_on_select"] in ["t1.project,", "t2.project,"]:
cond = 'and '+ conditions["based_on_select"][:-1] +' IS Not NULL'
@ -65,11 +69,11 @@ def get_data(filters, conditions):
else :
inc = 1
data1 = frappe.db.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and t1.posting_date >= %s and %s >= t1.posting_date and
where t2.parent = t1.name and t1.company = %s and %s between %s and %s and
t1.docstatus = 1 %s %s
group by %s
""" % (query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"], "%s",
"%s", "%s", conditions.get("addl_tables_relational_cond"), cond, conditions["group_by"]), (filters.get("company"),
posting_date, "%s", "%s", conditions.get("addl_tables_relational_cond"), cond, conditions["group_by"]), (filters.get("company"),
year_start_date, year_end_date),as_list=1)
for d in range(len(data1)):
@ -80,11 +84,11 @@ def get_data(filters, conditions):
#to get distinct value of col specified by group_by in filter
row = frappe.db.sql("""select DISTINCT(%s) from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and t1.posting_date >= %s and %s >= t1.posting_date
where t2.parent = t1.name and t1.company = %s and %s between %s and %s
and t1.docstatus = 1 and %s = %s %s
""" %
(sel_col, conditions["trans"], conditions["trans"], conditions["addl_tables"],
"%s", "%s", "%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
"%s", posting_date, "%s", "%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
(filters.get("company"), year_start_date, year_end_date, data1[d][0]), as_list=1)
for i in range(len(row)):
@ -92,11 +96,11 @@ def get_data(filters, conditions):
#get data for group_by filter
row1 = frappe.db.sql(""" select %s , %s from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and t1.posting_date >= %s and %s >= t1.posting_date
where t2.parent = t1.name and t1.company = %s and %s between %s and %s
and t1.docstatus = 1 and %s = %s and %s = %s %s
""" %
(sel_col, conditions["period_wise_select"], conditions["trans"],
conditions["trans"], conditions["addl_tables"], "%s", "%s","%s", sel_col,
conditions["trans"], conditions["addl_tables"], "%s", posting_date, "%s","%s", sel_col,
"%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
(filters.get("company"), year_start_date, year_end_date, row[i][0],
data1[d][0]), as_list=1)
@ -109,12 +113,12 @@ def get_data(filters, conditions):
data.append(des)
else:
data = frappe.db.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and t1.posting_date >= %s and %s >= t1.posting_date and
where t2.parent = t1.name and t1.company = %s and %s between %s and %s and
t1.docstatus = 1 %s %s
group by %s
""" %
(query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"],
"%s", "%s", "%s", cond, conditions.get("addl_tables_relational_cond", ""), conditions["group_by"]),
"%s", posting_date, "%s", "%s", cond, conditions.get("addl_tables_relational_cond", ""), conditions["group_by"]),
(filters.get("company"), year_start_date, year_end_date), as_list=1)
return data

View File

@ -1,6 +1,6 @@
#Allow Over Delivery/Billing
While creating Delivery Note, system validates if item's Qty mentined is same as in the Sales Order. It Item Qty has been increased, you will get over-delivery validation. If you want to be able to deliver more items than mentioned in the Sales Order, you should update "Allow over delivery or receipt upto this percent" in the Item master.
While creating Delivery Note, system validates if item's Qty mentined is same as in the Sales Order. If Item Qty has been increased, you will get over-delivery validation. If you want to be able to deliver more items than mentioned in the Sales Order, you should update "Allow over delivery or receipt upto this percent" in the Item master.
<img alt="Item wise Allowance percentage" class="screenshot" src="{{docs_base_url}}/assets/img/articles/allowance-percentage-1.png">
@ -19,4 +19,4 @@ Update global value for "Allow over delivery or receipt upto this percent" from
<img alt="Item wise Allowance percentage" class="screenshot" src="{{docs_base_url}}/assets/img/articles/allowance-percentage-2.png">
<!-- markdown -->
<!-- markdown -->

View File

@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd."
app_description = """ERP made simple"""
app_icon = "icon-th"
app_color = "#e74c3c"
app_version = "6.27.1"
app_version = "6.27.2"
app_email = "info@erpnext.com"
app_license = "GNU General Public License (v3)"
source_link = "https://github.com/frappe/erpnext"

View File

@ -2,8 +2,9 @@ frappe.ui.form.on("Employee Attendance Tool", {
refresh: function(frm) {
frm.disable_save();
},
onload: function(frm) {
frm.set_value("date", get_today());
erpnext.employee_attendance_tool.load_employees(frm);
},
@ -22,8 +23,7 @@ frappe.ui.form.on("Employee Attendance Tool", {
company: function(frm) {
erpnext.employee_attendance_tool.load_employees(frm);
}
});

View File

@ -256,4 +256,5 @@ erpnext.patches.v6_24.set_recurring_id
erpnext.patches.v6_20x.set_compact_print
execute:frappe.delete_doc_if_exists("Web Form", "contact") #2016-03-10
erpnext.patches.v6_20x.remove_fiscal_year_from_holiday_list
erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po
erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po
erpnext.patches.v6_27.fix_recurring_order_status

View File

@ -3,4 +3,4 @@ import erpnext.setup.install
def execute():
frappe.reload_doc("website", "doctype", "web_form_field", force=True)
erpnext.setup.install.add_web_forms()
#erpnext.setup.install.add_web_forms()

View File

@ -0,0 +1 @@
from __future__ import unicode_literals

View File

@ -0,0 +1,51 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
for doc in (
{
"doctype": "Sales Order",
"stock_doctype": "Delivery Note",
"invoice_doctype": "Sales Invoice",
"stock_doctype_ref_field": "against_sales_order",
"invoice_ref_field": "sales_order"
},
{
"doctype": "Purchase Order",
"stock_doctype": "Purchase Receipt",
"invoice_doctype": "Purchase Invoice",
"stock_doctype_ref_field": "prevdoc_docname",
"invoice_ref_field": "purchase_order"
}):
order_list = frappe.db.sql("""select name from `tab{0}`
where docstatus=1 and is_recurring=1
and ifnull(recurring_id, '') != name and creation >= '2016-01-25'"""
.format(doc["doctype"]), as_dict=1)
for order in order_list:
frappe.db.sql("""update `tab{0} Item`
set delivered_qty=0, billed_amt=0 where parent=%s""".format(doc["doctype"]), order.name)
# Check against Delivery Note and Purchase Receipt
stock_doc_list = frappe.db.sql("""select distinct parent from `tab{0} Item`
where docstatus=1 and ifnull({1}, '')=%s"""
.format(doc["stock_doctype"], doc["stock_doctype_ref_field"]), order.name)
if stock_doc_list:
for dn in stock_doc_list:
frappe.get_doc(doc["stock_doctype"], dn[0]).update_qty(update_modified=False)
# Check against Invoice
invoice_list = frappe.db.sql("""select distinct parent from `tab{0} Item`
where docstatus=1 and ifnull({1}, '')=%s"""
.format(doc["invoice_doctype"], doc["invoice_ref_field"]), order.name)
if invoice_list:
for dn in invoice_list:
frappe.get_doc(doc["invoice_doctype"], dn[0]).update_qty(update_modified=False)
frappe.get_doc(doc["doctype"], order.name).set_status(update=True, update_modified=False)

View File

@ -1,9 +1,13 @@
import frappe
def execute():
frappe.reload_doctype("Web Form")
frappe.delete_doc("Web Form", "Issues")
frappe.delete_doc("Web Form", "Addresses")
pass
from erpnext.setup.install import add_web_forms
add_web_forms()
# done via fixtures
# frappe.reload_doctype("Web Form")
# frappe.delete_doc("Web Form", "Issues")
# frappe.delete_doc("Web Form", "Addresses")
# from erpnext.setup.install import add_web_forms
# add_web_forms()

View File

@ -841,11 +841,11 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
return;
}
if(!this.frm.doc.recurring_id) {
this.frm.set_value('recurring_id', this.frm.doc.name);
}
if(this.frm.doc.is_recurring) {
if(!this.frm.doc.recurring_id) {
this.frm.set_value('recurring_id', this.frm.doc.name);
}
var owner_email = this.frm.doc.owner=="Administrator"
? frappe.user_info("Administrator").email
: this.frm.doc.owner;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
from setuptools import setup, find_packages
from pip.req import parse_requirements
version = "6.27.1"
version = "6.27.2"
requirements = parse_requirements("requirements.txt", session="")
setup(