Merge branch 'master' into develop

This commit is contained in:
Nabin Hait 2016-10-27 19:14:55 +05:30
commit a330d330c8
9 changed files with 26 additions and 3 deletions

View File

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

View File

@ -1,3 +1,5 @@
frappe.provide("frappe.treeview_settings")
frappe.treeview_settings["Account"] = { frappe.treeview_settings["Account"] = {
breadcrumbs: "Accounts", breadcrumbs: "Accounts",
title: __("Chart Of Accounts"), title: __("Chart Of Accounts"),
@ -33,10 +35,19 @@ frappe.treeview_settings["Account"] = {
{fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate'), {fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate'),
depends_on: 'eval:doc.is_group==1&&doc.account_type=="Tax"'}, depends_on: 'eval:doc.is_group==1&&doc.account_type=="Tax"'},
{fieldtype:'Link', fieldname:'warehouse', label:__('Warehouse'), options:"Warehouse", {fieldtype:'Link', fieldname:'warehouse', label:__('Warehouse'), options:"Warehouse",
depends_on: 'eval:(!doc.is_group&&doc.account_type=="Warehouse")'}, depends_on: 'eval:(!doc.is_group&&doc.account_type=="Stock")',
get_query: function() {
return {
filters:{
"company": frappe.treeview_settings.filters["company"]
}
}
}
},
{fieldtype:'Link', fieldname:'account_currency', label:__('Currency'), options:"Currency", {fieldtype:'Link', fieldname:'account_currency', label:__('Currency'), options:"Currency",
description: __("Optional. Sets company's default currency, if not specified.")} description: __("Optional. Sets company's default currency, if not specified.")}
], ],
ignore_fields:["parent_account"],
onrender: function(node) { onrender: function(node) {
var dr_or_cr = node.data.balance < 0 ? "Cr" : "Dr"; var dr_or_cr = node.data.balance < 0 ? "Cr" : "Dr";
if (node.data && node.data.balance!==undefined) { if (node.data && node.data.balance!==undefined) {

View File

@ -23,4 +23,5 @@ frappe.treeview_settings["Cost Center"] = {
{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'), {fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
description:__('Further cost centers can be made under Groups but entries can be made against non-Groups')} description:__('Further cost centers can be made under Groups but entries can be made against non-Groups')}
], ],
ignore_fields:["parent_cost_center"]
} }

View File

@ -16,7 +16,7 @@ def execute(filters=None):
def get_columns(): def get_columns():
return [ return [
_("Payment Document") + ":Link/DocType:130", _("Payment Document") + "::130",
_("Payment Entry") + ":Dynamic Link/"+_("Payment Document")+":110", _("Payment Entry") + ":Dynamic Link/"+_("Payment Document")+":110",
_("Posting Date") + ":Date:100", _("Posting Date") + ":Date:100",
_("Cheque/Reference No") + "::120", _("Cheque/Reference No") + "::120",

View File

@ -0,0 +1,3 @@
frappe.treeview_settings["Customer Group"] = {
ignore_fields:["parent_customer_group"]
}

View File

@ -0,0 +1,3 @@
frappe.treeview_settings["Item Group"] = {
ignore_fields:["parent_item_group"]
}

View File

@ -1,3 +1,4 @@
frappe.treeview_settings["Sales Person"] = { frappe.treeview_settings["Sales Person"] = {
fields: [ fields: [
{fieldtype:'Data', fieldname: 'sales_person_name', {fieldtype:'Data', fieldname: 'sales_person_name',

View File

@ -0,0 +1,3 @@
frappe.treeview_settings["Territory"] = {
ignore_fields:["parent_territory"]
}

View File

@ -16,6 +16,7 @@ frappe.treeview_settings['Warehouse'] = {
{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'), {fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
description: __("Child nodes can be only created under 'Group' type nodes")} description: __("Child nodes can be only created under 'Group' type nodes")}
], ],
ignore_fields:["parent_warehouse"],
onrender: function(node) { onrender: function(node) {
if (node.data && node.data.balance!==undefined) { if (node.data && node.data.balance!==undefined) {
$('<span class="balance-area pull-right text-muted small">' $('<span class="balance-area pull-right text-muted small">'