Merge pull request #17801 from deepeshgarg007/dashboards

fix: Dashboards for doctypes in accounts module
This commit is contained in:
Rushabh Mehta 2019-06-12 17:15:58 +05:30 committed by GitHub
commit 26dba8bb89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 434 additions and 4 deletions

View File

@ -0,0 +1,18 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'bank',
'transactions': [
{
'label': _('Bank Deatils'),
'items': ['Bank Account', 'Bank Guarantee']
},
{
'items': ['Payment Order']
}
]
}

View File

@ -0,0 +1,30 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'bank_account',
'non_standard_fieldnames': {
'Customer': 'default_bank_account',
'Supplier': 'default_bank_account',
'Journal Entry': 'bank_account_no'
},
'transactions': [
{
'label': _('Payments'),
'items': ['Payment Entry', 'Payment Request', 'Payment Order']
},
{
'label': _('Party'),
'items': ['Customer', 'Supplier']
},
{
'items': ['Bank Guarantee']
},
{
'items': ['Journal Entry']
}
]
}

View File

@ -0,0 +1,15 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'cost_center',
'reports': [
{
'label': _('Reports'),
'items': ['Budget Variance Report', 'General Ledger']
}
]
}

View File

@ -0,0 +1,25 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'finance_book',
'non_standard_fieldnames': {
'Asset': 'default_finance_book',
'Company': 'default_finance_book'
},
'transactions': [
{
'label': _('Assets'),
'items': ['Asset', 'Asset Value Adjustment']
},
{
'items': ['Company']
},
{
'items': ['Journal Entry']
}
]
}

View File

@ -0,0 +1,23 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'fiscal_year',
'transactions': [
{
'label': _('Budgets'),
'items': ['Budget']
},
{
'label': _('References'),
'items': ['Period Closing Voucher', 'Request for Quotation', 'Tax Withholding Category']
},
{
'label': _('Target Details'),
'items': ['Sales Person', 'Sales Partner', 'Territory', 'Monthly Distribution']
}
]
}

View File

@ -0,0 +1,26 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'item_tax_template',
'transactions': [
{
'label': _('Pre Sales'),
'items': ['Quotation', 'Supplier Quotation']
},
{
'label': _('Sales'),
'items': ['Sales Invoice', 'Sales Order', 'Delivery Note']
},
{
'label': _('Purchase'),
'items': ['Purchase Invoice', 'Purchase Order', 'Purchase Receipt']
},
{
'items': ['Item']
}
]
}

View File

@ -25,13 +25,13 @@ frappe.ui.form.on("Journal Entry", {
"group_by_voucher": 0
};
frappe.set_route("query-report", "General Ledger");
}, "fa fa-table");
}, __('View'));
}
if(frm.doc.docstatus==1) {
frm.add_custom_button(__('Reverse Journal Entry'), function() {
return erpnext.journal_entry.reverse_journal_entry(frm);
});
}, __('Make'));
}
if (frm.doc.__islocal) {
@ -47,8 +47,7 @@ frappe.ui.form.on("Journal Entry", {
frm.add_custom_button(__("Create Inter Company Journal Entry"),
function() {
frm.trigger("make_inter_company_journal_entry");
}
);
}, __('Make'));
}
},

View File

@ -0,0 +1,14 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'loyalty_program',
'transactions': [
{
'items': ['Sales Invoice', 'Customer']
}
]
}

View File

@ -0,0 +1,23 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'monthly_distribution',
'non_standard_fieldnames': {
'Sales Person': 'distribution_id',
'Territory': 'distribution_id',
'Sales Partner': 'distribution_id',
},
'transactions': [
{
'label': _('Target Details'),
'items': ['Sales Person', 'Territory', 'Sales Partner']
},
{
'items': ['Budget']
}
]
}

View File

@ -0,0 +1,20 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'payment_gateway_account',
'non_standard_fieldnames': {
'Subscription Plan': 'payment_gateway'
},
'transactions': [
{
'items': ['Payment Request']
},
{
'items': ['Subscription Plan']
}
]
}

