Merge branch 'develop'
This commit is contained in:
commit
b75f5fd5ab
@ -1,2 +1,2 @@
|
||||
from __future__ import unicode_literals
|
||||
__version__ = '5.4.0'
|
||||
__version__ = '5.4.1'
|
||||
|
||||
@ -27,7 +27,7 @@ blogs.
|
||||
"""
|
||||
app_icon = "icon-th"
|
||||
app_color = "#e74c3c"
|
||||
app_version = "5.4.0"
|
||||
app_version = "5.4.1"
|
||||
github_link = "https://github.com/frappe/erpnext"
|
||||
|
||||
error_report_email = "support@erpnext.com"
|
||||
|
||||
@ -239,14 +239,15 @@ def get_total_leave_days(leave_app):
|
||||
if not leave_app.half_day:
|
||||
tot_days = date_diff(leave_app.to_date, leave_app.from_date) + 1
|
||||
if frappe.db.get_value("Leave Type", leave_app.leave_type, "include_holiday"):
|
||||
ret = {
|
||||
'total_leave_days' : flt(tot_days)
|
||||
}
|
||||
else:
|
||||
holidays = leave_app.get_holidays()
|
||||
ret = {
|
||||
'total_leave_days' : flt(tot_days)-flt(holidays)
|
||||
}
|
||||
else:
|
||||
ret = {
|
||||
'total_leave_days' : flt(tot_days)
|
||||
}
|
||||
|
||||
return ret
|
||||
|
||||
@frappe.whitelist()
|
||||
|
||||
@ -180,6 +180,7 @@ execute:frappe.rename_doc("DocType", "Salary Manager", "Process Payroll", force=
|
||||
erpnext.patches.v5_1.rename_roles
|
||||
erpnext.patches.v5_1.default_bom
|
||||
execute:frappe.delete_doc("DocType", "Party Type")
|
||||
erpnext.patches.v5_4.fix_reserved_qty_and_sle_for_packed_items
|
||||
execute:frappe.delete_doc("Module Def", "Contacts")
|
||||
erpnext.patches.v5_4.fix_reserved_qty_and_sle_for_packed_items # 30-07-2015
|
||||
execute:frappe.reload_doctype("Leave Type")
|
||||
execute:frappe.db.sql("update `tabLeave Type` set include_holiday=1")
|
||||
execute:frappe.db.sql("update `tabLeave Type` set include_holiday=0")
|
||||
@ -10,15 +10,19 @@ def execute():
|
||||
where docstatus = 2 and ifnull(update_stock, 0) = 1""")
|
||||
|
||||
if cancelled_invoices:
|
||||
repost_for = frappe.db.sql("""select distinct item_code, warehouse from `tabStock Ledger Entry`
|
||||
where voucher_type = 'Sales Invoice' and voucher_no in (%s)"""
|
||||
% (', '.join(['%s']*len(cancelled_invoices))), tuple(cancelled_invoices))
|
||||
|
||||
frappe.db.sql("""delete from `tabStock Ledger Entry`
|
||||
where voucher_type = 'Sales Invoice' and voucher_no in (%s)"""
|
||||
% (', '.join(['%s']*len(cancelled_invoices))), tuple(cancelled_invoices))
|
||||
|
||||
for item_code, warehouse in frappe.db.sql("select item_code, warehouse from tabBin where ifnull(reserved_qty, 0) < 0"):
|
||||
|
||||
for item_code, warehouse in repost_for:
|
||||
repost_actual_qty(item_code, warehouse)
|
||||
|
||||
for item_code, warehouse in frappe.db.sql("""select distinct item_code, warehouse
|
||||
from `tabPacked Item` where parenttype = 'Sales Invoice' and docstatus = 1"""):
|
||||
update_bin_qty(item_code, warehouse, {
|
||||
"reserved_qty": get_reserved_qty(item_code, warehouse)
|
||||
})
|
||||
|
||||
@ -174,8 +174,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"default": "",
|
||||
@ -187,8 +186,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"default": "",
|
||||
@ -202,8 +200,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"depends_on": "has_serial_no",
|
||||
@ -225,8 +222,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"depends_on": "is_stock_item",
|
||||
@ -449,8 +445,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"depends_on": "is_purchase_item",
|
||||
@ -594,8 +589,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"default": "",
|
||||
@ -609,8 +603,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
@ -720,8 +713,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"depends_on": "inspection_required",
|
||||
@ -755,8 +747,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"default": "",
|
||||
@ -768,8 +759,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_74",
|
||||
@ -935,7 +925,7 @@
|
||||
"icon": "icon-tag",
|
||||
"idx": 1,
|
||||
"max_attachments": 1,
|
||||
"modified": "2015-07-24 06:04:28.448050",
|
||||
"modified": "2015-07-30 06:04:28.448050",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Item",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user