Merge branch 'develop' of https://github.com/frappe/erpnext.git into Brand-Item-Defaults-V12

# Conflicts:
#	erpnext/stock/doctype/item/test_item.py
This commit is contained in:
Saif Ur Rehman 2019-03-08 01:29:39 +05:00
commit e62bd893c5
254 changed files with 43145 additions and 38593 deletions

1
.pylintrc Normal file
View File

@ -0,0 +1 @@
disable=access-member-before-definition

View File

@ -15,7 +15,7 @@ install:
- sudo rm /etc/apt/sources.list.d/docker.list
- sudo apt-get install hhvm && rm -rf /home/travis/.kiex/
- sudo apt-get purge -y mysql-common mysql-server mysql-client
- nvm install v7.10.0
- nvm install 10
- pip install python-coveralls
- wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
- sudo python install.py --develop --user travis --without-bench-setup

View File

@ -5,7 +5,7 @@ import frappe
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
__version__ = '11.1.3'
__version__ = '11.1.13'
def get_default_company(user=None):
'''Get default company for user'''

View File

@ -0,0 +1,58 @@
{
"custom_fields": [
{
"_assign": null,
"_comments": null,
"_liked_by": null,
"_user_tags": null,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"columns": 0,
"creation": "2018-12-28 22:29:21.828090",
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"dt": "Address",
"fetch_from": null,
"fieldname": "tax_category",
"fieldtype": "Link",
"hidden": 0,
"idx": 14,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"insert_after": "fax",
"label": "Tax Category",
"modified": "2018-12-28 22:29:21.828090",
"modified_by": "Administrator",
"name": "Address-tax_category",
"no_copy": 0,
"options": "Tax Category",
"owner": "Administrator",
"parent": null,
"parentfield": null,
"parenttype": null,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"translatable": 0,
"unique": 0,
"width": null
}
],
"custom_perms": [],
"doctype": "Address",
"property_setters": [],
"sync_on_migrate": 1
}

View File