View File

@ -0,0 +1,22 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'payment_term',
'transactions': [
{
'label': _('Sales'),
'items': ['Sales Invoice', 'Sales Order', 'Quotation']
},
{
'label': _('Purchase'),
'items': ['Purchase Invoice', 'Purchase Order']
},
{
'items': ['Payment Terms Template']
}
]
}

View File

@ -0,0 +1,33 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'payment_terms_template',
'non_standard_fieldnames': {
'Customer Group': 'payment_terms',
'Supplier Group': 'payment_terms',
'Supplier': 'payment_terms',
'Customer': 'payment_terms'
},
'transactions': [
{
'label': _('Sales'),
'items': ['Sales Invoice', 'Sales Order', 'Quotation']
},
{
'label': _('Purchase'),
'items': ['Purchase Invoice', 'Purchase Order']
},
{
'label': _('Party'),
'items': ['Customer', 'Supplier']
},
{
'label': _('Group'),
'items': ['Customer Group', 'Supplier Group']
}
]
}

View File

@ -0,0 +1,14 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'pos_profile',
'transactions': [
{
'items': ['Sales Invoice', 'POS Closing Voucher']
}
]
}

View File

@ -0,0 +1,22 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'taxes_and_charges',
'non_standard_fieldnames': {
'Tax Rule': 'purchase_tax_template',
},
'transactions': [
{
'label': _('Transactions'),
'items': ['Purchase Invoice', 'Purchase Order', 'Purchase Receipt']
},
{
'label': _('References'),
'items': ['Supplier Quotation', 'Tax Rule']
}
]
}

View File

@ -0,0 +1,24 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'taxes_and_charges',
'non_standard_fieldnames': {
'Tax Rule': 'sales_tax_template',
'Subscription': 'tax_template',
'Restaurant': 'default_tax_template'
},
'transactions': [
{
'label': _('Transactions'),
'items': ['Sales Invoice', 'Sales Order', 'Delivery Note']
},
{
'label': _('References'),
'items': ['POS Profile', 'Subscription', 'Restaurant', 'Tax Rule']
}
]
}

View File

@ -0,0 +1,15 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'share_type',
'transactions': [
{
'label': _('References'),
'items': ['Share Transfer', 'Shareholder']
}
]
}

View File

@ -0,0 +1,17 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'shareholder',
'non_standard_fieldnames': {
'Share Transfer': 'to_shareholder'
},
'transactions': [
{
'items': ['Share Transfer']
}
]
}

View File

@ -0,0 +1,26 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'shipping_rule',
'non_standard_fieldnames': {
'Payment Entry': 'party_name'
},
'transactions': [
{
'label': _('Pre Sales'),
'items': ['Quotation', 'Supplier Quotation']
},
{
'label': _('Sales'),
'items': ['Sales Order', 'Delivery Note', 'Sales Invoice']
},
{
'label': _('Purchase'),
'items': ['Purchase Invoice', 'Purchase Order', 'Purchase Receipt']
}
]
}

View File

@ -0,0 +1,19 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'subscription_plan',
'non_standard_fieldnames': {
'Payment Request': 'plan',
'Subscription': 'plan'
},
'transactions': [
{
'label': _('References'),
'items': ['Payment Request', 'Subscription']
}
]
}

View File

@ -0,0 +1,31 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'tax_category',
'transactions': [
{
'label': _('Pre Sales'),
'items': ['Quotation', 'Supplier Quotation']
},
{
'label': _('Sales'),
'items': ['Sales Invoice', 'Delivery Note', 'Sales Order']
},
{
'label': _('Purchase'),
'items': ['Purchase Invoice', 'Purchase Receipt']
},
{
'label': _('Party'),
'items': ['Customer', 'Supplier']
},
{
'label': _('Taxes'),
'items': ['Item', 'Tax Rule']
}
]
}

View File

@ -0,0 +1,14 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'tax_withholding_category',
'transactions': [
{
'items': ['Supplier']
}
]
}