Merge branch 'hotfix'

This commit is contained in:
Nabin Hait 2016-08-18 16:15:49 +05:30
commit e4fb7b1b2f
7 changed files with 30 additions and 21 deletions

View File

@ -2,7 +2,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
__version__ = '7.0.30' __version__ = '7.0.31'
def get_default_company(user=None): def get_default_company(user=None):
'''Get default company for user''' '''Get default company for user'''

View File

@ -8,6 +8,7 @@
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "", "document_type": "",
"editable_grid": 1,
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
@ -65,24 +66,24 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"fieldname": "monthly_distribution", "fieldname": "company",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Monthly Distribution", "label": "Company",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"options": "Monthly Distribution", "options": "Company",
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 1,
"search_index": 0, "search_index": 0,
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
@ -170,24 +171,25 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"fieldname": "company", "depends_on": "eval:in_list([\"Stop\", \"Warn\"], doc.action_if_accumulated_monthly_budget_exceeded)",
"fieldname": "monthly_distribution",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Company", "label": "Monthly Distribution",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"options": "Company", "options": "Monthly Distribution",
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
@ -271,13 +273,14 @@
"hide_heading": 0, "hide_heading": 0,
"hide_toolbar": 0, "hide_toolbar": 0,
"idx": 0, "idx": 0,
"image_view": 0,
"in_create": 0, "in_create": 0,
"in_dialog": 0, "in_dialog": 0,
"is_submittable": 1, "is_submittable": 1,
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2016-05-16 15:00:40.233685", "modified": "2016-08-18 14:46:02.653081",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Budget", "name": "Budget",

View File

@ -77,9 +77,10 @@ def validate_expense_against_budget(args):
compare_expense_with_budget(args, budget.cost_center, compare_expense_with_budget(args, budget.cost_center,
budget_amount, _("Accumulated Monthly"), monthly_action) budget_amount, _("Accumulated Monthly"), monthly_action)
elif yearly_action in ["Stop", "Warn"]: if yearly_action in ("Stop", "Warn") and monthly_action != "Stop" \
compare_expense_with_budget(args, budget.cost_center, and yearly_action != monthly_action:
flt(budget.budget_amount), _("Annual"), yearly_action) compare_expense_with_budget(args, budget.cost_center,
flt(budget.budget_amount), _("Annual"), yearly_action)
def compare_expense_with_budget(args, cost_center, budget_amount, action_for, action): def compare_expense_with_budget(args, cost_center, budget_amount, action_for, action):
actual_expense = get_actual_expense(args, cost_center) actual_expense = get_actual_expense(args, cost_center)

View File

@ -66,7 +66,8 @@ class ReceivablePayableReport(object):
columns.append({ columns.append({
"fieldname": "currency", "fieldname": "currency",
"label": _("Currency"), "label": _("Currency"),
"fieldtype": "Data", "fieldtype": "Link",
"options": "Currency",
"width": 100 "width": 100
}) })
if args.get("party_type") == "Customer": if args.get("party_type") == "Customer":

View File

@ -34,7 +34,8 @@ class AccountsReceivableSummary(ReceivablePayableReport):
columns.append({ columns.append({
"fieldname": "currency", "fieldname": "currency",
"label": _("Currency"), "label": _("Currency"),
"fieldtype": "Data", "fieldtype": "Link",
"options": "Currency",
"width": 80 "width": 80
}) })

View File

@ -12,6 +12,9 @@ frappe.ui.form.on('Delivery Note', 'onload', function(frm) {
return (doc.docstatus==1 || doc.qty<=doc.actual_qty) ? "green" : "orange" return (doc.docstatus==1 || doc.qty<=doc.actual_qty) ? "green" : "orange"
}) })
erpnext.queries.setup_queries(frm, "Warehouse", function() {
return erpnext.queries.warehouse(frm.doc);
});
}) })
erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend({ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend({

View File

@ -44,7 +44,7 @@ erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({
var std_columns = [ var std_columns = [
{id: "_check", name: __("Plot"), field: "_check", width: 30, {id: "_check", name: __("Plot"), field: "_check", width: 30,
formatter: this.check_formatter}, formatter: this.check_formatter},
{id: "status", name: __("Status"), field: "status", width: 100}, {id: "name", name: __("Status"), field: "name", width: 100},
]; ];
this.make_date_range_columns(); this.make_date_range_columns();
this.columns = std_columns.concat(this.columns); this.columns = std_columns.concat(this.columns);
@ -54,14 +54,14 @@ erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({
// add Opening, Closing, Totals rows // add Opening, Closing, Totals rows
// if filtered by account and / or voucher // if filtered by account and / or voucher
var me = this; var me = this;
var total_tickets = {status:"All Tickets", "id": "all-tickets", var total_tickets = {name:"All Tickets", "id": "all-tickets",
checked:true}; checked:true};
var days_to_close = {status:"Days to Close", "id":"days-to-close", var days_to_close = {name:"Days to Close", "id":"days-to-close",
checked:false}; checked:false};
var total_closed = {}; var total_closed = {};
var hours_to_close = {status:"Hours to Close", "id":"hours-to-close", var hours_to_close = {name:"Hours to Close", "id":"hours-to-close",
checked:false}; checked:false};
var hours_to_respond = {status:"Hours to Respond", "id":"hours-to-respond", var hours_to_respond = {name:"Hours to Respond", "id":"hours-to-respond",
checked:false}; checked:false};
var total_responded = {}; var total_responded = {};