@ -60,7 +60,7 @@ def get_booking_dates(doc, item, start_date=None, end_date=None):
deferred_account = "deferred_revenue_account" if doc.doctype=="Sales Invoice" else "deferred_expense_account"
last_gl_entry, skip = False, False
booking_end_date = getdate(add_days(today(), -1)) if not end_date else end_date
booking_end_date = getdate(add_days(today(), -1) if not end_date else end_date)
if booking_end_date < item.service_start_date or \
(item.service_stop_date and booking_end_date.month > item.service_stop_date.month):
return None, None, None, True
@ -71,7 +71,7 @@ def get_booking_dates(doc, item, start_date=None, end_date=None):
last_gl_entry = True
booking_end_date = item.service_stop_date
booking_start_date = getdate(add_months(today(), -1)) if not start_date else start_date
booking_start_date = getdate(add_months(today(), -1) if not start_date else start_date)
booking_start_date = booking_start_date \
if booking_start_date > item.service_start_date else item.service_start_date
@ -113,7 +113,6 @@ def calculate_amount_and_base_amount(doc, item, last_gl_entry, total_days, total
group by voucher_detail_no
'''.format(total_credit_debit, total_credit_debit_currency),
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name), as_dict=True)
already_booked_amount = gl_entries_details[0].total_credit if gl_entries_details else 0
base_amount = flt(item.base_net_amount - already_booked_amount, item.precision("base_net_amount"))
if account_currency==doc.company_currency:
@ -128,15 +127,19 @@ def book_deferred_income_or_expense(doc, start_date=None, end_date=None):
# book the expense/income on the last day, but it will be trigger on the 1st of month at 12:00 AM
# start_date: 1st of the last month or the start date
# end_date: end_date or today-1
enable_check = "enable_deferred_revenue" \
if doc.doctype=="Sales Invoice" else "enable_deferred_expense"
gl_entries = []
for item in doc.get('items'):
if not item.get(enable_check): continue
skip = False
last_gl_entry, booking_start_date, booking_end_date, skip = \
get_booking_dates(doc, item, start_date, end_date)
if skip: continue
total_days = date_diff(item.service_end_date, item.service_start_date)
total_days = date_diff(item.service_end_date, item.service_start_date) + 1
total_booking_days = date_diff(booking_end_date, booking_start_date) + 1
account_currency = get_account_currency(item.expense_account)
@ -175,6 +178,10 @@ def book_deferred_income_or_expense(doc, start_date=None, end_date=None):
'project': project
}, account_currency)
)
if gl_entries:
make_gl_entries(gl_entries, cancel=(doc.docstatus == 2), merge_entries=True)
try:
make_gl_entries(gl_entries, cancel=(doc.docstatus == 2), merge_entries=True)
frappe.db.commit()
except:
frappe.db.rollback()
frappe.log_error(message = frappe.get_traceback(), title = _("Error while processing deferred accounting for {0}").format(doc.name))

View File

@ -112,6 +112,41 @@
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Billing Address",
"description": "Address used to determine Tax Category in transactions.",
"fieldname": "determine_address_tax_category_from",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Determine Address Tax Category From",
"length": 0,
"no_copy": 0,
"options": "Billing Address\nShipping Address",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
@ -338,6 +373,39 @@
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "1",
"fieldname": "add_taxes_from_item_tax_template",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Automatically Add Taxes and Charges from Item Tax Template",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
@ -642,7 +710,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2019-01-07 16:52:03.869199",
"modified": "2019-01-07 00:42:34.510150",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",
@ -714,4 +782,4 @@
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}
}

View File

@ -15,6 +15,9 @@ class AccountsSettings(Document):
frappe.clear_cache()
def validate(self):
for f in ["add_taxes_from_item_tax_template"]:
frappe.db.set_default(f, self.get(f, ""))
self.validate_stale_days()
self.enable_payment_schedule_in_print()
self.enable_fields_for_cost_center_settings()

View File

@ -1,434 +1,457 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "naming_series:",
"beta": 0,
"creation": "2018-06-18 16:51:49.994750",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "naming_series:",
"beta": 0,
"creation": "2018-06-18 16:51:49.994750",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "POS-CLO-",
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Series",
"length": 0,
"no_copy": 0,
"options": "POS-CLO-",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "POS-CLO-",
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Series",
"length": 0,
"no_copy": 0,
"options": "POS-CLO-",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "user",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "User",
"length": 0,
"no_copy": 0,
"options": "User",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "user",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "User",
"length": 0,
"no_copy": 0,
"options": "User",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Today",
"fieldname": "date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Today",
"fieldname": "date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "from_time",
"fieldtype": "Time",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "From Time",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "from_time",
"fieldtype": "Time",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "From Time",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "",
"fieldname": "time",
"fieldtype": "Time",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "To Time",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "",
"fieldname": "time",
"fieldtype": "Time",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "To Time",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.00",
"fieldname": "expense",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "2",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.00",
"fieldname": "expense",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.00",
"fieldname": "custody",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Custody",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "2",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.00",
"fieldname": "custody",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Custody",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.00",
"fieldname": "returns",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Returns",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "2",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.00",
"fieldname": "returns",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Returns",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "2",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.00",
"fieldname": "outstanding_amount",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Outstanding Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "2",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.00",
"fieldname": "outstanding_amount",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Outstanding Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.0",
"fieldname": "payments",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payments",
"length": 0,
"no_copy": 0,
"options": "Cashier Closing Payments",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.0",
"fieldname": "payments",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payments",
"length": 0,
"no_copy": 0,
"options": "Cashier Closing Payments",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "net_amount",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Net Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "net_amount",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Net Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Cashier Closing",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Cashier Closing",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-10-21 14:26:15.812416",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cashier Closing",
"name_case": "",
"owner": "Administrator",
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-02-19 08:35:24.157327",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cashier Closing",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}

View File

@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
@ -14,6 +15,7 @@
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@ -41,10 +43,12 @@
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@ -63,7 +67,7 @@
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "2",
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
@ -72,6 +76,7 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
@ -85,7 +90,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2018-09-02 14:45:36.303520",
"modified": "2019-02-19 08:34:20.268037",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cashier Closing Payments",
@ -99,5 +104,6 @@
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
"track_seen": 0,
"track_views": 0
}

View File

@ -0,0 +1,15 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Item Tax Template', {
setup: function(frm) {
frm.set_query("tax_type", "taxes", function(doc) {
return {
filters: [
['Account', 'is_group', '=', 0],
['Account', 'account_type', 'in', ['Tax', 'Chargeable', 'Income Account', 'Expense Account', 'Expenses Included In Valuation']]
]
}
});
}
});

View File

@ -0,0 +1,168 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:title",
"beta": 0,
"creation": "2018-11-22 22:45:00.370913",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "title",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Title",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "taxes",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Tax Rates",
"length": 0,
"no_copy": 0,
"options": "Item Tax Template Detail",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-12-21 23:51:16.328340",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Item Tax Template",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 0
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "",
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}

View File

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _
class ItemTaxTemplate(Document):
def validate(self):
self.validate_tax_accounts()
def validate_tax_accounts(self):
"""Check whether Tax Rate is not entered twice for same Tax Type"""
check_list = []
for d in self.get('taxes'):
if d.tax_type:
account_type = frappe.db.get_value("Account", d.tax_type, "account_type")
if account_type not in ['Tax', 'Chargeable', 'Income Account', 'Expense Account', 'Expenses Included In Valuation']:
frappe.throw(
_("Item Tax Row {0} must have account of type Tax or Income or Expense or Chargeable").format(
d.idx))
else:
if d.tax_type in check_list:
frappe.throw(_("{0} entered twice in Item Tax").format(d.tax_type))
else:
check_list.append(d.tax_type)

View File

@ -0,0 +1,23 @@
/* eslint-disable */
// rename this file from _test_[name] to test_[name] to activate
// and remove above this line
QUnit.test("test: Item Tax Template", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(1);
frappe.run_serially([
// insert a new Item Tax Template
() => frappe.tests.make('Item Tax Template', [
// values to be set
{key: 'value'}
]),
() => {
assert.equal(cur_frm.doc.key, 'value');
},
() => done()
]);
});

View File

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestItemTaxTemplate(unittest.TestCase):
pass

View File

@ -0,0 +1,74 @@
[
{
"doctype": "Item Tax Template",
"title": "_Test Account Excise Duty @ 10",
"taxes": [
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 10,
"tax_type": "_Test Account Excise Duty - _TC"
}
]
},
{
"doctype": "Item Tax Template",
"title": "_Test Account Excise Duty @ 12",
"taxes": [
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 12,
"tax_type": "_Test Account Excise Duty - _TC"
}
]
},
{
"doctype": "Item Tax Template",
"title": "_Test Account Excise Duty @ 15",
"taxes": [
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 15,
"tax_type": "_Test Account Excise Duty - _TC"
}
]
},
{
"doctype": "Item Tax Template",
"title": "_Test Account Excise Duty @ 20",
"taxes": [
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 20,
"tax_type": "_Test Account Excise Duty - _TC"
}
]
},
{
"doctype": "Item Tax Template",
"title": "_Test Item Tax Template 1",
"taxes": [
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 5,
"tax_type": "_Test Account Excise Duty - _TC"
},
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 10,
"tax_type": "_Test Account Education Cess - _TC"
},
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 15,
"tax_type": "_Test Account S&H Education Cess - _TC"
}
]
}
]

View File

@ -0,0 +1,108 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2018-11-22 23:47:02.804568",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "tax_type",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Tax",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "tax_rate",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Tax Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2018-12-21 23:51:39.445198",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Item Tax Template Detail",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}

View File

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class ItemTaxTemplateDetail(Document):
pass

View File

@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
@ -398,7 +399,7 @@
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "6",
"precision": "9",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
@ -911,7 +912,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2018-08-19 04:08:44.742510",
"modified": "2019-02-18 19:00:53.662788",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Account",

View File

@ -6,7 +6,7 @@ from __future__ import unicode_literals
import frappe, erpnext, json
from frappe import _, scrub, ValidationError
from frappe.utils import flt, comma_or, nowdate, getdate
from erpnext.accounts.utils import get_outstanding_invoices, get_account_currency, get_balance_on
from erpnext.accounts.utils import get_outstanding_invoices, get_account_currency, get_balance_on, get_allow_cost_center_in_entry_of_bs_account
from erpnext.accounts.party import get_party_account
from erpnext.accounts.doctype.journal_entry.journal_entry import get_default_bank_cash_account
from erpnext.setup.utils import get_exchange_rate
@ -171,7 +171,7 @@ class PaymentEntry(AccountsController):
if not frappe.db.exists(self.party_type, self.party):
frappe.throw(_("Invalid {0}: {1}").format(self.party_type, self.party))
if self.party_account:
if self.party_account and self.party_type in ("Customer", "Supplier"):
self.validate_account_type(self.party_account,
[erpnext.get_party_account_type(self.party_type)])
@ -564,8 +564,8 @@ def get_outstanding_reference_documents(args):
.format(frappe.db.escape(args["voucher_type"]), frappe.db.escape(args["voucher_no"]))
# Add cost center condition
if args.get("cost_center"):
condition += " and cost_center='%s'" % args.get("cost_center")
if args.get("cost_center") and get_allow_cost_center_in_entry_of_bs_account():
condition += " and cost_center='%s'" % args.get("cost_center")
outstanding_invoices = get_outstanding_invoices(args.get("party_type"), args.get("party"),
args.get("party_account"), condition=condition)
@ -689,7 +689,7 @@ def get_party_details(company, party_type, party, date, cost_center=None):
account_currency = get_account_currency(party_account)
account_balance = get_balance_on(party_account, date, cost_center=cost_center)
_party_name = "title" if party_type == "Student" else party_type.lower() + "_name"
_party_name = "title" if party_type in ("Student", "Shareholder") else party_type.lower() + "_name"
party_name = frappe.db.get_value(party_type, party, _party_name)
party_balance = get_balance_on(party_type=party_type, party=party, cost_center=cost_center)
if party_type in ["Customer", "Supplier"]:

View File

@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
@ -425,7 +426,7 @@
"no_copy": 0,
"options": "currency",
"permlevel": 0,
"precision": "2",
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
@ -1501,7 +1502,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-09-06 14:44:43.563367",
"modified": "2019-02-18 18:52:34.203239",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Request",

View File

@ -8,5 +8,6 @@ frappe.ui.form.on('Payment Terms Template', {
frm.add_fetch("payment_term", "due_date_based_on", "due_date_based_on");
frm.add_fetch("payment_term", "credit_days", "credit_days");
frm.add_fetch("payment_term", "credit_months", "credit_months");
frm.add_fetch("payment_term", "mode_of_payment", "mode_of_payment");
}
});

View File

@ -8,9 +8,4 @@ from frappe.model.document import Document
class POSSettings(Document):
def validate(self):
self.set_link_for_pos()
def set_link_for_pos(self):
link = 'pos' if self.use_pos_in_offline_mode else 'point-of-sale'
frappe.db.sql(""" update `tabDesktop Icon` set link = '{0}'
where module_name like '%pos%'""".format(link))
pass

View File

@ -196,8 +196,9 @@ def get_pricing_rule_for_item(args):
pricing_rule_rate = 0.0
if pricing_rule.currency == args.currency:
pricing_rule_rate = pricing_rule.rate
item_details.update({
"price_list_rate": pricing_rule_rate,
"price_list_rate": pricing_rule_rate * args.get("conversion_factor"),
"discount_percentage": 0.0
})
else:
@ -346,7 +347,7 @@ def filter_pricing_rules(args, pricing_rules):
if len(pricing_rules) > 1:
rate_or_discount = list(set([d.rate_or_discount for d in pricing_rules]))
if len(rate_or_discount) == 1 and rate_or_discount[0] == "Discount Percentage":
pricing_rules = filter(lambda x: x.for_price_list==args.price_list, pricing_rules) \
pricing_rules = list(filter(lambda x: x.for_price_list==args.price_list, pricing_rules)) \
or pricing_rules
if len(pricing_rules) > 1 and not args.for_shopping_cart:
@ -369,7 +370,7 @@ def apply_internal_priority(pricing_rules, field_set, args):
filtered_rules = []
for field in field_set:
if args.get(field):
filtered_rules = filter(lambda x: x[field]==args[field], pricing_rules)
filtered_rules = list(filter(lambda x: x[field]==args[field], pricing_rules))
if filtered_rules: break
return filtered_rules or pricing_rules

View File

@ -9,9 +9,12 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
this.setup_posting_date_time_check();
this._super(doc);
// formatter for material request item
this.frm.set_indicator_formatter('item_code',
function(doc) { return (doc.qty<=doc.received_qty) ? "green" : "orange" })
// formatter for purchase invoice item
if(this.frm.doc.update_stock) {
this.frm.set_indicator_formatter('item_code', function(doc) {
return (doc.qty<=doc.received_qty) ? "green" : "orange";
});
}
},
onload: function() {
this._super();

View File

@ -2185,7 +2185,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "taxes_and_charges",
"fieldname": "tax_category",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
@ -2194,13 +2194,12 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
"label": "Tax Category",
"length": 0,
"no_copy": 0,
"oldfieldname": "purchase_other_charges",
"oldfieldtype": "Link",
"options": "Purchase Taxes and Charges Template",
"options": "Tax Category",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
@ -2307,6 +2306,40 @@
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "taxes_and_charges",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Taxes and Charges Template",
"length": 0,
"no_copy": 0,
"oldfieldname": "purchase_other_charges",
"oldfieldtype": "Link",
"options": "Purchase Taxes and Charges Template",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
@ -4726,7 +4759,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2019-01-07 16:51:59.800081",
"modified": "2018-12-27 02:07:04.299399",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",
@ -4841,4 +4874,4 @@
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}
}

View File

@ -46,6 +46,7 @@ class PurchaseInvoice(BuyingController):
}]
def onload(self):
super(PurchaseInvoice, self).onload()
supplier_tds = frappe.db.get_value("Supplier", self.supplier, "tax_withholding_category")
self.set_onload("supplier_tds", supplier_tds)
@ -231,7 +232,7 @@ class PurchaseInvoice(BuyingController):
item.expense_account = warehouse_account[item.warehouse]["account"]
else:
item.expense_account = stock_not_billed_account
elif item.is_fixed_asset and d.pr_detail:
elif item.is_fixed_asset and item.pr_detail:
item.expense_account = asset_received_but_not_billed
elif not item.expense_account and for_validate:
throw(_("Expense account is mandatory for item {0}").format(item.item_code or item.item_name))

View File

@ -18,7 +18,7 @@
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"item_tax_template": "_Test Account Excise Duty @ 10",
"parentfield": "items",
"qty": 10,
"rate": 50,

View File

@ -0,0 +1,3 @@
{% include "erpnext/regional/italy/sales_invoice.js" %}
erpnext.setup_e_invoice_button('Sales Invoice')

View File

@ -201,7 +201,8 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
get_query: function() {
var filters = {
docstatus: 1,
company: me.frm.doc.company
company: me.frm.doc.company,
is_return: 0
};
if(me.frm.doc.customer) filters["customer"] = me.frm.doc.customer;
return {

File diff suppressed because it is too large Load Diff

View File

@ -1012,9 +1012,10 @@ class SalesInvoice(SellingController):
for serial_no in item.serial_no.split("\n"):
sales_invoice = frappe.db.get_value("Serial No", serial_no, "sales_invoice")
if sales_invoice and self.name != sales_invoice:
frappe.throw(_("Serial Number: {0} is already referenced in Sales Invoice: {1}".format(
serial_no, sales_invoice
)))
sales_invoice_company = frappe.db.get_value("Sales Invoice", sales_invoice, "company")
if sales_invoice_company == self.company:
frappe.throw(_("Serial Number: {0} is already referenced in Sales Invoice: {1}"
.format(serial_no, sales_invoice)))
def update_project(self):
if self.project:

View File

@ -142,7 +142,7 @@
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"item_tax_template": "_Test Account Excise Duty @ 10",
"parentfield": "items",
"price_list_rate": 50,
"qty": 10,
@ -269,7 +269,7 @@
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"item_tax_template": "_Test Account Excise Duty @ 10",
"parentfield": "items",
"price_list_rate": 62.5,
"qty": 10,

View File

@ -381,6 +381,63 @@ class TestSalesInvoice(unittest.TestCase):
self.assertEqual(si.grand_total, 5474.0)
def test_tax_calculation_with_item_tax_template(self):
si = create_sales_invoice(qty=84, rate=4.6, do_not_save=True)
item_row = si.get("items")[0]
add_items = [
(54, '_Test Account Excise Duty @ 12'),
(288, '_Test Account Excise Duty @ 15'),
(144, '_Test Account Excise Duty @ 20'),
(430, '_Test Item Tax Template 1')
]
for qty, item_tax_template in add_items:
item_row_copy = copy.deepcopy(item_row)
item_row_copy.qty = qty
item_row_copy.item_tax_template = item_tax_template
si.append("items", item_row_copy)
si.append("taxes", {
"account_head": "_Test Account Excise Duty - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Sales Taxes and Charges",
"rate": 11
})
si.append("taxes", {
"account_head": "_Test Account Education Cess - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Sales Taxes and Charges",
"rate": 0
})
si.append("taxes", {
"account_head": "_Test Account S&H Education Cess - _TC",
"charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Sales Taxes and Charges",
"rate": 3
})
si.insert()
self.assertEqual(si.net_total, 4600)
self.assertEqual(si.get("taxes")[0].tax_amount, 502.41)
self.assertEqual(si.get("taxes")[0].total, 5102.41)
self.assertEqual(si.get("taxes")[1].tax_amount, 197.80)
self.assertEqual(si.get("taxes")[1].total, 5300.21)
self.assertEqual(si.get("taxes")[2].tax_amount, 375.36)
self.assertEqual(si.get("taxes")[2].total, 5675.57)
self.assertEqual(si.grand_total, 5675.57)
self.assertEqual(si.rounding_adjustment, 0.43)
self.assertEqual(si.rounded_total, 5676.0)
def test_tax_calculation_with_multiple_items_and_discount(self):
si = create_sales_invoice(qty=1, rate=75, do_not_save=True)
item_row = si.get("items")[0]

View File

@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
@ -13,6 +14,7 @@
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@ -40,11 +42,12 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@ -72,16 +75,17 @@
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.0",
"default": "",
"depends_on": "eval:parent.doctype == 'Sales Invoice'",
"fieldname": "amount",
"fieldtype": "Currency",
@ -97,7 +101,7 @@
"no_copy": 0,
"options": "currency",
"permlevel": 0,
"precision": "2",
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
@ -106,11 +110,12 @@
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@ -136,11 +141,12 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@ -168,16 +174,17 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_from": "mode_of_payment.type",
"fetch_from": "mode_of_payment.type",
"fieldname": "type",
"fieldtype": "Read Only",
"hidden": 0,
@ -201,11 +208,12 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@ -233,11 +241,12 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@ -264,7 +273,7 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"translatable": 0,
"unique": 0
}
],
@ -278,7 +287,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2018-05-16 22:42:52.033991",
"modified": "2019-02-18 15:03:59.720469",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Payment",
@ -292,5 +301,6 @@
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
"track_seen": 0,
"track_views": 0
}

View File

@ -1,5 +1,7 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
@ -12,6 +14,8 @@
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@ -39,9 +43,12 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@ -68,9 +75,12 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@ -88,7 +98,7 @@
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "2",
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
@ -97,9 +107,12 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
@ -126,20 +139,21 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2017-02-17 16:47:04.413420",
"modified": "2019-02-18 18:50:44.770361",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Timesheet",
@ -153,5 +167,6 @@
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
"track_seen": 0,
"track_views": 0
}

View File

@ -0,0 +1,8 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Tax Category', {
refresh: function(frm) {
}
});

View File

@ -0,0 +1,134 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "field:title",
"beta": 0,
"creation": "2018-11-22 23:38:39.668804",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "title",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 1
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-11-22 23:38:39.668804",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Tax Category",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 0
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}

View File

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class TaxCategory(Document):
pass

View File

@ -0,0 +1,14 @@
[
{
"doctype": "Tax Category",
"title": "_Test Tax Category 1"
},
{
"doctype": "Tax Category",
"title": "_Test Tax Category 2"
},
{
"doctype": "Tax Category",
"title": "_Test Tax Category 3"
}
]

View File

@ -0,0 +1,23 @@
/* eslint-disable */
// rename this file from _test_[name] to test_[name] to activate
// and remove above this line
QUnit.test("test: Tax Category", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(1);
frappe.run_serially([
// insert a new Tax Category
() => frappe.tests.make('Tax Category', [
// values to be set
{key: 'value'}
]),
() => {
assert.equal(cur_frm.doc.key, 'value');
},
() => done()
]);
});

View File

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestTaxCategory(unittest.TestCase):
pass

View File

@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 0,
@ -471,6 +472,39 @@
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "tax_category",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Tax Category",
"length": 0,
"no_copy": 0,
"options": "Tax Category",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
@ -1030,7 +1064,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-08-21 16:15:51.095450",
"modified": "2018-12-27 01:22:17.721636",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Tax Rule",

View File

@ -68,6 +68,7 @@ class TaxRule(Document):
"shipping_state": self.shipping_state,
"shipping_zipcode": self.shipping_zipcode,
"shipping_country": self.shipping_country,
"tax_category": self.tax_category,
"company": self.company
}
@ -144,10 +145,14 @@ def get_tax_template(posting_date, args):
conditions = ["""(from_date is null or from_date <= '{0}')
and (to_date is null or to_date >= '{0}')""".format(posting_date)]
conditions.append("ifnull(tax_category, '') = {0}".format(frappe.db.escape(cstr(args.get("tax_category")))))
if 'tax_category' in args.keys():
del args['tax_category']
for key, value in iteritems(args):
if key=="use_for_shopping_cart":
conditions.append("use_for_shopping_cart = {0}".format(1 if value else 0))
if key == 'customer_group':
elif key == 'customer_group':
if not value: value = get_root_of("Customer Group")
customer_group_condition = get_customer_group_condition(value)
conditions.append("ifnull({0}, '') in ('', {1})".format(key, customer_group_condition))

View File

@ -74,6 +74,26 @@ class TestTaxRule(unittest.TestCase):
self.assertEqual(get_tax_template("2015-01-01", {"customer":"_Test Customer 2"}),
"_Test Sales Taxes and Charges Template 2 - _TC")
def test_select_tax_rule_based_on_tax_category(self):
make_tax_rule(customer="_Test Customer", tax_category="_Test Tax Category 1",
sales_tax_template="_Test Sales Taxes and Charges Template 1 - _TC", save=1)
make_tax_rule(customer="_Test Customer", tax_category="_Test Tax Category 2",
sales_tax_template="_Test Sales Taxes and Charges Template 2 - _TC", save=1)
self.assertFalse(get_tax_template("2015-01-01", {"customer": "_Test Customer"}))
self.assertEqual(get_tax_template("2015-01-01", {"customer": "_Test Customer", "tax_category": "_Test Tax Category 1"}),
"_Test Sales Taxes and Charges Template 1 - _TC")
self.assertEqual(get_tax_template("2015-01-01", {"customer": "_Test Customer", "tax_category": "_Test Tax Category 2"}),
"_Test Sales Taxes and Charges Template 2 - _TC")
make_tax_rule(customer="_Test Customer", tax_category="",
sales_tax_template="_Test Sales Taxes and Charges Template - _TC", save=1)
self.assertEqual(get_tax_template("2015-01-01", {"customer": "_Test Customer"}),
"_Test Sales Taxes and Charges Template - _TC")
def test_select_tax_rule_based_on_better_match(self):
make_tax_rule(customer= "_Test Customer", billing_city = "Test City", billing_state = "Test State",
sales_tax_template = "_Test Sales Taxes and Charges Template - _TC", save=1)

View File

@ -22,7 +22,7 @@ class TestTaxWithholdingCategory(unittest.TestCase):
invoices = []
# create invoices for lower than single threshold tax rate
for _ in xrange(2):
for _ in range(2):
pi = create_purchase_invoice(supplier = "Test TDS Supplier")
pi.submit()
invoices.append(pi)

View File

@ -8,7 +8,7 @@ from frappe import _, msgprint, scrub
from frappe.core.doctype.user_permission.user_permission import get_permitted_documents
from frappe.model.utils import get_fetch_values
from frappe.utils import (add_days, getdate, formatdate, date_diff,
add_years, get_timestamp, nowdate, flt, add_months, get_last_day)
add_years, get_timestamp, nowdate, flt, cstr, add_months, get_last_day)
from frappe.contacts.doctype.address.address import (get_address_display,
get_default_address, get_company_address)
from frappe.contacts.doctype.contact.contact import get_contact_details, get_default_contact
@ -16,7 +16,7 @@ from erpnext.exceptions import PartyFrozen, PartyDisabled, InvalidAccountCurrenc
from erpnext.accounts.utils import get_fiscal_year
from erpnext import get_company_currency
from six import iteritems
from six import iteritems, string_types
class DuplicatePartyAccountError(frappe.ValidationError): pass
@ -46,14 +46,16 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
party = frappe.get_doc(party_type, party)
currency = party.default_currency if party.default_currency else get_company_currency(company)
out["taxes_and_charges"] = set_taxes(party.name, party_type, posting_date, company, out.customer_group, out.supplier_group)
out["payment_terms_template"] = get_pyt_term_template(party.name, party_type, company)
set_address_details(out, party, party_type, doctype, company, party_address, shipping_address)
party_address, shipping_address = set_address_details(out, party, party_type, doctype, company, party_address, shipping_address)
set_contact_details(out, party, party_type)
set_other_values(out, party, party_type)
set_price_list(out, party, party_type, price_list, pos_profile)
out["taxes_and_charges"] = set_taxes(party.name, party_type, posting_date, company, out.customer_group, out.supplier_type)
out["tax_category"] = get_address_tax_category(party.get("tax_category"),
party_address, shipping_address if party_type != "Supplier" else party_address)
out["taxes_and_charges"] = set_taxes(party.name, party_type, posting_date, company,
customer_group=out.customer_group, supplier_group=out.supplier_group, tax_category=out.tax_category,
billing_address=party_address, shipping_address=shipping_address)
if fetch_payment_terms_template:
out["payment_terms_template"] = get_pyt_term_template(party.name, party_type, company)
@ -103,6 +105,8 @@ def set_address_details(out, party, party_type, doctype=None, company=None, part
out.update(get_fetch_values(doctype, 'shipping_address', out.shipping_address))
get_regional_address_details(out, doctype, company)
return out.get(billing_address_field), out.shipping_address_name
@erpnext.allow_regional
def get_regional_address_details(out, doctype, company):
pass
@ -361,7 +365,19 @@ def validate_due_date(posting_date, due_date, party_type, party, company=None, b
.format(formatdate(default_due_date)))
@frappe.whitelist()
def set_taxes(party, party_type, posting_date, company, customer_group=None, supplier_group=None,
def get_address_tax_category(tax_category, billing_address=None, shipping_address=None):
addr_tax_category_from = frappe.db.get_single_value("Accounts Settings", "determine_address_tax_category_from")
if addr_tax_category_from == "Shipping Address":
if shipping_address:
tax_category = frappe.db.get_value("Address", shipping_address, "tax_category") or tax_category
else:
if billing_address:
tax_category = frappe.db.get_value("Address", billing_address, "tax_category") or tax_category
return cstr(tax_category)
@frappe.whitelist()
def set_taxes(party, party_type, posting_date, company, customer_group=None, supplier_group=None, tax_category=None,
billing_address=None, shipping_address=None, use_for_shopping_cart=None):
from erpnext.accounts.doctype.tax_rule.tax_rule import get_tax_template, get_party_details
args = {
@ -369,6 +385,9 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup
"company": company
}
if tax_category:
args['tax_category'] = tax_category
if customer_group:
args['customer_group'] = customer_group

View File

@ -495,6 +495,7 @@ class ReceivablePayableReport(object):
values.append(self.filters.get(party_type_field))
if party_type_field=="customer":
account_type = "Receivable"
if self.filters.get("customer_group"):
lft, rgt = frappe.db.get_value("Customer Group",
self.filters.get("customer_group"), ["lft", "rgt"])
@ -529,12 +530,18 @@ class ReceivablePayableReport(object):
or (steam.parent = against_voucher and steam.parenttype = against_voucher_type)
or (steam.parent = party and steam.parenttype = 'Customer')))""".format(lft, rgt))
if party_type_field=="supplier":
elif party_type_field=="supplier":
account_type = "Payable"
if self.filters.get("supplier_group"):
conditions.append("""party in (select name from tabSupplier
where supplier_group=%s)""")
values.append(self.filters.get("supplier_group"))
accounts = [d.name for d in frappe.get_all("Account",
filters={"account_type": account_type, "company": self.filters.company})]
conditions.append("account in (%s)" % ','.join(['%s'] *len(accounts)))
values += accounts
return " and ".join(conditions), values
def get_gl_entries_for(self, party, party_type, against_voucher_type, against_voucher):

View File

@ -270,7 +270,7 @@ def add_total_row(out, root_type, balance_must_be, period_list, company_currency
for period in period_list:
total_row.setdefault(period.key, 0.0)
total_row[period.key] += row.get(period.key, 0.0)
row[period.key] = 0.0
row[period.key] = row.get(period.key, 0.0)
total_row.setdefault("total", 0.0)
total_row["total"] += flt(row["total"])

View File

@ -53,7 +53,7 @@ def validate_filters(filters, account_details):
frappe.throw(_("Can not filter based on Account, if grouped by Account"))
if (filters.get("voucher_no")
and filters.get("group_by") in [_('Group by Voucher'), _('Group by Voucher (Consolidated)')]):
and filters.get("group_by") in [_('Group by Voucher')]):
frappe.throw(_("Can not filter based on Voucher No, if grouped by Voucher"))
if filters.from_date > filters.to_date:
@ -101,7 +101,7 @@ def set_account_currency(filters):
frappe.db.get_value(filters.party_type, filters.party[0], "default_currency"))
filters["account_currency"] = account_currency or filters.company_currency
if filters.account_currency != filters.company_currency:
if filters.account_currency != filters.company_currency and not filters.presentation_currency:
filters.presentation_currency = filters.account_currency
return filters

View File

@ -135,9 +135,9 @@ class GrossProfitGenerator(object):
row.buying_rate, row.base_rate = 0.0, 0.0
# calculate gross profit
row.gross_profit = row.base_amount - row.buying_amount
row.gross_profit = flt(row.base_amount - row.buying_amount, 3)
if row.base_amount:
row.gross_profit_percent = (row.gross_profit / row.base_amount) * 100.0
row.gross_profit_percent = flt((row.gross_profit / row.base_amount) * 100.0, 3)
else:
row.gross_profit_percent = 0.0
@ -174,8 +174,8 @@ class GrossProfitGenerator(object):
self.grouped_data.append(row)
def set_average_rate(self, new_row):
new_row.gross_profit = new_row.base_amount - new_row.buying_amount
new_row.gross_profit_percent = ((new_row.gross_profit / new_row.base_amount) * 100.0) \
new_row.gross_profit = flt(new_row.base_amount - new_row.buying_amount,3)
new_row.gross_profit_percent = flt(((new_row.gross_profit / new_row.base_amount) * 100.0),3) \
if new_row.base_amount else 0
new_row.buying_rate = (new_row.buying_amount / new_row.qty) if new_row.qty else 0
new_row.base_rate = (new_row.base_amount / new_row.qty) if new_row.qty else 0

View File

@ -193,7 +193,7 @@ def get_invoice_po_pr_map(invoice_list):
pi_items = frappe.db.sql("""
select parent, purchase_order, purchase_receipt, po_detail, project
from `tabPurchase Invoice Item`
where parent in (%s) and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '')
where parent in (%s)
""" % ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
invoice_po_pr_map = {}

View File

@ -47,8 +47,8 @@ class TestSalesPaymentSummary(unittest.TestCase):
pe.submit()
mop = get_mode_of_payments(filters)
self.assertTrue('Credit Card' in mop.values()[0])
self.assertTrue('Cash' in mop.values()[0])
self.assertTrue('Credit Card' in list(mop.values())[0])
self.assertTrue('Cash' in list(mop.values())[0])
# Cancel all Cash payment entry and check if this mode of payment is still fetched.
payment_entries = frappe.get_all("Payment Entry", filters={"mode_of_payment": "Cash", "docstatus": 1}, fields=["name", "docstatus"])
@ -57,8 +57,8 @@ class TestSalesPaymentSummary(unittest.TestCase):
pe.cancel()
mop = get_mode_of_payments(filters)
self.assertTrue('Credit Card' in mop.values()[0])
self.assertTrue('Cash' not in mop.values()[0])
self.assertTrue('Credit Card' in list(mop.values())[0])
self.assertTrue('Cash' not in list(mop.values())[0])
def test_get_mode_of_payments_details(self):
filters = get_filters()
@ -84,7 +84,7 @@ class TestSalesPaymentSummary(unittest.TestCase):
mopd = get_mode_of_payment_details(filters)
mopd_values = mopd.values()[0]
mopd_values = list(mopd.values())[0]
for mopd_value in mopd_values:
if mopd_value[0] == "Credit Card":
cc_init_amount = mopd_value[1]
@ -96,7 +96,7 @@ class TestSalesPaymentSummary(unittest.TestCase):
pe.cancel()
mopd = get_mode_of_payment_details(filters)
mopd_values = mopd.values()[0]
mopd_values = list(mopd.values())[0]
for mopd_value in mopd_values:
if mopd_value[0] == "Credit Card":
cc_final_amount = mopd_value[1]

View File

@ -104,7 +104,7 @@ def convert_to_presentation_currency(gl_entries, currency_info):
credit_in_account_currency = flt(entry['credit_in_account_currency'])
account_currency = entry['account_currency']
if account_currency != presentation_currency or (account_currency == presentation_currency and not is_p_or_l_account(account)):
if account_currency != presentation_currency:
value = debit or credit
date = currency_info['report_date'] if not is_p_or_l_account(account) else entry['posting_date']

View File

@ -615,38 +615,26 @@ def get_held_invoices(party_type, party):
return held_invoices
def get_outstanding_invoices(party_type, party, account, condition=None, limit=1000):
def get_outstanding_invoices(party_type, party, account, condition=None, limit=None):
outstanding_invoices = []
precision = frappe.get_precision("Sales Invoice", "outstanding_amount")
precision = frappe.get_precision("Sales Invoice", "outstanding_amount") or 2
if erpnext.get_party_account_type(party_type) == 'Receivable':
dr_or_cr = "debit_in_account_currency - credit_in_account_currency"
payment_dr_or_cr = "payment_gl_entry.credit_in_account_currency - payment_gl_entry.debit_in_account_currency"
payment_dr_or_cr = "credit_in_account_currency - debit_in_account_currency"
else:
dr_or_cr = "credit_in_account_currency - debit_in_account_currency"
payment_dr_or_cr = "payment_gl_entry.debit_in_account_currency - payment_gl_entry.credit_in_account_currency"
payment_dr_or_cr = "debit_in_account_currency - credit_in_account_currency"
invoice = 'Sales Invoice' if erpnext.get_party_account_type(party_type) == 'Receivable' else 'Purchase Invoice'
held_invoices = get_held_invoices(party_type, party)
limit_cond = "limit %s" % (limit or 1000)
limit_cond = "limit %s" % limit if limit else ""
invoice_list = frappe.db.sql("""
select
voucher_no, voucher_type, posting_date, ifnull(sum({dr_or_cr}), 0) as invoice_amount,
(
select ifnull(sum({payment_dr_or_cr}), 0)
from `tabGL Entry` payment_gl_entry
where payment_gl_entry.against_voucher_type = invoice_gl_entry.voucher_type
and if(invoice_gl_entry.voucher_type='Journal Entry',
payment_gl_entry.against_voucher = invoice_gl_entry.voucher_no,
payment_gl_entry.against_voucher = invoice_gl_entry.against_voucher)
and payment_gl_entry.party_type = invoice_gl_entry.party_type
and payment_gl_entry.party = invoice_gl_entry.party
and payment_gl_entry.account = invoice_gl_entry.account
and {payment_dr_or_cr} > 0
) as payment_amount
voucher_no, voucher_type, posting_date, ifnull(sum({dr_or_cr}), 0) as invoice_amount
from
`tabGL Entry` invoice_gl_entry
`tabGL Entry`
where
party_type = %(party_type)s and party = %(party)s
and account = %(account)s and {dr_or_cr} > 0
@ -655,11 +643,9 @@ def get_outstanding_invoices(party_type, party, account, condition=None, limit=1
and (against_voucher = '' or against_voucher is null))
or (voucher_type not in ('Journal Entry', 'Payment Entry')))
group by voucher_type, voucher_no
having (invoice_amount - payment_amount) > 0.005
order by posting_date, name {limit_cond}""".format(
dr_or_cr=dr_or_cr,
invoice = invoice,
payment_dr_or_cr=payment_dr_or_cr,
condition=condition or "",
limit_cond = limit_cond
), {
@ -668,25 +654,46 @@ def get_outstanding_invoices(party_type, party, account, condition=None, limit=1
"account": account,
}, as_dict=True)
for d in invoice_list:
if not d.voucher_type == "Purchase Invoice" or d.voucher_no not in held_invoices:
due_date = frappe.db.get_value(
d.voucher_type, d.voucher_no, "posting_date" if party_type == "Employee" else "due_date")
payment_entries = frappe.db.sql("""
select against_voucher_type, against_voucher,
ifnull(sum({payment_dr_or_cr}), 0) as payment_amount
from `tabGL Entry`
where party_type = %(party_type)s and party = %(party)s
and account = %(account)s
and {payment_dr_or_cr} > 0
and against_voucher is not null and against_voucher != ''
group by against_voucher_type, against_voucher
""".format(payment_dr_or_cr=payment_dr_or_cr), {
"party_type": party_type,
"party": party,
"account": account,
}, as_dict=True)
outstanding_invoices.append(
frappe._dict({
'voucher_no': d.voucher_no,
'voucher_type': d.voucher_type,
'posting_date': d.posting_date,
'invoice_amount': flt(d.invoice_amount),
'payment_amount': flt(d.payment_amount),
'outstanding_amount': flt(d.invoice_amount - d.payment_amount, precision),
'due_date': due_date
})
)
pe_map = frappe._dict()
for d in payment_entries:
pe_map.setdefault((d.against_voucher_type, d.against_voucher), d.payment_amount)
for d in invoice_list:
payment_amount = pe_map.get((d.voucher_type, d.voucher_no), 0)
outstanding_amount = flt(d.invoice_amount - payment_amount, precision)
if outstanding_amount > 0.5 / (10**precision):
if not d.voucher_type == "Purchase Invoice" or d.voucher_no not in held_invoices:
due_date = frappe.db.get_value(
d.voucher_type, d.voucher_no, "posting_date" if party_type == "Employee" else "due_date")
outstanding_invoices.append(
frappe._dict({
'voucher_no': d.voucher_no,
'voucher_type': d.voucher_type,
'posting_date': d.posting_date,
'invoice_amount': flt(d.invoice_amount),
'payment_amount': payment_amount,
'outstanding_amount': outstanding_amount,
'due_date': due_date
})
)
outstanding_invoices = sorted(outstanding_invoices, key=lambda k: k['due_date'] or getdate(nowdate()))
return outstanding_invoices
@ -859,5 +866,3 @@ def get_allow_cost_center_in_entry_of_bs_account():
def generator():
return cint(frappe.db.get_value('Accounts Settings', None, 'allow_cost_center_in_entry_of_bs_account'))
return frappe.local_cache("get_allow_cost_center_in_entry_of_bs_account", (), generator, regenerate_if_none=True)

View File

@ -1812,8 +1812,9 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_from": "company.default_finance_book",
"fieldname": "default_finance_book",
"fieldtype": "Read Only",
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@ -1824,12 +1825,12 @@
"label": "Default Finance Book",
"length": 0,
"no_copy": 0,
"options": "company.default_finance_book",
"options": "Finance Book",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
@ -1882,7 +1883,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-01-15 16:12:48.314196",
"modified": "2019-02-12 11:29:01.747819",
"modified_by": "Administrator",
"module": "Assets",
"name": "Asset",

File diff suppressed because it is too large Load Diff

View File

@ -459,7 +459,7 @@ def make_rm_stock_entry(purchase_order, rm_items):
items_dict = {
rm_item_code: {
"item_name": rm_item_data["item_name"],
"description": item_wh[rm_item_code].get('description'),
"description": item_wh.get(rm_item_code, {}).get('description', ""),
'qty': rm_item_data["qty"],
'from_warehouse': rm_item_data["warehouse"],
'stock_uom': rm_item_data["stock_uom"],

View File

@ -2236,6 +2236,39 @@
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "item_tax_template",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax Template",
"length": 0,
"no_copy": 0,
"options": "Item Tax Template",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
@ -2344,7 +2377,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2019-01-07 16:51:57.546323",
"modified": "2018-11-23 16:53:57.220731",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order Item",
@ -2359,4 +2392,4 @@
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}
}

View File

@ -214,6 +214,39 @@
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "tax_category",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Tax Category",
"length": 0,
"no_copy": 0,
"options": "Tax Category",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
@ -1496,7 +1529,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-01-17 13:58:08.597792",
"modified": "2019-01-17 13:58:08.597793",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier",
@ -1647,4 +1680,4 @@
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}
}

View File

@ -39,5 +39,11 @@
"company": "_Test Company",
"account": "_Test Payable USD - _TC"
}]
},
{
"doctype": "Supplier",
"supplier_name": "_Test Supplier With Tax Category",
"supplier_group": "_Test Supplier Group",
"tax_category": "_Test Tax Category 1"
}
]

View File

@ -90,3 +90,33 @@ class TestSupplier(unittest.TestCase):
supplier.country = 'Greece'
supplier.save()
self.assertEqual(supplier.country, "Greece")
def test_party_details_tax_category(self):
from erpnext.accounts.party import get_party_details
frappe.delete_doc_if_exists("Address", "_Test Address With Tax Category-Billing")
# Tax Category without Address
details = get_party_details("_Test Supplier With Tax Category", party_type="Supplier")
self.assertEqual(details.tax_category, "_Test Tax Category 1")
address = frappe.get_doc(dict(
doctype='Address',
address_title='_Test Address With Tax Category',
tax_category='_Test Tax Category 2',
address_type='Billing',
address_line1='Station Road',
city='_Test City',
country='India',
links=[dict(
link_doctype='Supplier',
link_name='_Test Supplier With Tax Category'
)]
)).insert()
# Tax Category with Address
details = get_party_details("_Test Supplier With Tax Category", party_type="Supplier")
self.assertEqual(details.tax_category, "_Test Tax Category 2")
# Rollback
address.delete()

View File

@ -1198,8 +1198,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "",
"fieldname": "taxes_and_charges",
"fieldname": "tax_category",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
@ -1208,13 +1207,12 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
"label": "Tax Category",
"length": 0,
"no_copy": 1,
"oldfieldname": "purchase_other_charges",
"oldfieldtype": "Link",
"options": "Purchase Taxes and Charges Template",
"no_copy": 0,
"options": "Tax Category",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
@ -1321,6 +1319,41 @@
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "",
"fieldname": "taxes_and_charges",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Taxes and Charges Template",
"length": 0,
"no_copy": 1,
"oldfieldname": "purchase_other_charges",
"oldfieldtype": "Link",
"options": "Purchase Taxes and Charges Template",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
@ -2845,7 +2878,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2019-01-07 16:52:01.505553",
"modified": "2018-12-27 02:08:16.421501",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation",
@ -2959,4 +2992,4 @@
"track_changes": 0,
"track_seen": 0,
"track_views": 0
}
}

View File

@ -1,12 +1,13 @@
{
"add_total_row": 0,
"add_total_row": 1,
"creation": "2018-10-05 16:08:24.156448",
"disable_prepared_report": 0,
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 0,
"is_standard": "Yes",
"modified": "2018-10-05 16:08:33.272201",
"modified": "2019-02-12 14:32:29.107109",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Analytics",

View File

@ -6,238 +6,45 @@ import frappe
def get_data():
config = [
{
"label": _("Billing"),
"label": _("Masters and Accounts"),
"items": [
{
"type": "doctype",
"name": "Sales Invoice",
"description": _("Bills raised to Customers.")
"name": "Item",
"onboard": 1,
},
{
"type": "doctype",
"name": "Purchase Invoice",
"description": _("Bills raised by Suppliers.")
"name": "Customer",
"description": _("Customer database."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Payment Request",
"description": _("Payment Request")
"name": "Supplier",
"description": _("Supplier database."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Payment Entry",
"description": _("Bank/Cash transactions against party or for internal transfer")
}
]
},
{
"label": _("Company and Accounts"),
"items": [
{
"type": "doctype",
"name": "Company",
"description": _("Company (not Customer or Supplier) master.")
},
{
"type": "doctype",
"name": "Journal Entry",
"description": _("Accounting journal entries.")
"description": _("Company (not Customer or Supplier) master."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Account",
"icon": "fa fa-sitemap",
"label": _("Chart of Accounts"),
"route": "Tree/Account",
"route": "#Tree/Account",
"description": _("Tree of financial accounts."),
},
{
"type": "report",
"name": "General Ledger",
"doctype": "GL Entry",
"is_query_report": True,
},
]
},
{
"label": _("Masters"),
"items": [
{
"type": "doctype",
"name": "Customer",
"description": _("Customer database.")
"onboard": 1,
},
{
"type": "doctype",
"name": "Supplier",
"description": _("Supplier database.")
},
{
"type": "doctype",
"name": "Item",
}
]
},
{
"label": _("Accounting Statements"),
"items": [
{
"type": "report",
"name": "Accounts Receivable",
"doctype": "Sales Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Accounts Payable",
"doctype": "Purchase Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Trial Balance",
"doctype": "GL Entry",
"is_query_report": True,
},
{
"type": "report",
"name": "Balance Sheet",
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "report",
"name": "Cash Flow",
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "report",
"name": "Profit and Loss Statement",
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "report",
"name": "Consolidated Financial Statement",
"doctype": "GL Entry",
"is_query_report": True
},
]
},
{
"label": _("Banking and Payments"),
"items": [
{
"type": "doctype",
"label": _("Update Bank Transaction Dates"),
"name": "Bank Reconciliation",
"description": _("Update bank payment dates with journals.")
},
{
"type": "doctype",
"label": _("Match Payments with Invoices"),
"name": "Payment Reconciliation",
"description": _("Match non-linked Invoices and Payments.")
},
{
"type": "report",
"name": "Bank Reconciliation Statement",
"is_query_report": True,
"doctype": "Journal Entry"
},
{
"type": "report",
"name": "Bank Clearance Summary",
"is_query_report": True,
"doctype": "Journal Entry"
},
{
"type": "doctype",
"name": "Bank Guarantee",
"doctype": "Bank Guarantee"
},
]
},
{
"label": _("Taxes"),
"items": [
{
"type": "doctype",
"name": "Sales Taxes and Charges Template",
"description": _("Tax template for selling transactions.")
},
{
"type": "doctype",
"name": "Purchase Taxes and Charges Template",
"description": _("Tax template for buying transactions.")
},
{
"type": "doctype",
"name": "Tax Rule",
"description": _("Tax Rule for transactions.")
},
{
"type": "doctype",
"name": "Tax Withholding Category",
"description": _("Tax Withholding rates to be applied on transactions.")
},
{
"type": "report",
"name": "Sales Register",
"doctype": "Sales Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Purchase Register",
"doctype": "Purchase Invoice",
"is_query_report": True
},
]
},
{
"label": _("Budget and Cost Center"),
"items": [
{
"type": "doctype",
"name": "Cost Center",
"icon": "fa fa-sitemap",
"label": _("Chart of Cost Centers"),
"route": "Tree/Cost Center",
"description": _("Tree of financial Cost Centers."),
},
{
"type": "doctype",
"name": "Budget",
"description": _("Define budget for a financial year.")
},
{
"type": "report",
"name": "Budget Variance Report",
"is_query_report": True,
"doctype": "Cost Center"
},
{
"type": "doctype",
"name": "Monthly Distribution",
"description": _("Seasonality for setting budgets, targets etc.")
},
]
},
{
"label": _("Tools"),
"items": [
{
"type": "doctype",
"name": "Period Closing Voucher",
"description": _("Close Balance Sheet and book Profit or Loss.")
},
{
"type": "doctype",
"name": "Cheque Print Template",
"description": _("Setup cheque dimensions for printing")
"name": "Journal Entry",
"description": _("Accounting journal entries."),
"onboard": 1,
},
{
"type": "doctype",
@ -247,7 +54,61 @@ def get_data():
]
},
{
"label": _("Setup"),
"label": _("Billing"),
"items": [
{
"type": "doctype",
"name": "Sales Invoice",
"description": _("Bills raised to Customers."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Purchase Invoice",
"description": _("Bills raised by Suppliers."),
"onboard": 1
},
{
"type": "doctype",
"name": "Payment Request",
"description": _("Payment Request"),
},
{
"type": "doctype",
"name": "Payment Entry",
"description": _("Bank/Cash transactions against party or for internal transfer")
},
# Reports
{
"type": "report",
"name": "Ordered Items To Be Billed",
"is_query_report": True,
"reference_doctype": "Sales Invoice"
},
{
"type": "report",
"name": "Delivered Items To Be Billed",
"is_query_report": True,
"reference_doctype": "Sales Invoice"
},
{
"type": "report",
"name": "Purchase Order Items To Be Billed",
"is_query_report": True,
"reference_doctype": "Purchase Invoice"
},
{
"type": "report",
"name": "Received Items To Be Billed",
"is_query_report": True,
"reference_doctype": "Purchase Invoice"
},
]
},
{
"label": _("Settings"),
"icon": "fa fa-cog",
"items": [
{
@ -297,41 +158,222 @@ def get_data():
"name": "C-Form",
"description": _("C-Form records"),
"country": "India"
},
{
"type": "doctype",
"name": "Cheque Print Template",
"description": _("Setup cheque dimensions for printing")
},
]
},
{
"label": _("Financial Statements"),
"items": [
{
"type": "report",
"name": "General Ledger",
"doctype": "GL Entry",
"is_query_report": True,
},
{
"type": "report",
"name": "Accounts Receivable",
"doctype": "Sales Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Accounts Payable",
"doctype": "Purchase Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Trial Balance",
"doctype": "GL Entry",
"is_query_report": True,
},
{
"type": "report",
"name": "Balance Sheet",
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "report",
"name": "Cash Flow",
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "report",
"name": "Profit and Loss Statement",
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "report",
"name": "Consolidated Financial Statement",
"doctype": "GL Entry",
"is_query_report": True
},
]
},
{
"label": _("Banking and Payments"),
"items": [
{
"type": "doctype",
"label": _("Bank"),
"name": "Bank",
},
{
"type": "doctype",
"label": _("Bank Account"),
"name": "Bank Account",
},
{
"type": "doctype",
"label": _("Bank Statement Transaction Entry List"),
"name": "Bank Statement Transaction Entry",
"route": "#List/Bank Statement Transaction Entry",
},
{
"type": "doctype",
"label": _("Bank Statement Transaction Entry Report"),
"name": "Bank Statement Transaction Entry",
"route": "#Report/Bank Statement Transaction Entry",
},
{
"type": "doctype",
"label": _("Bank Statement Settings"),
"name": "Bank Statement Settings",
},
{
"type": "doctype",
"label": _("Update Bank Transaction Dates"),
"name": "Bank Reconciliation",
"description": _("Update bank payment dates with journals.")
},
{
"type": "doctype",
"label": _("Match Payments with Invoices"),
"name": "Payment Reconciliation",
"description": _("Match non-linked Invoices and Payments.")
},
{
"type": "report",
"name": "Bank Reconciliation Statement",
"is_query_report": True,
"doctype": "Journal Entry"
},
{
"type": "report",
"name": "Bank Clearance Summary",
"is_query_report": True,
"doctype": "Journal Entry"
},
{
"type": "doctype",
"name": "Bank Guarantee",
"doctype": "Bank Guarantee"
},
]
},
{
"label": _("Cost Center and Budgeting"),
"items": [
{
"type": "doctype",
"name": "Cost Center",
"icon": "fa fa-sitemap",
"label": _("Chart of Cost Centers"),
"route": "#Tree/Cost Center",
"description": _("Tree of financial Cost Centers."),
},
{
"type": "doctype",
"name": "Budget",
"description": _("Define budget for a financial year.")
},
{
"type": "report",
"name": "Budget Variance Report",
"is_query_report": True,
"doctype": "Cost Center"
},
{
"type": "doctype",
"name": "Monthly Distribution",
"description": _("Seasonality for setting budgets, targets etc.")
},
{
"type": "doctype",
"name": "Period Closing Voucher",
"description": _("Close Balance Sheet and book Profit or Loss.")
},
]
},
{
"label": _("Taxes"),
"items": [
{
"type": "doctype",
"name": "Tax Category",
"description": _("Tax Category for overriding tax rates.")
},
{
"type": "doctype",
"name": "Sales Taxes and Charges Template",
"description": _("Tax template for selling transactions.")
},
{
"type": "doctype",
"name": "Purchase Taxes and Charges Template",
"description": _("Tax template for buying transactions.")
},
{
"type": "doctype",
"name": "Item Tax Template",
"description": _("Tax template for item tax rates.")
},
{
"type": "doctype",
"name": "Tax Rule",
"description": _("Tax Rule for transactions.")
},
{
"type": "doctype",
"name": "Tax Withholding Category",
"description": _("Tax Withholding rates to be applied on transactions.")
},
]
},
{
"label": _("Subscription Management"),
"icon": "fa fa-microchip ",
"items": [
{
"type": "doctype",
"name": "Subscriber",
},
{
"type": "doctype",
"name": "Subscription Plan",
},
{
"type": "doctype",
"name": "Subscription"
},
{
"type": "doctype",
"name": "Subscription Settings"
}
]
},
{
"label": _("To Bill"),
"items": [
{
"type": "report",
"name": "Ordered Items To Be Billed",
"is_query_report": True,
"doctype": "Sales Invoice"
},
{
"type": "report",
"name": "Delivered Items To Be Billed",
"is_query_report": True,
"doctype": "Sales Invoice"
},
{
"type": "report",
"name": "Purchase Order Items To Be Billed",
"is_query_report": True,
"doctype": "Purchase Invoice"
},
{
"type": "report",
"name": "Received Items To Be Billed",
"is_query_report": True,
"doctype": "Purchase Invoice"
},
]
},
{
"label": _("Analytics"),
"label": _("Key Reports"),
"items": [
{
"type": "report",
@ -339,6 +381,18 @@ def get_data():
"doctype": "Sales Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Sales Register",
"doctype": "Sales Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Purchase Register",
"doctype": "Purchase Invoice",
"is_query_report": True
},
{
"type": "report",
"name": "Purchase Invoice Trends",
@ -487,6 +541,7 @@ def get_data():
]
}
]
gst = {
"label": _("Goods and Services Tax (GST India)"),
"items": [
@ -530,74 +585,11 @@ def get_data():
},
]
}
retail = {
"label": _("Retail Operations"),
"items": [
{
"type": "page",
"name": "pos",
"label": _("POS"),
"description": _("Point of Sale")
},
{
"type": "doctype",
"name": "Cashier Closing",
"description": _("Cashier Closing")
},
{
"type": "doctype",
"name": "POS Settings",
"description": _("Setup mode of POS (Online / Offline)")
},
{
"type": "doctype",
"name": "POS Profile",
"label": _("Point-of-Sale Profile"),
"description": _("Setup default values for POS Invoices")
},
{
"type": "doctype",
"name": "Loyalty Program",
"label": _("Loyalty Program"),
"description": _("To make Customer based incentive schemes.")
},
{
"type": "doctype",
"name": "Loyalty Point Entry",
"label": _("Loyalty Point Entry"),
"description": _("To view logs of Loyalty Points assigned to a Customer.")
}
]
}
subscriptions = {
"label": _("Subscription Management"),
"icon": "fa fa-microchip ",
"items": [
{
"type": "doctype",
"name": "Subscription Plan",
},
{
"type": "doctype",
"name": "Subscription"
},
{
"type": "doctype",
"name": "Subscription Settings"
}
]
}
countries = frappe.get_all("Company", fields="country")
countries = [country["country"] for country in countries]
if "India" in countries:
config.insert(7, gst)
domains = frappe.get_active_domains()
if "Retail" in domains:
config.insert(2, retail)
else:
config.insert(7, retail)
if "Services" in domains:
config.insert(2, subscriptions)
else:
config.insert(7, subscriptions)
return config

View File

@ -9,14 +9,17 @@ def get_data():
{
"type": "doctype",
"name": "Crop",
"onboard": 1,
},
{
"type": "doctype",
"name": "Crop Cycle",
"onboard": 1,
},
{
"type": "doctype",
"name": "Location"
"name": "Location",
"onboard": 1,
}
]
},
@ -26,10 +29,12 @@ def get_data():
{
"type": "doctype",
"name": "Disease",
"onboard": 1,
},
{
"type": "doctype",
"name": "Fertilizer",
"onboard": 1,
}
]
},

View File

@ -9,19 +9,27 @@ def get_data():
{
"type": "doctype",
"name": "Asset",
"onboard": 1,
},
{
"type": "doctype",
"name": "Location",
"onboard": 1,
},
{
"type": "doctype",
"name": "Asset Category",
"onboard": 1,
},
{
"type": "doctype",
"name": "Asset Settings",
}
},
{
"type": "doctype",
"name": "Asset Movement",
"description": _("Transfer an asset from one warehouse to another")
},
]
},
{
@ -30,36 +38,34 @@ def get_data():
{
"type": "doctype",
"name": "Asset Maintenance Team",
"onboard": 1,
},
{
"type": "doctype",
"name": "Asset Maintenance",
"onboard": 1,
"dependencies": ["Asset Maintenance Team"],
},
{
"type": "doctype",
"name": "Asset Maintenance Tasks",
"onboard": 1,
"dependencies": ["Asset Maintenance"],
},
{
"type": "doctype",
"name": "Asset Maintenance Log",
"dependencies": ["Asset Maintenance"],
},
{
"type": "doctype",
"name": "Asset Value Adjustment",
"dependencies": ["Asset"],
},
{
"type": "doctype",
"name": "Asset Repair",
},
]
},
{
"label": _("Tools"),
"items": [
{
"type": "doctype",
"name": "Asset Movement",
"description": _("Transfer an asset from one warehouse to another")
"dependencies": ["Asset"],
},
]
},
@ -72,17 +78,20 @@ def get_data():
"name": "Asset Depreciation Ledger",
"doctype": "Asset",
"is_query_report": True,
"dependencies": ["Asset"],
},
{
"type": "report",
"name": "Asset Depreciations and Balances",
"doctype": "Asset",
"is_query_report": True,
"dependencies": ["Asset"],
},
{
"type": "report",
"name": "Asset Maintenance",
"doctype": "Asset Maintenance"
"doctype": "Asset Maintenance",
"dependencies": ["Asset Maintenance"]
},
]
}

View File

@ -7,25 +7,96 @@ def get_data():
"label": _("Purchasing"),
"icon": "fa fa-star",
"items": [
{
"type": "doctype",
"name": "Purchase Order",
"onboard": 1,
"dependencies": ["Item", "Supplier"],
"description": _("Purchase Orders given to Suppliers."),
},
{
"type": "doctype",
"name": "Material Request",
"onboard": 1,
"dependencies": ["Item"],
"description": _("Request for purchase."),
},
{
"type": "doctype",
"name": "Request for Quotation",
"onboard": 1,
"dependencies": ["Item", "Supplier"],
"description": _("Request for quotation."),
},
{
"type": "doctype",
"name": "Supplier Quotation",
"dependencies": ["Item", "Supplier"],
"description": _("Quotations received from Suppliers."),
},
]
},
{
"label": _("Items and Pricing"),
"items": [
{
"type": "doctype",
"name": "Item",
"onboard": 1,
"description": _("All Products or Services."),
},
{
"type": "doctype",
"name": "Purchase Order",
"description": _("Purchase Orders given to Suppliers."),
"name": "Item Price",
"description": _("Multiple Item prices."),
"onboard": 1,
"route": "#Report/Item Price"
},
{
"type": "doctype",
"name": "Price List",
"description": _("Price List master.")
},
{
"type": "doctype",
"name": "Product Bundle",
"description": _("Bundle items at time of sale."),
},
{
"type": "doctype",
"name": "Item Group",
"icon": "fa fa-sitemap",
"label": _("Item Group"),
"link": "Tree/Item Group",
"description": _("Tree of Item Groups."),
},
{
"type": "doctype",
"name": "Pricing Rule",
"description": _("Rules for applying pricing and discount.")
},
]
},
{
"label": _("Settings"),
"icon": "fa fa-cog",
"items": [
{
"type": "doctype",
"name": "Buying Settings",
"settings": 1,
"description": _("Default settings for buying transactions.")
},
{
"type": "doctype",
"name": "Purchase Taxes and Charges Template",
"description": _("Tax template for buying transactions.")
},
{
"type": "doctype",
"name":"Terms and Conditions",
"label": _("Terms and Conditions Template"),
"description": _("Template of terms or contract.")
},
]
},
@ -35,6 +106,7 @@ def get_data():
{
"type": "doctype",
"name": "Supplier",
"onboard": 1,
"description": _("Supplier database."),
},
{
@ -56,88 +128,36 @@ def get_data():
]
},
{
"label": _("Setup"),
"icon": "fa fa-cog",
"items": [
{
"type": "doctype",
"name": "Buying Settings",
"description": _("Default settings for buying transactions.")
},
{
"type": "doctype",
"name":"Terms and Conditions",
"label": _("Terms and Conditions Template"),
"description": _("Template of terms or contract.")
},
{
"type": "doctype",
"name": "Purchase Taxes and Charges Template",
"description": _("Tax template for buying transactions.")
},
]
},
{
"label": _("Items and Pricing"),
"items": [
{
"type": "doctype",
"name": "Item",
"description": _("All Products or Services."),
},
{
"type": "doctype",
"name": "Product Bundle",
"description": _("Bundle items at time of sale."),
},
{
"type": "doctype",
"name": "Price List",
"description": _("Price List master.")
},
{
"type": "doctype",
"name": "Item Group",
"icon": "fa fa-sitemap",
"label": _("Item Group"),
"link": "Tree/Item Group",
"description": _("Tree of Item Groups."),
},
{
"type": "doctype",
"name": "Item Price",
"description": _("Multiple Item prices."),
"route": "Report/Item Price"
},
{
"type": "doctype",
"name": "Pricing Rule",
"description": _("Rules for applying pricing and discount.")
},
]
},
{
"label": _("Analytics"),
"label": _("Key Reports"),
"icon": "fa fa-table",
"items": [
{
"type": "report",
"is_query_report": True,
"name": "Purchase Analytics",
"doctype": "Purchase Order"
"reference_doctype": "Purchase Order",
"onboard": 1
},
{
"type": "report",
"is_query_report": True,
"name": "Supplier-Wise Sales Analytics",
"doctype": "Stock Ledger Entry"
"reference_doctype": "Stock Ledger Entry",
"onboard": 1
},
{
"type": "report",
"is_query_report": True,
"name": "Purchase Order Trends",
"doctype": "Purchase Order"
"reference_doctype": "Purchase Order",
"onboard": 1,
},
{
"type": "report",
"is_query_report": True,
"name": "Requested Items To Be Ordered",
"reference_doctype": "Material Request",
"onboard": 1,
},
]
},
@ -175,32 +195,28 @@ def get_data():
"type": "report",
"is_query_report": True,
"name": "Items To Be Requested",
"doctype": "Item"
},
{
"type": "report",
"is_query_report": True,
"name": "Requested Items To Be Ordered",
"doctype": "Material Request"
},
{
"type": "report",
"is_query_report": True,
"name": "Material Requests for which Supplier Quotations are not created",
"doctype": "Material Request"
"reference_doctype": "Item",
"onboard": 1,
},
{
"type": "report",
"is_query_report": True,
"name": "Item-wise Purchase History",
"doctype": "Item"
"reference_doctype": "Item",
"onboard": 1,
},
{
"type": "report",
"is_query_report": True,
"name": "Material Requests for which Supplier Quotations are not created",
"reference_doctype": "Material Request"
},
{
"type": "report",
"is_query_report": True,
"name": "Address And Contacts",
"label": "Supplier Addresses And Contacts",
"doctype": "Address",
"reference_doctype": "Address",
"route_options": {
"party_type": "Supplier"
}

View File

@ -11,21 +11,35 @@ def get_data():
"type": "doctype",
"name": "Lead",
"description": _("Database of potential customers."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Opportunity",
"description": _("Potential opportunities for selling."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Customer",
"description": _("Customer database."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Contact",
"description": _("All Contacts."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Communication",
"description": _("Record of all communications of type email, phone, chat, visit, etc."),
},
{
"type": "doctype",
"name": "Lead Source",
"description": _("Track Leads by Lead Source.")
},
]
},
@ -37,72 +51,64 @@ def get_data():
"type": "report",
"is_query_report": True,
"name": "Lead Details",
"doctype": "Lead"
"doctype": "Lead",
"onboard": 1,
},
{
"type": "page",
"name": "sales-funnel",
"label": _("Sales Funnel"),
"icon": "fa fa-bar-chart",
"onboard": 1,
},
{
"type": "report",
"name": "Prospects Engaged But Not Converted",
"doctype": "Lead",
"is_query_report": True
"is_query_report": True,
"onboard": 1,
},
{
"type": "report",
"name": "Minutes to First Response for Opportunity",
"doctype": "Opportunity",
"is_query_report": True
"is_query_report": True,
"dependencies": ["Opportunity"]
},
{
"type": "report",
"is_query_report": True,
"name": "Customer Addresses And Contacts",
"doctype": "Contact"
"doctype": "Contact",
"dependencies": ["Customer"]
},
{
"type": "report",
"is_query_report": True,
"name": "Inactive Customers",
"doctype": "Sales Order"
"doctype": "Sales Order",
"dependencies": ["Sales Order"]
},
{
"type": "report",
"is_query_report": True,
"name": "Campaign Efficiency",
"doctype": "Lead"
"doctype": "Lead",
"dependencies": ["Lead"]
},
{
"type": "report",
"is_query_report": True,
"name": "Lead Owner Efficiency",
"doctype": "Lead"
"doctype": "Lead",
"dependencies": ["Lead"]
}
]
},
{
"label": _("Communication"),
"icon": "fa fa-star",
"items": [
{
"type": "doctype",
"name": "Communication",
"description": _("Record of all communications of type email, phone, chat, visit, etc."),
},
]
},
{
"label": _("Setup"),
"label": _("Settings"),
"icon": "fa fa-cog",
"items": [
{
"type": "doctype",
"name": "Campaign",
"description": _("Sales campaigns."),
},
{
"type": "doctype",
"label": _("Customer Group"),
@ -110,6 +116,7 @@ def get_data():
"icon": "fa fa-sitemap",
"link": "Tree/Customer Group",
"description": _("Manage Customer Group Tree."),
"onboard": 1,
},
{
"type": "doctype",
@ -118,6 +125,7 @@ def get_data():
"icon": "fa fa-sitemap",
"link": "Tree/Territory",
"description": _("Manage Territory Tree."),
"onboard": 1,
},
{
"type": "doctype",
@ -126,18 +134,13 @@ def get_data():
"icon": "fa fa-sitemap",
"link": "Tree/Sales Person",
"description": _("Manage Sales Person Tree."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Lead Source",
"description": _("Track Leads by Lead Source.")
"name": "Campaign",
"description": _("Sales campaigns."),
},
]
},
{
"label": _("SMS"),
"icon": "fa fa-wrench",
"items": [
{
"type": "doctype",
"name": "SMS Center",
@ -156,18 +159,46 @@ def get_data():
]
},
{
"label": _("Help"),
"label": _("Maintenance"),
"icon": "fa fa-star",
"items": [
{
"type": "help",
"label": _("Lead to Quotation"),
"youtube_id": "TxYX4r4JAKA"
"type": "doctype",
"name": "Maintenance Schedule",
"description": _("Plan for maintenance visits."),
"onboard": 1,
},
{
"type": "help",
"label": _("Newsletters"),
"youtube_id": "muLKsCrrDRo"
"type": "doctype",
"name": "Maintenance Visit",
"description": _("Visit report for maintenance call."),
},
{
"type": "report",
"name": "Maintenance Schedules",
"is_query_report": True,
"doctype": "Maintenance Schedule"
},
{
"type": "doctype",
"name": "Warranty Claim",
"description": _("Warranty Claim against Serial No."),
},
]
},
# {
# "label": _("Help"),
# "items": [
# {
# "type": "help",
# "label": _("Lead to Quotation"),
# "youtube_id": "TxYX4r4JAKA"
# },
# {
# "type": "help",
# "label": _("Newsletters"),
# "youtube_id": "muLKsCrrDRo"
# },
# ]
# },
]

View File

@ -5,572 +5,207 @@ from frappe import _
def get_data():
return [
# Modules
{
"module_name": "Item",
"_doctype": "Item",
"color": "#f39c12",
"icon": "octicon octicon-package",
"type": "link",
"link": "List/Item"
},
{
"module_name": "Customer",
"_doctype": "Customer",
"module_name": "Getting Started",
"category": "Modules",
"label": _("Getting Started"),
"color": "#1abc9c",
"icon": "octicon octicon-tag",
"type": "link",
"link": "List/Customer"
},
{
"module_name": "Supplier",
"_doctype": "Supplier",
"color": "#c0392b",
"icon": "octicon octicon-briefcase",
"type": "link",
"link": "List/Supplier"
},
{
"_doctype": "Employee",
"module_name": "Employee",
"color": "#2ecc71",
"icon": "octicon octicon-organization",
"type": "link",
"link": "List/Employee"
},
{
"module_name": "Projects",
"color": "#8e44ad",
"icon": "octicon octicon-rocket",
"icon": "fa fa-check-square-o",
"type": "module",
"disable_after_onboard": 1,
"description": "Dive into the basics for your organisation's needs.",
"onboard_present": 1
},
{
"module_name": "Issue",
"color": "#2c3e50",
"icon": "octicon octicon-issue-opened",
"_doctype": "Issue",
"type": "link",
"link": "List/Issue"
},
{
"module_name": "Lead",
"icon": "octicon octicon-broadcast",
"_doctype": "Lead",
"type": "link",
"link": "List/Lead"
},
{
"module_name": "Profit and Loss Statement",
"_doctype": "Account",
"color": "#3498db",
"icon": "octicon octicon-repo",
"type": "link",
"link": "query-report/Profit and Loss Statement"
},
# old
{
"module_name": "Accounting",
"category": "Modules",
"label": _("Accounting"),
"module_name": "Accounts",
"color": "#3498db",
"icon": "octicon octicon-repo",
"type": "module",
"hidden": 1
},
{
"module_name": "Stock",
"color": "#f39c12",
"icon": "octicon octicon-package",
"type": "module",
"hidden": 1
},
{
"module_name": "CRM",
"color": "#EF4DB6",
"icon": "octicon octicon-broadcast",
"type": "module",
"hidden": 1
"description": "Accounts, billing, payments, cost center and budgeting."
},
{
"module_name": "Selling",
"category": "Modules",
"label": _("Selling"),
"color": "#1abc9c",
"icon": "octicon octicon-tag",
"type": "module",
"hidden": 1
"description": "Sales orders, quotations, customers and items."
},
{
"module_name": "Buying",
"category": "Modules",
"label": _("Buying"),
"color": "#c0392b",
"icon": "octicon octicon-briefcase",
"type": "module",
"hidden": 1
"description": "Purchasing, suppliers, material requests, and items."
},
{
"module_name": "Stock",
"category": "Modules",
"label": _("Stock"),
"color": "#f39c12",
"icon": "octicon octicon-package",
"type": "module",
"description": "Stock transactions, reports, serial numbers and batches."
},
{
"module_name": "Assets",
"category": "Modules",
"label": _("Assets"),
"color": "#4286f4",
"icon": "octicon octicon-database",
"type": "module",
"description": "Asset movement, maintainance and tools."
},
{
"module_name": "Projects",
"category": "Modules",
"label": _("Projects"),
"color": "#8e44ad",
"icon": "octicon octicon-rocket",
"type": "module",
"description": "Updates, Timesheets and Activities."
},
{
"module_name": "CRM",
"category": "Modules",
"label": _("CRM"),
"color": "#EF4DB6",
"icon": "octicon octicon-broadcast",
"type": "module",
"description": "Sales pipeline, leads, opportunities and customers."
},
{
"module_name": "Help Desk",
"category": "Modules",
"label": _("Help Desk"),
"color": "#1abc9c",
"icon": "fa fa-check-square-o",
"type": "module",
"description": "User interactions, support issues and knowledge base."
},
{
"module_name": "HR",
"category": "Modules",
"label": _("Human Resources"),
"color": "#2ecc71",
"icon": "octicon octicon-organization",
"label": _("Human Resources"),
"type": "module",
"hidden": 1
"description": "Employees, attendance, payroll, leaves and shifts."
},
{
"module_name": "Quality Management",
"category": "Modules",
"label": _("Quality"),
"color": "#1abc9c",
"icon": "fa fa-check-square-o",
"type": "module",
"description": "Quality goals, procedures, reviews and action."
},
# Category: "Domains"
{
"module_name": "Manufacturing",
"category": "Domains",
"label": _("Manufacturing"),
"color": "#7f8c8d",
"icon": "octicon octicon-tools",
"type": "module",
"hidden": 1
"description": "BOMS, work orders, operations, and timesheets."
},
{
"module_name": "POS",
"color": "#589494",
"module_name": "Retail",
"category": "Domains",
"label": _("Retail"),
"color": "#7f8c8d",
"icon": "octicon octicon-credit-card",
"type": "page",
"link": "pos",
"label": _("POS")
},
{
"module_name": "Leaderboard",
"color": "#589494",
"icon": "octicon octicon-graph",
"type": "page",
"link": "leaderboard",
"label": _("Leaderboard")
},
{
"module_name": "Support",
"color": "#2c3e50",
"icon": "octicon octicon-issue-opened",
"type": "module",
"hidden": 1
"description": "Point of Sale and cashier closing."
},
{
"module_name": "Education",
"category": "Domains",
"label": _("Education"),
"color": "#428B46",
"icon": "octicon octicon-mortar-board",
"type": "module",
"description": "Student admissions, fees, courses and scores."
},
{
"module_name": "Healthcare",
"category": "Domains",
"label": _("Healthcare"),
"color": "#FF888B",
"icon": "fa fa-heartbeat",
"type": "module",
"description": "Patient appointments, procedures and tests."
},
{
"module_name": "Agriculture",
"category": "Domains",
"label": _("Agriculture"),
"color": "#8BC34A",
"icon": "octicon octicon-globe",
"type": "module",
"description": "Crop cycles, land areas, soil and plant analysis."
},
{
"module_name": "Hotels",
"category": "Domains",
"label": _("Hotels"),
"color": "#EA81E8",
"icon": "fa fa-bed",
"type": "module",
"description": "Hotel rooms, pricing, reservation and amenities."
},
{
"module_name": "Non Profit",
"category": "Domains",
"label": _("Non Profit"),
"color": "#DE2B37",
"icon": "octicon octicon-heart",
"type": "module",
"description": "Volunteers, memberships, grants and chapters."
},
{
"module_name": "Restaurant",
"category": "Domains",
"label": _("Restaurant"),
"color": "#EA81E8",
"icon": "fa fa-cutlery",
"_doctype": "Restaurant",
"type": "module",
"link": "List/Restaurant",
"description": "Menu, Orders and Table Reservations."
},
{
"module_name": "Help",
"category": "Administration",
"label": _("Learn"),
"color": "#FF888B",
"icon": "octicon octicon-device-camera-video",
"type": "module",
"is_help": True,
"label": _("Help"),
"hidden": 1
"description": "Explore Help Articles and Videos."
},
{
"module_name": "Maintenance",
"color": "#FF888B",
"icon": "octicon octicon-tools",
"type": "module",
"label": _("Maintenance"),
"hidden": 1
"module_name": 'Marketplace',
"category": "Places",
"label": _('Marketplace'),
"icon": "octicon octicon-star",
"type": 'link',
"link": '#marketplace/home',
"color": '#FF4136',
'standard': 1,
"description": "Publish items to other ERPNext users."
},
{
"module_name": "Student",
"color": "#c0392b",
"icon": "octicon octicon-person",
"label": _("Student"),
"link": "List/Student",
"_doctype": "Student",
"type": "list",
"hidden": 1
},
{
"module_name": "Student Group",
"color": "#d59919",
"icon": "octicon octicon-organization",
"label": _("Student Group"),
"link": "List/Student Group",
"_doctype": "Student Group",
"type": "list",
"hidden": 1
},
{
"module_name": "Course Schedule",
"color": "#fd784f",
"icon": "octicon octicon-calendar",
"label": _("Course Schedule"),
"link": "List/Course Schedule/Calendar",
"_doctype": "Course Schedule",
"type": "list",
"hidden": 1
},
{
"module_name": "Student Attendance Tool",
"color": "#C0392B",
"icon": "octicon octicon-checklist",
"label": _("Student Attendance Tool"),
"link": "List/Student Attendance Tool",
"_doctype": "Student Attendance Tool",
"type": "list",
"hidden": 1
},
{
"module_name": "Course",
"color": "#8e44ad",
"icon": "octicon octicon-book",
"label": _("Course"),
"link": "List/Course",
"_doctype": "Course",
"type": "list",
"hidden": 1
},
{
"module_name": "Program",
"color": "#9b59b6",
"icon": "octicon octicon-repo",
"label": _("Program"),
"link": "List/Program",
"_doctype": "Program",
"type": "list",
"hidden": 1
},
{
"module_name": "Student Applicant",
"color": "#4d927f",
"icon": "octicon octicon-clippy",
"label": _("Student Applicant"),
"link": "List/Student Applicant",
"_doctype": "Student Applicant",
"type": "list",
"hidden": 1
},
{
"module_name": "Fees",
"color": "#83C21E",
"icon": "fa fa-money",
"label": _("Fees"),
"link": "List/Fees",
"_doctype": "Fees",
"type": "list",
"hidden": 1
},
{
"module_name": "Instructor",
"color": "#a99e4c",
"icon": "octicon octicon-broadcast",
"label": _("Instructor"),
"link": "List/Instructor",
"_doctype": "Instructor",
"type": "list",
"hidden": 1
},
{
"module_name": "Room",
"color": "#f22683",
"icon": "fa fa-map-marker",
"label": _("Room"),
"link": "List/Room",
"_doctype": "Room",
"type": "list",
"hidden": 1
},
{
"module_name": "Education",
"color": "#428B46",
"icon": "octicon octicon-mortar-board",
"type": "module",
"label": _("Education"),
"hidden": 1
},
{
"module_name": "Healthcare",
"color": "#FF888B",
"icon": "fa fa-heartbeat",
"type": "module",
"label": _("Healthcare"),
"hidden": 1
},
{
"module_name": "Patient",
"color": "#6BE273",
"icon": "fa fa-user",
"doctype": "Patient",
"type": "link",
"link": "List/Patient",
"label": _("Patient"),
"hidden": 1
},
{
"module_name": "Healthcare Practitioner",
"color": "#2ecc71",
"icon": "fa fa-user-md",
"doctype": "Healthcare Practitioner",
"type": "link",
"link": "List/Healthcare Practitioner",
"label": _("Healthcare Practitioner"),
"hidden": 1
},
{
"module_name": "Patient Appointment",
"color": "#934F92",
"icon": "fa fa-calendar-plus-o",
"doctype": "Patient Appointment",
"type": "link",
"link": "List/Patient Appointment",
"label": _("Patient Appointment"),
"hidden": 1
},
{
"module_name": "Patient Encounter",
"color": "#2ecc71",
"icon": "fa fa-stethoscope",
"doctype": "Patient Encounter",
"type": "link",
"link": "List/Patient Encounter",
"label": _("Patient Encounter"),
"hidden": 1
},
{
"module_name": "Lab Test",
"color": "#7578f6",
"icon": "octicon octicon-beaker",
"doctype": "Lab Test",
"type": "list",
"link": "List/Lab Test",
"label": _("Lab Test"),
"hidden": 1
},
{
"module_name": "Vital Signs",
"color": "#2ecc71",
"icon": "fa fa-thermometer-empty",
"doctype": "Vital Signs",
"type": "list",
"link": "List/Vital Signs",
"label": _("Vital Signs"),
"hidden": 1
},
{
"module_name": "Clinical Procedure",
"color": "#FF888B",
"icon": "fa fa-medkit",
"doctype": "Clinical Procedure",
"type": "list",
"link": "List/Clinical Procedure",
"label": _("Clinical Procedure"),
"hidden": 1
},
{
"module_name": "Inpatient Record",
"color": "#7578f6",
"icon": "fa fa-list-alt",
"doctype": "Inpatient Record",
"type": "list",
"link": "List/Inpatient Record",
"label": _("Inpatient Record"),
"hidden": 1
},
{
"module_name": "Hub",
"color": "#009248",
"icon": "/assets/erpnext/images/hub_logo.svg",
"type": "page",
"link": "Hub/Item",
"label": _("Hub")
},
{
"module_name": "Data Import",
"color": "#FFF168",
"reverse": 1,
"doctype": "Data Import",
"icon": "octicon octicon-cloud-upload",
"label": _("Data Import"),
"link": "List/Data Import",
"type": "list"
},
{
"module_name": "Restaurant",
"color": "#EA81E8",
"icon": "🍔",
"_doctype": "Restaurant",
"type": "module",
"link": "List/Restaurant",
"label": _("Restaurant"),
"hidden": 1
},
{
"module_name": "Hotels",
"color": "#EA81E8",
"icon": "fa fa-bed",
"type": "module",
"label": _("Hotels"),
"hidden": 1
},
{
"module_name": "Agriculture",
"color": "#8BC34A",
"icon": "octicon octicon-globe",
"type": "module",
"label": _("Agriculture"),
"hidden": 1
},
{
"module_name": "Crop",
"_doctype": "Crop",
"label": _("Crop"),
"color": "#8BC34A",
"icon": "fa fa-tree",
"type": "list",
"link": "List/Crop",
"hidden": 1
},
{
"module_name": "Crop Cycle",
"_doctype": "Crop Cycle",
"label": _("Crop Cycle"),
"color": "#8BC34A",
"icon": "fa fa-circle-o-notch",
"type": "list",
"link": "List/Crop Cycle",
"hidden": 1
},
{
"module_name": "Fertilizer",
"_doctype": "Fertilizer",
"label": _("Fertilizer"),
"color": "#8BC34A",
"icon": "fa fa-leaf",
"type": "list",
"link": "List/Fertilizer",
"hidden": 1
},
{
"module_name": "Location",
"_doctype": "Location",
"label": _("Location"),
"color": "#8BC34A",
"icon": "fa fa-map",
"type": "list",
"link": "List/Location",
"hidden": 1
},
{
"module_name": "Disease",
"_doctype": "Disease",
"label": _("Disease"),
"color": "#8BC34A",
"icon": "octicon octicon-bug",
"type": "list",
"link": "List/Disease",
"hidden": 1
},
{
"module_name": "Plant Analysis",
"_doctype": "Plant Analysis",
"label": _("Plant Analysis"),
"color": "#8BC34A",
"icon": "fa fa-pagelines",
"type": "list",
"link": "List/Plant Analysis",
"hidden": 1
},
{
"module_name": "Soil Analysis",
"_doctype": "Soil Analysis",
"label": _("Soil Analysis"),
"color": "#8BC34A",
"icon": "fa fa-flask",
"type": "list",
"link": "List/Soil Analysis",
"hidden": 1
},
{
"module_name": "Soil Texture",
"_doctype": "Soil Texture",
"label": _("Soil Texture"),
"color": "#8BC34A",
"icon": "octicon octicon-beaker",
"type": "list",
"link": "List/Soil Texture",
"hidden": 1
},
{
"module_name": "Water Analysis",
"_doctype": "Water Analysis",
"label": _("Water Analysis"),
"color": "#8BC34A",
"icon": "fa fa-tint",
"type": "list",
"link": "List/Water Analysis",
"hidden": 1
},
{
"module_name": "Weather",
"_doctype": "Weather",
"label": _("Weather"),
"color": "#8BC34A",
"icon": "fa fa-sun-o",
"type": "list",
"link": "List/Weather",
"hidden": 1
},
{
"module_name": "Assets",
"color": "#4286f4",
"icon": "octicon octicon-database",
"hidden": 1,
"label": _("Assets"),
"type": "module"
},
{
"module_name": "Grant Application",
"color": "#E9AB17",
"icon": "fa fa-gift",
"_doctype": "Grant Application",
"type": "list",
"link": "List/Grant Application",
"label": _("Grant Application"),
"hidden": 1
},
{
"module_name": "Donor",
"color": "#7F5A58",
"icon": "fa fa-tint",
"_doctype": "Donor",
"type": "list",
"link": "List/Donor",
"label": _("Donor"),
"hidden": 1
},
{
"module_name": "Volunteer",
"color": "#7E587E",
"icon": "fa fa-angellist",
"_doctype": "Volunteer",
"type": "list",
"link": "List/Volunteer",
"label": _("Volunteer"),
"hidden": 1
},
{
"module_name": "Member",
"color": "#79BAEC",
"icon": "fa fa-users",
"_doctype": "Member",
"type": "list",
"link": "List/Member",
"label": _("Member"),
"hidden": 1
},
{
"module_name": "Chapter",
"color": "#3B9C9C",
"icon": "fa fa-handshake-o",
"_doctype": "Chapter",
"type": "list",
"link": "List/Chapter",
"label": _("Chapter"),
"hidden": 1
},
{
"module_name": "Non Profit",
"color": "#DE2B37",
"icon": "octicon octicon-heart",
"type": "module",
"label": _("Non Profit"),
"hidden": 1
},
{
"module_name": "Quality Management",
"color": "#1abc9c",
"icon": "fa fa-check-square-o",
"type": "module",
"label": _("Quality")
}
]
]

View File

@ -8,7 +8,8 @@ def get_data():
"items": [
{
"type": "doctype",
"name": "Student"
"name": "Student",
"onboard": 1,
},
{
"type": "doctype",
@ -168,7 +169,7 @@ def get_data():
{
"type": "doctype",
"name": "Course Schedule",
"route": "List/Course Schedule/Calendar"
"route": "#List/Course Schedule/Calendar"
},
{
"type": "doctype",
@ -181,7 +182,8 @@ def get_data():
"items": [
{
"type": "doctype",
"name": "Course"
"name": "Course",
"onboard": 1,
},
{
"type": "doctype",
@ -189,16 +191,18 @@ def get_data():
},
{
"type": "doctype",
"name": "Instructor"
"name": "Instructor",
"onboard": 1,
},
{
"type": "doctype",
"name": "Room"
"name": "Room",
"onboard": 1,
}
]
},
{
"label": _("Setup"),
"label": _("Settings"),
"items": [
{
"type": "doctype",
@ -210,7 +214,8 @@ def get_data():
},
{
"type": "doctype",
"name": "Grading Scale"
"name": "Grading Scale",
"onboard": 1,
},
{
"type": "doctype",

View File

@ -0,0 +1,261 @@
from __future__ import unicode_literals
import frappe
from frappe import _
active_domains = frappe.get_active_domains()
def get_data():
return [
{
"label": _("Accounting"),
"items": [
{
"type": "doctype",
"name": "Item",
"onboard": 1,
},
{
"type": "doctype",
"name": "Customer",
"description": _("Customer database."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Supplier",
"description": _("Supplier database."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Company",
"description": _("Company (not Customer or Supplier) master."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Account",
"icon": "fa fa-sitemap",
"label": _("Chart of Accounts"),
"route": "#Tree/Account",
"description": _("Tree of financial accounts."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Opening Invoice Creation Tool",
"description": _("Create Opening Sales and Purchase Invoices"),
"onboard": 1,
},
]
},
{
"label": _("Data Import and Settings"),
"items": [
{
"type": "doctype",
"name": "Data Import",
"label": _("Import Data"),
"icon": "octicon octicon-cloud-upload",
"description": _("Import Data from CSV / Excel files."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Letter Head",
"description": _("Letter Heads for print templates."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Email Account",
"description": _("Add / Manage Email Accounts."),
"onboard": 1,
},
]
},
{
"label": _("Stock"),
"items": [
{
"type": "doctype",
"name": "Warehouse",
"onboard": 1,
},
{
"type": "doctype",
"name": "Brand",
"onboard": 1,
},
{
"type": "doctype",
"name": "UOM",
"label": _("Unit of Measure") + " (UOM)",
"onboard": 1,
},
{
"type": "doctype",
"name": "Stock Reconciliation",
"onboard": 1,
},
]
},
{
"label": _("CRM"),
"items": [
{
"type": "doctype",
"name": "Lead",
"description": _("Database of potential customers."),
"onboard": 1,
},
{
"type": "doctype",
"label": _("Customer Group"),
"name": "Customer Group",
"icon": "fa fa-sitemap",
"link": "Tree/Customer Group",
"description": _("Manage Customer Group Tree."),
"onboard": 1,
},
{
"type": "doctype",
"label": _("Territory"),
"name": "Territory",
"icon": "fa fa-sitemap",
"link": "Tree/Territory",
"description": _("Manage Territory Tree."),
"onboard": 1,
},
]
},
{
"label": _("Human Resources"),
"items": [
{
"type": "doctype",
"name": "Employee",
"onboard": 1,
},
{
"type": "doctype",
"name": "Employee Attendance Tool",
"hide_count": True,
"onboard": 1,
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Salary Structure",
"onboard": 1,
},
]
},
{
"label": _("Education"),
"condition": "Education" in active_domains,
"items": [
{
"type": "doctype",
"name": "Student",
"onboard": 1,
},
{
"type": "doctype",
"name": "Course",
"onboard": 1,
},
{
"type": "doctype",
"name": "Instructor",
"onboard": 1,
},
{
"type": "doctype",
"name": "Room",
"onboard": 1,
},
]
},
{
"label": _("Healthcare"),
"condition": "Healthcare" in active_domains,
"items": [
{
"type": "doctype",
"name": "Patient",
"label": _("Patient"),
"onboard": 1,
},
{
"type": "doctype",
"name": "Physician",
"label": _("Physician"),
"onboard": 1,
},
{
"type": "doctype",
"name": "Diagnosis",
"label": _("Diagnosis"),
"onboard": 1,
}
]
},
{
"label": _("Agriculture"),
"condition": "Agriculture" in active_domains,
"items": [
{
"type": "doctype",
"name": "Crop",
"onboard": 1,
},
{
"type": "doctype",
"name": "Crop Cycle",
"onboard": 1,
},
{
"type": "doctype",
"name": "Location",
"onboard": 1,
},
{
"type": "doctype",
"name": "Fertilizer",
"onboard": 1,
}
]
},
{
"label": _("Non Profit"),
"condition": "Non Profit" in active_domains,
"items": [
{
"type": "doctype",
"name": "Member",
"description": _("Member information."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Volunteer",
"description": _("Volunteer information."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Chapter",
"description": _("Chapter information."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Donor",
"description": _("Donor information."),
"onboard": 1,
},
]
}
]

View File

@ -76,11 +76,13 @@ def get_data():
"type": "doctype",
"name": "Patient",
"label": _("Patient"),
"onboard": 1,
},
{
"type": "doctype",
"name": "Healthcare Practitioner",
"label": _("Healthcare Practitioner"),
"onboard": 1,
},
{
"type": "doctype",
@ -96,6 +98,7 @@ def get_data():
"type": "doctype",
"name": "Medical Code",
"label": _("Medical Code"),
"onboard": 1,
},
{
"type": "doctype",
@ -105,13 +108,14 @@ def get_data():
]
},
{
"label": _("Setup"),
"label": _("Settings"),
"icon": "icon-cog",
"items": [
{
"type": "doctype",
"name": "Healthcare Settings",
"label": _("Healthcare Settings"),
"onboard": 1,
},
{
"type": "doctype",

View File

@ -30,7 +30,7 @@ def get_data():
},
{
"label": _("Setup"),
"label": _("Settings"),
"items": [
{
"type": "help",

View File

@ -0,0 +1,62 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Issues"),
"items": [
{
"type": "doctype",
"name": "Issue",
"description": _("Support queries from customers."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Communication",
"description": _("Communication log."),
"onboard": 1,
},
]
},
{
"label": _("Warranty"),
"items": [
{
"type": "doctype",
"name": "Warranty Claim",
"description": _("Warranty Claim against Serial No."),
},
{
"type": "doctype",
"name": "Serial No",
"description": _("Single unit of an Item."),
},
]
},
{
"label": _("Reports"),
"icon": "fa fa-list",
"items": [
{
"type": "page",
"name": "support-analytics",
"label": _("Support Analytics"),
"icon": "fa fa-bar-chart"
},
{
"type": "report",
"name": "Minutes to First Response for Issues",
"doctype": "Issue",
"is_query_report": True
},
{
"type": "report",
"name": "Support Hours",
"doctype": "Issue",
"is_query_report": True
},
]
},
]

View File

@ -9,90 +9,67 @@ def get_data():
{
"type": "doctype",
"name": "Employee",
"onboard": 1,
},
{
"type": "doctype",
"name": "Employee Attendance Tool",
"hide_count": True
"hide_count": True,
"onboard": 1,
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Attendance",
"onboard": 1,
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Attendance Request",
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Upload Attendance",
"hide_count": True
}
]
},
{
"label": _("Leaves and Holiday"),
"items": [
{
"type": "doctype",
"name": "Leave Application",
},
{
"type": "doctype",
"name": "Leave Allocation",
},
{
"type": "doctype",
"name": "Compensatory Leave Request",
},
{
"type": "doctype",
"name": "Leave Encashment",
},
{
"type": "doctype",
"name": "Leave Period",
},
{
"type": "doctype",
"name": "Leave Policy",
},
{
"type": "doctype",
"name":"Leave Type",
},
{
"type": "doctype",
"name": "Holiday List",
},
{
"type": "doctype",
"name": "Leave Block List",
"hide_count": True,
"dependencies": ["Employee"]
},
]
},
{
"label": _("Payroll"),
"items": [
{
"type": "doctype",
"name": "Salary Structure",
"onboard": 1,
},
{
"type": "doctype",
"name": "Salary Structure Assignment",
"onboard": 1,
"dependencies": ["Salary Structure", "Employee"],
},
{
"type": "doctype",
"name": "Salary Slip",
"onboard": 1,
},
{
"type": "doctype",
"name": "Payroll Entry"
"name": "Payroll Entry",
"onboard": 1,
},
{
"type": "doctype",
"name": "Employee Benefit Application",
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Employee Benefit Claim",
"dependencies": ["Employee"]
},
{
"type": "doctype",
@ -101,24 +78,23 @@ def get_data():
{
"type": "doctype",
"name": "Employee Tax Exemption Declaration",
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Employee Tax Exemption Proof Submission",
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Employee Incentive",
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Retention Bonus",
"dependencies": ["Employee"]
},
]
},
{
"label": _("Payroll Setup"),
"items": [
{
"type": "doctype",
"name": "Payroll Period",
@ -127,176 +103,10 @@ def get_data():
"type": "doctype",
"name": "Salary Component",
},
{
"type": "doctype",
"name": "Salary Structure",
},
{
"type": "doctype",
"name": "Employee Tax Exemption Category",
},
{
"type": "doctype",
"name": "Employee Tax Exemption Sub Category"
}
]
},
{
"label": _("Travel and Expense Claim"),
"items": [
{
"type": "doctype",
"name": "Employee Advance",
},
{
"type": "doctype",
"name": "Expense Claim",
},
{
"type": "doctype",
"name": "Expense Claim Type",
},
{
"type": "doctype",
"name": "Travel Request",
},
]
},
{
"label": _("Appraisals"),
"items": [
{
"type": "doctype",
"name": "Appraisal",
},
{
"type": "doctype",
"name": "Appraisal Template",
},
{
"type": "page",
"name": "team-updates",
"label": _("Team Updates")
},
]
},
{
"label": _("Loan Management"),
"icon": "icon-list",
"items": [
{
"type": "doctype",
"name": "Loan Type",
},
{
"type": "doctype",
"name": "Loan Application",
},
{
"type": "doctype",
"name": "Loan"
},
]
},
{
"label": _("Employee Lifecycle"),
"items": [
{
"type": "doctype",
"name": "Employee Transfer",
},
{
"type": "doctype",
"name": "Employee Promotion",
},
{
"type": "doctype",
"name": "Employee Separation",
},
{
"type": "doctype",
"name": "Employee Onboarding"
},
{
"type": "doctype",
"name": "Employee Separation Template",
},
{
"type": "doctype",
"name": "Employee Onboarding Template"
}
]
},
{
"label": _("Recruitment"),
"items": [
{
"type": "doctype",
"name": "Job Applicant",
},
{
"type": "doctype",
"name": "Job Opening",
},
{
"type": "doctype",
"name": "Job Offer",
},
]
},
{
"label": _("Training"),
"items": [
{
"type": "doctype",
"name": "Training Program"
},
{
"type": "doctype",
"name": "Training Event"
},
{
"type": "doctype",
"name": "Training Result"
},
{
"type": "doctype",
"name": "Training Feedback"
},
]
},
{
"label": _("Shift Management"),
"items": [
{
"type": "doctype",
"name": "Shift Type",
},
{
"type": "doctype",
"name": "Shift Request",
},
{
"type": "doctype",
"name": "Shift Assignment",
}
]
},
{
"label": _("Fleet Management"),
"items": [
{
"type": "doctype",
"name": "Vehicle"
},
{
"type": "doctype",
"name": "Vehicle Log"
},
]
},
{
"label": _("Setup"),
"label": _("Settings"),
"icon": "fa fa-cog",
"items": [
{
@ -337,6 +147,157 @@ def get_data():
}
]
},
{
"label": _("Leaves"),
"items": [
{
"type": "doctype",
"name": "Leave Application",
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Leave Allocation",
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Compensatory Leave Request",
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Leave Encashment",
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Leave Period",
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name":"Leave Type",
},
{
"type": "doctype",
"name": "Leave Policy",
"dependencies": ["Leave Type"]
},
{
"type": "doctype",
"name": "Holiday List",
},
{
"type": "doctype",
"name": "Leave Block List",
},
]
},
{
"label": _("Recruitment and Training"),
"items": [
{
"type": "doctype",
"name": "Job Applicant",
"onboard": 1,
},
{
"type": "doctype",
"name": "Job Opening",
"onboard": 1,
},
{
"type": "doctype",
"name": "Job Offer",
"onboard": 1,
},
{
"type": "doctype",
"name": "Training Program"
},
{
"type": "doctype",
"name": "Training Event"
},
{
"type": "doctype",
"name": "Training Result"
},
{
"type": "doctype",
"name": "Training Feedback"
},
]
},
{
"label": _("Employee Lifecycle"),
"items": [
{
"type": "doctype",
"name": "Employee Transfer",
"dependencies": ["Employee"],
},
{
"type": "doctype",
"name": "Employee Promotion",
"dependencies": ["Employee"],
},
{
"type": "doctype",
"name": "Employee Separation",
"dependencies": ["Employee"],
},
{
"type": "doctype",
"name": "Employee Onboarding",
"dependencies": ["Job Applicant"],
},
{
"type": "doctype",
"name": "Employee Separation Template",
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Employee Onboarding Template",
"dependencies": ["Employee"]
}
]
},
{
"label": _("Appraisals, Expense Claims and Loans"),
"items": [
{
"type": "doctype",
"name": "Appraisal",
},
{
"type": "doctype",
"name": "Appraisal Template",
},
{
"type": "page",
"name": "team-updates",
"label": _("Team Updates")
},
{
"type": "doctype",
"name": "Employee Advance",
"dependencies": ["Employee"]
},
{
"type": "doctype",
"name": "Loan Type",
},
{
"type": "doctype",
"name": "Loan Application",
"dependencies": ["Employee"]
},
]
},
{
"label": _("Reports"),
"icon": "fa fa-list",
@ -382,33 +343,6 @@ def get_data():
"name": "Vehicle Expenses",
"doctype": "Vehicle"
},
]
},
{
"label": _("Help"),
"icon": "fa fa-facetime-video",
"items": [
{
"type": "help",
"label": _("Setting up Employees"),
"youtube_id": "USfIUdZlUhw"
},
{
"type": "help",
"label": _("Leave Management"),
"youtube_id": "fc0p_AXebc8"
},
{
"type": "help",
"label": _("Expense Claims"),
"youtube_id": "5SZHJF--ZFY"
}
]
},
{
"label": _("Analytics"),
"items": [
{
"type": "report",
"is_query_report": True,
@ -416,5 +350,51 @@ def get_data():
"doctype": "Employee"
},
]
}
},
{
"label": _("Shifts and Fleet Management"),
"items": [
{
"type": "doctype",
"name": "Shift Type",
},
{
"type": "doctype",
"name": "Shift Request",
},
{
"type": "doctype",
"name": "Shift Assignment",
},
{
"type": "doctype",
"name": "Vehicle"
},
{
"type": "doctype",
"name": "Vehicle Log"
},
]
},
# {
# "label": _("Help"),
# "icon": "fa fa-facetime-video",
# "items": [
# {
# "type": "help",
# "label": _("Setting up Employees"),
# "youtube_id": "USfIUdZlUhw"
# },
# {
# "type": "help",
# "label": _("Leave Management"),
# "youtube_id": "fc0p_AXebc8"
# },
# {
# "type": "help",
# "label": _("Expense Claims"),
# "youtube_id": "5SZHJF--ZFY"
# }
# ]
# },
]

View File

@ -4,7 +4,7 @@ from frappe import _
def get_data():
return [
{
"label": _("Setup"),
"label": _("Settings"),
"items": [
{
"type": "doctype",

View File

@ -1,33 +0,0 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Maintenance"),
"icon": "fa fa-star",
"items": [
{
"type": "doctype",
"name": "Maintenance Schedule",
"description": _("Plan for maintenance visits."),
},
{
"type": "doctype",
"name": "Maintenance Visit",
"description": _("Visit report for maintenance call."),
},
{
"type": "report",
"name": "Maintenance Schedules",
"is_query_report": True,
"doctype": "Maintenance Schedule"
},
{
"type": "doctype",
"name": "Warranty Claim",
"description": _("Warranty Claim against Serial No."),
},
]
}
]

View File

@ -11,22 +11,33 @@ def get_data():
"type": "doctype",
"name": "Work Order",
"description": _("Orders released for production."),
"onboard": 1,
"dependencies": ["Item", "BOM"]
},
{
"type": "doctype",
"name": "Production Plan",
"description": _("Generate Material Requests (MRP) and Work Orders."),
"onboard": 1,
"dependencies": ["Item", "BOM"]
},
{
"type": "doctype",
"name": "Stock Entry",
"onboard": 1,
"dependencies": ["Item"]
},
{
"type": "doctype",
"name": "Timesheet",
"description": _("Time Sheet for manufacturing."),
"onboard": 1,
"dependencies": ["Activity Type"]
},
{
"type": "doctype",
"name": "Job Card"
}
]
},
{
@ -34,23 +45,29 @@ def get_data():
"items": [
{
"type": "doctype",
"name": "BOM",
"description": _("Bill of Materials (BOM)"),
"label": _("Bill of Materials")
"name": "Item",
"description": _("All Products or Services."),
"onboard": 1,
},
{
"type": "doctype",
"name": "BOM",
"description": _("Bill of Materials (BOM)"),
"label": _("Bill of Materials"),
"onboard": 1,
"dependencies": ["Item"]
},
{
"type": "doctype",
"name": "BOM Browser",
"icon": "fa fa-sitemap",
"label": _("BOM Browser"),
"description": _("Tree of Bill of Materials"),
"link": "Tree/BOM",
"onboard": 1,
"dependencies": ["Item"]
},
{
"type": "doctype",
"name": "Item",
"description": _("All Products or Services."),
},
{
"type": "doctype",
"name": "Workstation",
@ -61,6 +78,10 @@ def get_data():
"name": "Operation",
"description": _("Details of the operations carried out."),
},
{
"type": "doctype",
"name": "Routing"
}
]
},
@ -76,7 +97,7 @@ def get_data():
]
},
{
"label": _("Setup"),
"label": _("Settings"),
"items": [
{
"type": "doctype",

View File

@ -11,6 +11,7 @@ def get_data():
"type": "doctype",
"name": "Chapter",
"description": _("Chapter information."),
"onboard": 1,
}
]
},
@ -21,11 +22,13 @@ def get_data():
"type": "doctype",
"name": "Member",
"description": _("Member information."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Membership",
"description": _("Memebership Details"),
"onboard": 1,
},
{
"type": "doctype",
@ -41,6 +44,7 @@ def get_data():
"type": "doctype",
"name": "Volunteer",
"description": _("Volunteer information."),
"onboard": 1,
},
{
"type": "doctype",

View File

@ -11,17 +11,27 @@ def get_data():
"type": "doctype",
"name": "Project",
"description": _("Project master."),
},
{
"type": "doctype",
"name": "Project Update",
"description": _("Project Update."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Task",
"route": "List/Task",
"route": "#List/Task",
"description": _("Project activity / task."),
"onboard": 1,
},
{
"type": "report",
"route": "#List/Task/Gantt",
"doctype": "Task",
"name": "Gantt Chart",
"description": _("Gantt chart of all tasks."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Project Template",
"description": _("Make project from a template."),
},
{
"type": "doctype",
@ -29,11 +39,10 @@ def get_data():
"description": _("Define Project type."),
},
{
"type": "report",
"route": "List/Task/Gantt",
"doctype": "Task",
"name": "Gantt Chart",
"description": _("Gantt chart of all tasks.")
"type": "doctype",
"name": "Project Update",
"description": _("Project Update."),
"dependencies": ["Project"],
},
]
},
@ -44,16 +53,19 @@ def get_data():
"type": "doctype",
"name": "Timesheet",
"description": _("Timesheet for tasks."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Activity Type",
"description": _("Types of activities for Time Logs"),
"onboard": 1,
},
{
"type": "doctype",
"name": "Activity Cost",
"description": _("Cost of various activities"),
"dependencies": ["Activity Type"],
},
]
},
@ -65,13 +77,16 @@ def get_data():
"type": "report",
"is_query_report": True,
"name": "Daily Timesheet Summary",
"doctype": "Timesheet"
"doctype": "Timesheet",
"onboard": 1,
"dependencies": ["Timesheet"],
},
{
"type": "report",
"is_query_report": True,
"name": "Project wise Stock Tracking",
"doctype": "Project"
"doctype": "Project",
"dependencies": ["Project"],
},
]
},

View File

@ -10,18 +10,20 @@ def get_data():
"type": "doctype",
"name": "Quality Goal",
"description":_("Quality Goal."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Quality Procedure",
"description":_("Quality Procedure."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Quality Procedure",
"icon": "fa fa-sitemap",
"label": _("Tree of Procedures"),
"route": "Tree/Quality Procedure",
"route": "#Tree/Quality Procedure",
"description": _("Tree of Quality Procedures."),
},
]
@ -33,6 +35,7 @@ def get_data():
"type": "doctype",
"name": "Quality Review",
"description":_("Quality Review"),
"onboard": 1,
},
{
"type": "doctype",
@ -58,6 +61,7 @@ def get_data():
"type": "doctype",
"name": "Customer Feedback",
"description":_("Customer Feedback"),
"onboard": 1,
},
{
"type": "doctype",

48
erpnext/config/retail.py Normal file
View File

@ -0,0 +1,48 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Retail Operations"),
"items": [
{
"type": "doctype",
"name": "POS Profile",
"label": _("Point-of-Sale Profile"),
"description": _("Setup default values for POS Invoices"),
"onboard": 1,
},
{
"type": "page",
"name": "pos",
"label": _("POS"),
"description": _("Point of Sale"),
"onboard": 1,
"dependencies": ["POS Profile"]
},
{
"type": "doctype",
"name": "Cashier Closing",
"description": _("Cashier Closing"),
},
{
"type": "doctype",
"name": "POS Settings",
"description": _("Setup mode of POS (Online / Offline)")
},
{
"type": "doctype",
"name": "Loyalty Program",
"label": _("Loyalty Program"),
"description": _("To make Customer based incentive schemes.")
},
{
"type": "doctype",
"name": "Loyalty Point Entry",
"label": _("Loyalty Point Entry"),
"description": _("To view logs of Loyalty Points assigned to a Customer.")
}
]
}
]

View File

@ -7,25 +7,137 @@ def get_data():
"label": _("Sales"),
"icon": "fa fa-star",
"items": [
{
"type": "doctype",
"name": "Customer",
"description": _("Customer database."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Quotation",
"description": _("Quotes to Leads or Customers."),
"onboard": 1,
"dependencies": ["Item", "Customer"],
},
{
"type": "doctype",
"name": "Sales Order",
"description": _("Confirmed orders from Customers."),
"onboard": 1,
"dependencies": ["Item", "Customer"],
},
{
"type": "doctype",
"name": "Sales Partner",
"description": _("Manage Sales Partners."),
"dependencies": ["Item"],
},
{
"type": "doctype",
"label": _("Sales Person"),
"name": "Sales Person",
"icon": "fa fa-sitemap",
"link": "Tree/Sales Person",
"description": _("Manage Sales Person Tree."),
"dependencies": ["Item", "Customer"],
},
{
"type": "report",
"is_query_report": True,
"name": "Territory Target Variance (Item Group-Wise)",
"route": "#query-report/Territory Target Variance Item Group-Wise",
"doctype": "Territory",
},
{
"type": "report",
"is_query_report": True,
"name": "Sales Person Target Variance (Item Group-Wise)",
"route": "#query-report/Sales Person Target Variance Item Group-Wise",
"doctype": "Sales Person",
"dependencies": ["Sales Person"],
},
]
},
{
"label": _("Customers"),
"label": _("Items and Pricing"),
"items": [
{
"type": "doctype",
"name": "Customer",
"description": _("Customer database."),
"name": "Item",
"description": _("All Products or Services."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Item Price",
"description": _("Multiple Item prices."),
"route": "#Report/Item Price",
"dependencies": ["Item", "Price List"],
"onboard": 1,
},
{
"type": "doctype",
"name": "Price List",
"description": _("Price List master."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Item Group",
"icon": "fa fa-sitemap",
"label": _("Item Group"),
"link": "Tree/Item Group",
"description": _("Tree of Item Groups."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Product Bundle",
"description": _("Bundle items at time of sale."),
"dependencies": ["Item"],
},
{
"type": "doctype",
"name": "Pricing Rule",
"description": _("Rules for applying pricing and discount."),
"dependencies": ["Item"],
},
{
"type": "doctype",
"name": "Shipping Rule",
"description": _("Rules for adding shipping costs."),
},
]
},
{
"label": _("Settings"),
"icon": "fa fa-cog",
"items": [
{
"type": "doctype",
"name": "Selling Settings",
"description": _("Default settings for selling transactions."),
"settings": 1,
},
{
"type": "doctype",
"name":"Terms and Conditions",
"label": _("Terms and Conditions Template"),
"description": _("Template of terms or contract."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Sales Taxes and Charges Template",
"description": _("Tax template for selling transactions."),
"onboard": 1,
},
{
"type": "doctype",
"name": "Lead Source",
"description": _("Track Leads by Lead Source.")
},
{
"type": "doctype",
@ -45,57 +157,6 @@ def get_data():
"name": "Address",
"description": _("All Addresses."),
},
]
},
{
"label": _("Items and Pricing"),
"items": [
{
"type": "doctype",
"name": "Item",
"description": _("All Products or Services."),
},
{
"type": "doctype",
"name": "Product Bundle",
"description": _("Bundle items at time of sale."),
},
{
"type": "doctype",
"name": "Price List",
"description": _("Price List master.")
},
{
"type": "doctype",
"name": "Item Group",
"icon": "fa fa-sitemap",
"label": _("Item Group"),
"link": "Tree/Item Group",
"description": _("Tree of Item Groups."),
},
{
"type": "doctype",
"name": "Item Price",
"description": _("Multiple Item prices."),
"route": "Report/Item Price"
},
{
"type": "doctype",
"name": "Shipping Rule",
"description": _("Rules for adding shipping costs.")
},
{
"type": "doctype",
"name": "Pricing Rule",
"description": _("Rules for applying pricing and discount.")
},
]
},
{
"label": _("Sales Partners and Territory"),
"items": [
{
"type": "doctype",
"label": _("Territory"),
@ -104,97 +165,30 @@ def get_data():
"link": "Tree/Territory",
"description": _("Manage Territory Tree."),
},
{
"type": "doctype",
"name": "Sales Partner",
"description": _("Manage Sales Partners."),
},
{
"type": "doctype",
"label": _("Sales Person"),
"name": "Sales Person",
"icon": "fa fa-sitemap",
"link": "Tree/Sales Person",
"description": _("Manage Sales Person Tree."),
},
{
"type": "report",
"is_query_report": True,
"name": "Address And Contacts",
"label": _("Sales Partner Addresses And Contacts"),
"doctype": "Address",
"route_options": {
"party_type": "Sales Partner"
}
},
{
"type": "report",
"is_query_report": True,
"name": "Territory Target Variance (Item Group-Wise)",
"route": "query-report/Territory Target Variance Item Group-Wise",
"doctype": "Territory"
},
{
"type": "report",
"is_query_report": True,
"name": "Sales Person Target Variance (Item Group-Wise)",
"route": "query-report/Sales Person Target Variance Item Group-Wise",
"doctype": "Sales Person",
},
]
},
{
"label": _("Setup"),
"icon": "fa fa-cog",
"items": [
{
"type": "doctype",
"name": "Selling Settings",
"description": _("Default settings for selling transactions.")
},
{
"type": "doctype",
"name": "Campaign",
"description": _("Sales campaigns."),
},
{
"type": "doctype",
"name":"Terms and Conditions",
"label": _("Terms and Conditions Template"),
"description": _("Template of terms or contract.")
},
{
"type": "doctype",
"name": "Sales Taxes and Charges Template",
"description": _("Tax template for selling transactions.")
},
{
"type": "doctype",
"name": "Industry Type",
"description": _("Track Leads by Industry Type.")
},
{
"type": "doctype",
"name": "Lead Source",
"description": _("Track Leads by Lead Source.")
},
]
},
{
"label": _("Analytics"),
"label": _("Key Reports"),
"icon": "fa fa-table",
"items": [
{
"type": "report",
"is_query_report": True,
"name": "Sales Analytics",
"doctype": "Sales Order"
"doctype": "Sales Order",
"onboard": 1,
},
{
"type": "page",
"name": "sales-funnel",
"label": _("Sales Funnel"),
"icon": "fa fa-bar-chart",
"onboard": 1,
},
{
"type": "report",
@ -203,6 +197,30 @@ def get_data():
"doctype": "Customer",
"icon": "fa fa-bar-chart",
},
{
"type": "report",
"is_query_report": True,
"name": "Inactive Customers",
"doctype": "Sales Order"
},
{
"type": "report",
"is_query_report": True,
"name": "Ordered Items To Be Delivered",
"doctype": "Sales Order"
},
{
"type": "report",
"is_query_report": True,
"name": "Sales Person-wise Transaction Summary",
"doctype": "Sales Order"
},
{
"type": "report",
"is_query_report": True,
"name": "Item-wise Sales History",
"doctype": "Item"
},
{
"type": "report",
"is_query_report": True,
@ -237,36 +255,12 @@ def get_data():
"party_type": "Customer"
}
},
{
"type": "report",
"is_query_report": True,
"name": "Ordered Items To Be Delivered",
"doctype": "Sales Order"
},
{
"type": "report",
"is_query_report": True,
"name": "Sales Person-wise Transaction Summary",
"doctype": "Sales Order"
},
{
"type": "report",
"is_query_report": True,
"name": "Item-wise Sales History",
"doctype": "Item"
},
{
"type": "report",
"is_query_report": True,
"name": "BOM Search",
"doctype": "BOM"
},
{
"type": "report",
"is_query_report": True,
"name": "Inactive Customers",
"doctype": "Sales Order"
},
{
"type": "report",
"is_query_report": True,
@ -293,27 +287,6 @@ def get_data():
},
]
},
{
"label": _("SMS"),
"icon": "fa fa-wrench",
"items": [
{
"type": "doctype",
"name": "SMS Center",
"description":_("Send mass SMS to your contacts"),
},
{
"type": "doctype",
"name": "SMS Log",
"description":_("Logs for maintaining sms delivery status"),
},
{
"type": "doctype",
"name": "SMS Settings",
"description": _("Setup SMS gateway settings")
},
]
},
{
"label": _("Help"),
"items": [

View File

@ -11,9 +11,10 @@ def get_data():
{
"type": "doctype",
"name": "Global Defaults",
"label": _("Global Settings"),
"label": _("ERPNext Settings"),
"description": _("Set Default Values like Company, Currency, Current Fiscal Year, etc."),
"hide_count": True
"hide_count": True,
"settings": 1,
}
]
},
@ -24,7 +25,8 @@ def get_data():
{
"type": "doctype",
"name": "Letter Head",
"description": _("Letter Heads for print templates.")
"description": _("Letter Heads for print templates."),
"onboard": 1,
},
{
"type": "doctype",

View File

@ -9,18 +9,30 @@ def get_data():
{
"type": "doctype",
"name": "Stock Entry",
"onboard": 1,
"dependencies": ["Item"],
},
{
"type": "doctype",
"name": "Delivery Note",
"onboard": 1,
"dependencies": ["Item", "Customer"],
},
{
"type": "doctype",
"name": "Purchase Receipt",
"onboard": 1,
"dependencies": ["Item", "Supplier"],
},
{
"type": "doctype",
"name": "Material Request",
"onboard": 1,
"dependencies": ["Item"],
},
{
"type": "doctype",
"name": "Delivery Trip"
},
]
},
@ -32,56 +44,94 @@ def get_data():
"is_query_report": True,
"name": "Stock Ledger",
"doctype": "Stock Ledger Entry",
"onboard": 1,
"dependencies": ["Item"],
},
{
"type": "report",
"is_query_report": True,
"name": "Stock Balance",
"doctype": "Stock Ledger Entry"
"doctype": "Stock Ledger Entry",
"onboard": 1,
"dependencies": ["Item"],
},
{
"type": "report",
"is_query_report": True,
"name": "Stock Projected Qty",
"doctype": "Item",
"onboard": 1,
"dependencies": ["Item"],
},
{
"type": "page",
"name": "stock-balance",
"label": _("Stock Summary")
"label": _("Stock Summary"),
"dependencies": ["Item"],
},
{
"type": "report",
"is_query_report": True,
"name": "Stock Ageing",
"doctype": "Item",
"dependencies": ["Item"],
},
{
"type": "report",
"is_query_report": True,
"name": "Item Price Stock",
"doctype": "Item",
"dependencies": ["Item"],
}
]
},
{
"label": _("Settings"),
"icon": "fa fa-cog",
"items": [
{
"type": "doctype",
"name": "Stock Settings",
"onboard": 1,
},
{
"type": "doctype",
"name": "Warehouse",
"onboard": 1,
},
{
"type": "doctype",
"name": "UOM",
"label": _("Unit of Measure") + " (UOM)",
"onboard": 1,
},
{
"type": "doctype",
"name": "Brand",
"onboard": 1,
},
{
"type": "doctype",
"name": "Item Attribute",
},
{
"type": "doctype",
"name": "Item Variant Settings",
},
]
},
{
"label": _("Items and Pricing"),
"items": [
{
"type": "doctype",
"name": "Item",
},
{
"type": "doctype",
"name": "Item Alternative",
"onboard": 1,
},
{
"type": "doctype",
"name": "Product Bundle",
},
{
"type": "doctype",
"name": "Price List",
"onboard": 1,
},
{
"type": "doctype",
@ -89,6 +139,11 @@ def get_data():
"icon": "fa fa-sitemap",
"label": _("Item Group"),
"link": "Tree/Item Group",
"onboard": 1,
},
{
"type": "doctype",
"name": "Price List",
},
{
"type": "doctype",
@ -102,6 +157,10 @@ def get_data():
"type": "doctype",
"name": "Pricing Rule",
},
{
"type": "doctype",
"name": "Item Alternative",
},
{
"type": "doctype",
"name": "Item Variant Settings",
@ -114,14 +173,19 @@ def get_data():
{
"type": "doctype",
"name": "Serial No",
"onboard": 1,
"dependencies": ["Item"],
},
{
"type": "doctype",
"name": "Batch",
"onboard": 1,
"dependencies": ["Item"],
},
{
"type": "doctype",
"name": "Installation Note",
"dependencies": ["Item"],
},
{
"type": "report",
@ -140,16 +204,6 @@ def get_data():
},
]
},
{
"label": _("Fulfilment"),
"items": [
{
"type": "doctype",
"name": "Delivery Trip",
"description": _("Delivery Trip service tours to customers.")
}
]
},
{
"label": _("Tools"),
"icon": "fa fa-wrench",
@ -157,10 +211,17 @@ def get_data():
{
"type": "doctype",
"name": "Stock Reconciliation",
"onboard": 1,
},
{
"type": "doctype",
"name": "Landed Cost Voucher",
"onboard": 1,
},
{
"type": "doctype",
"name": "Packing Slip",
"onboard": 1,
},
{
"type": "doctype",
@ -170,45 +231,10 @@ def get_data():
"type": "doctype",
"name": "Quality Inspection Template",
},
{
"type": "doctype",
"name": "Landed Cost Voucher",
}
]
},
{
"label": _("Setup"),
"icon": "fa fa-cog",
"items": [
{
"type": "doctype",
"name": "Stock Settings",
},
{
"type": "doctype",
"name": "Warehouse",
},
{
"type": "doctype",
"name": "UOM",
"label": _("Unit of Measure") + " (UOM)",
},
{
"type": "doctype",
"name": "Item Attribute",
},
{
"type": "doctype",
"name": "Brand",
},
{
"type": "doctype",
"name": "Item Variant Settings",
},
]
},
{
"label": _("Analytics"),
"label": _("Key Reports"),
"icon": "fa fa-table",
"items": [
{
@ -216,12 +242,14 @@ def get_data():
"is_query_report": False,
"name": "Item-wise Price List Rate",
"doctype": "Item Price",
"onboard": 1,
},
{
"type": "report",
"is_query_report": True,
"name": "Stock Analytics",
"doctype": "Stock Entry"
"doctype": "Stock Entry",
"onboard": 1,
},
{
"type": "report",
@ -235,13 +263,6 @@ def get_data():
"name": "Purchase Receipt Trends",
"doctype": "Purchase Receipt"
},
]
},
{
"label": _("Reports"),
"icon": "fa fa-list",
"items": [
{
"type": "report",
"is_query_report": True,
@ -257,21 +278,27 @@ def get_data():
{
"type": "report",
"name": "Item Shortage Report",
"route": "Report/Bin/Item Shortage Report",
"route": "#Report/Bin/Item Shortage Report",
"doctype": "Purchase Receipt"
},
{
"type": "report",
"is_query_report": True,
"name": "Requested Items To Be Transferred",
"doctype": "Material Request"
},
{
"type": "report",
"is_query_report": True,
"name": "Batch-Wise Balance History",
"doctype": "Batch"
},
]
},
{
"label": _("Other Reports"),
"icon": "fa fa-list",
"items": [
{
"type": "report",
"is_query_report": True,
"name": "Requested Items To Be Transferred",
"doctype": "Material Request"
},
{
"type": "report",
"is_query_report": True,

View File

@ -1,60 +0,0 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Issues"),
"items": [
{
"type": "doctype",
"name": "Issue",
"description": _("Support queries from customers."),
},
{
"type": "doctype",
"name": "Communication",
"description": _("Communication log."),
},
]
},
{
"label": _("Warranty"),
"items": [
{
"type": "doctype",
"name": "Warranty Claim",
"description": _("Warranty Claim against Serial No."),
},
{
"type": "doctype",
"name": "Serial No",
"description": _("Single unit of an Item."),
},
]
},
{
"label": _("Reports"),
"icon": "fa fa-list",
"items": [
{
"type": "page",
"name": "support-analytics",
"label": _("Support Analytics"),
"icon": "fa fa-bar-chart"
},
{
"type": "report",
"name": "Minutes to First Response for Issues",
"doctype": "Issue",
"is_query_report": True
},
{
"type": "report",
"name": "Support Hours",
"doctype": "Issue",
"is_query_report": True
},
]
},
]

View File

@ -16,7 +16,7 @@ from erpnext.accounts.party import get_party_account_currency, validate_party_fr
from erpnext.exceptions import InvalidCurrency
from six import text_type
force_item_fields = ("item_group", "brand", "stock_uom", "is_fixed_asset")
force_item_fields = ("item_group", "brand", "stock_uom", "is_fixed_asset", "item_tax_rate")
class AccountsController(TransactionBase):
@ -95,6 +95,8 @@ class AccountsController(TransactionBase):
if self.is_return:
self.validate_qty()
validate_regional(self)
def validate_invoice_documents_schedule(self):
self.validate_payment_schedule_dates()
self.set_due_date()
@ -1124,15 +1126,15 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
else:
child_item = frappe.get_doc(parent_doctype + ' Item', d.get("docname"))
if parent_doctype == "Sales Order" and flt(d.get("qty")) < child_item.delivered_qty:
if parent_doctype == "Sales Order" and flt(d.get("qty")) < flt(child_item.delivered_qty):
frappe.throw(_("Cannot set quantity less than delivered quantity"))
if parent_doctype == "Purchase Order" and flt(d.get("qty")) < child_item.received_qty:
if parent_doctype == "Purchase Order" and flt(d.get("qty")) < flt(child_item.received_qty):
frappe.throw(_("Cannot set quantity less than received quantity"))
child_item.qty = flt(d.get("qty"))
if child_item.billed_amt > (flt(d.get("rate")) * flt(d.get("qty"))):
if flt(child_item.billed_amt) > (flt(d.get("rate")) * flt(d.get("qty"))):
frappe.throw(_("Row #{0}: Cannot set Rate if amount is greater than billed amount for Item {1}.")
.format(child_item.idx, child_item.item_code))
else:
@ -1180,3 +1182,7 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
parent.update_blanket_order()
parent.update_billing_percentage()
parent.set_status()
@erpnext.allow_regional
def validate_regional(doc):
pass

View File

@ -27,6 +27,16 @@ class TestTaxes(unittest.TestCase):
'item_group_name': uuid4(),
'parent_item_group': 'All Item Groups',
}).insert()
self.item_tax_template = frappe.get_doc({
'doctype': 'Item Tax Template',
'title': uuid4(),
'taxes': [
{
'tax_type': self.account.name,
'tax_rate': 2,
}
]
}).insert()
self.item = frappe.get_doc({
'doctype': 'Item',
'item_code': uuid4(),
@ -34,8 +44,8 @@ class TestTaxes(unittest.TestCase):
'is_stock_item': 0,
'taxes': [
{
'tax_type': self.account.name,
'tax_rate': 2,
'item_tax_template': self.item_tax_template.name,
'tax_category': '',
}
],
}).insert()
@ -58,6 +68,7 @@ class TestTaxes(unittest.TestCase):
'doctype': dt,
'company': self.company.name,
'supplier': self.supplier.name,
'currency': "USD",
'schedule_date': frappe.utils.nowdate(),
'delivery_date': frappe.utils.nowdate(),
'customer': self.customer.name,
@ -90,5 +101,6 @@ class TestTaxes(unittest.TestCase):
doc.delete()
self.item.delete()
self.item_group.delete()
self.item_tax_template.delete()
self.account.delete()
self.company.delete()

View File

@ -29,11 +29,11 @@ def make_timesheet_for_projects(current_date ):
def close_tasks(current_date):
for task in frappe.get_all("Task", ["name"], {"status": "Open", "exp_end_date": ("<", current_date)}):
task = frappe.get_doc("Task", task.name)
task.status = "Closed"
task.status = "Completed"
task.save()
def make_project(current_date):
if not frappe.db.exists('Project',
if not frappe.db.exists('Project',
"New Product Development " + current_date.strftime("%Y-%m-%d")):
project = frappe.get_doc({
"doctype": "Project",

View File

@ -40,7 +40,7 @@ def get_products_details():
products_response = call_mws_method(products.get_matching_product,marketplaceid=marketplace,
asins=asin_list)
matching_products_list = products_response.parsed
matching_products_list = products_response.parsed
for product in matching_products_list:
skus = [row["sku"] for row in sku_asin if row["asin"]==product.ASIN]
for sku in skus:
@ -116,7 +116,7 @@ def call_mws_method(mws_method, *args, **kwargs):
mws_settings = frappe.get_doc("Amazon MWS Settings")
max_retries = mws_settings.max_retry_limit
for x in xrange(0, max_retries):
for x in range(0, max_retries):
try:
response = mws_method(*args, **kwargs)
return response

View File

@ -28,7 +28,7 @@ class WoocommerceSettings(Document):
if not frappe.get_value("Custom Field",{"name":i[0]}) or not frappe.get_value("Custom Field",{"name":i[1]}):
create_custom_field_id_and_check_status = True
break;
break
if create_custom_field_id_and_check_status:

View File

@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
@ -55,7 +56,7 @@
"collapsible": 0,
"columns": 0,
"fieldname": "item_code",
"fieldtype": "Read Only",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@ -71,7 +72,7 @@
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
@ -707,7 +708,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-08-08 13:00:06.260997",
"modified": "2019-02-12 11:37:18.713344",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Clinical Procedure Template",

View File

@ -211,7 +211,8 @@ doc_events = {
"validate": "erpnext.portal.doctype.products_settings.products_settings.home_page_is_products"
},
"Sales Invoice": {
"on_submit": "erpnext.regional.france.utils.create_transaction_log",
"on_submit": ["erpnext.regional.france.utils.create_transaction_log", "erpnext.regional.italy.utils.sales_invoice_on_submit"],
"on_cancel": "erpnext.regional.italy.utils.sales_invoice_on_cancel",
"on_trash": "erpnext.regional.check_deletion_permission"
},
"Payment Entry": {
@ -219,7 +220,7 @@ doc_events = {
"on_trash": "erpnext.regional.check_deletion_permission"
},
'Address': {
'validate': 'erpnext.regional.india.utils.validate_gstin_for_india'
'validate': ['erpnext.regional.india.utils.validate_gstin_for_india', 'erpnext.regional.italy.utils.set_state_code']
},
('Sales Invoice', 'Purchase Invoice', 'Delivery Note'): {
'validate': 'erpnext.regional.india.utils.set_place_of_supply'
@ -312,5 +313,9 @@ regional_overrides = {
},
'Saudi Arabia': {
'erpnext.controllers.taxes_and_totals.update_itemised_tax_data': 'erpnext.regional.united_arab_emirates.utils.update_itemised_tax_data'
},
'Italy': {
'erpnext.controllers.taxes_and_totals.update_itemised_tax_data': 'erpnext.regional.italy.utils.update_itemised_tax_data',
'erpnext.controllers.accounts_controller.validate_regional': 'erpnext.regional.italy.utils.sales_invoice_validate',
}
}

View File

@ -11,8 +11,8 @@ from frappe.utils import getdate, date_diff
class AdditionalSalary(Document):
def validate(self):
self.validate_dates()
if self.amount <= 0:
frappe.throw(_("Amount should be greater than zero."))
if self.amount < 0:
frappe.throw(_("Amount should not be less than zero."))
def validate_dates(self):
date_of_joining, relieving_date = frappe.db.get_value("Employee", self.employee,

Some files were not shown because too many files have changed in this diff Show More