Merge branch 'develop' of github.com:frappe/erpnext into develop

This commit is contained in:
Nabin Hait 2014-05-02 15:45:52 +05:30
commit ef30932807
28 changed files with 1671 additions and 1678 deletions

View File

@ -102,11 +102,6 @@ data = [
"name": "Department",
"description": _("Organization unit (department) master.")
},
{
"type": "doctype",
"name": "Grade",
"description": _("Employee grade.")
},
{
"type": "doctype",
"name": "Designation",
@ -199,4 +194,4 @@ data = [
},
]
},
]
]

View File

@ -150,6 +150,11 @@ data = [
"name": "Sales Email Settings",
"description": _("Setup incoming server for sales email id. (e.g. sales@example.com)")
},
{
"type": "doctype",
"name": "Industry Type",
"description": _("Track Leads by Industry Type.")
},
]
},
{
@ -257,4 +262,4 @@ data = [
},
]
},
]
]

60
erpnext/hooks.py Normal file
View File

@ -0,0 +1,60 @@
app_name = "erpnext"
app_title = "ERPNext"
app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors"
app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
app_icon = "icon-th"
app_color = "#e74c3c"
app_version = "4.0.0-wip"
app_include_js = "assets/js/erpnext.min.js"
app_include_css = "assets/css/erpnext.css"
web_include_js = "assets/js/erpnext-web.min.js"
after_install = "erpnext.setup.install.after_install"
boot_session = "erpnext.startup.boot.boot_session"
notification_config = "erpnext.startup.notifications.get_notification_config"
dump_report_map = "erpnext.startup.report_data_map.data_map"
update_website_context = "erpnext.startup.webutils.update_website_context"
mail_footer = "erpnext.startup.mail_footer"
on_session_creation = "erpnext.startup.event_handlers.on_session_creation"
before_tests = "erpnext.setup.utils.before_tests"
standard_queries = "Customer:erpnext.selling.doctype.customer.customer.get_customer_list"
doc_events = {
"*": {
"on_update": "erpnext.home.update_feed",
"on_submit": "erpnext.home.update_feed"
},
"Comment": {
"on_update": "erpnext.home.make_comment_feed"
},
"Stock Entry": {
"on_submit": "erpnext.stock.doctype.material_request.material_request.update_completed_qty",
"on_cancel": "erpnext.stock.doctype.material_request.material_request.update_completed_qty"
}
}
scheduler_events = {
"all": [
"erpnext.support.doctype.support_ticket.get_support_mails.get_support_mails",
"erpnext.hr.doctype.job_applicant.get_job_applications.get_job_applications",
"erpnext.selling.doctype.lead.get_leads.get_leads"
],
"daily": [
"erpnext.accounts.doctype.sales_invoice.sales_invoice.manage_recurring_invoices",
"erpnext.stock.utils.reorder_item",
"erpnext.setup.doctype.email_digest.email_digest.send",
"erpnext.support.doctype.support_ticket.support_ticket.auto_close_tickets"
],
"daily_long": [
"erpnext.setup.doctype.backup_manager.backup_manager.take_backups_daily"
],
"weekly_long": [
"erpnext.setup.doctype.backup_manager.backup_manager.take_backups_weekly"
]
}

View File

@ -1,57 +0,0 @@
app_name = erpnext
app_title = ERPNext
app_publisher = Web Notes Technologies Pvt. Ltd. and Contributors
app_description = Open Source Enterprise Resource Planning for Small and Midsized Organizations
app_icon = icon-th
app_color = #e74c3c
app_version = 4.0.0-wip
app_include_js = assets/js/erpnext.min.js
app_include_css = assets/css/erpnext.css
web_include_js = assets/js/erpnext-web.min.js
after_install = erpnext.setup.install.after_install
boot_session = erpnext.startup.boot.boot_session
notification_config = erpnext.startup.notifications.get_notification_config
dump_report_map = erpnext.startup.report_data_map.data_map
update_website_context = erpnext.startup.webutils.update_website_context
mail_footer = erpnext.startup.mail_footer
on_session_creation = erpnext.startup.event_handlers.on_session_creation
before_tests = erpnext.setup.utils.before_tests
# Bean Events
# -------------------------
doc_event:*:on_update = erpnext.home.update_feed
doc_event:*:on_submit = erpnext.home.update_feed
doc_event:Comment:on_update = erpnext.home.make_comment_feed
doc_event:Stock Entry:on_submit = erpnext.stock.doctype.material_request.material_request.update_completed_qty
doc_event:Stock Entry:on_cancel = erpnext.stock.doctype.material_request.material_request.update_completed_qty
standard_queries = Customer:erpnext.selling.doctype.customer.customer.get_customer_list
# Schedulers
# -------------------------
#### Frequently
scheduler_event:all = erpnext.support.doctype.support_ticket.get_support_mails.get_support_mails
scheduler_event:all = erpnext.hr.doctype.job_applicant.get_job_applications.get_job_applications
scheduler_event:all = erpnext.selling.doctype.lead.get_leads.get_leads
#### Daily
scheduler_event:daily = erpnext.accounts.doctype.sales_invoice.sales_invoice.manage_recurring_invoices
scheduler_event:daily_long = erpnext.setup.doctype.backup_manager.backup_manager.take_backups_daily
scheduler_event:daily = erpnext.stock.utils.reorder_item
scheduler_event:daily = erpnext.setup.doctype.email_digest.email_digest.send
scheduler_event:daily = erpnext.support.doctype.support_ticket.support_ticket.auto_close_tickets
#### Weekly
scheduler_event:weekly_long = erpnext.setup.doctype.backup_manager.backup_manager.take_backups_weekly

View File

@ -1,58 +1,49 @@
{
"allow_import": 1,
"autoname": "field:department_name",
"creation": "2013-02-05 11:48:26.000000",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"allow_import": 1,
"autoname": "field:department_name",
"creation": "2013-02-05 11:48:26.000000",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"fields": [
{
"fieldname": "trash_reason",
"fieldtype": "Small Text",
"label": "Trash Reason",
"oldfieldname": "trash_reason",
"oldfieldtype": "Small Text",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "department_name",
"fieldtype": "Data",
"label": "Department",
"oldfieldname": "department_name",
"oldfieldtype": "Data",
"permlevel": 0,
"fieldname": "department_name",
"fieldtype": "Data",
"label": "Department",
"oldfieldname": "department_name",
"oldfieldtype": "Data",
"permlevel": 0,
"reqd": 1
},
},
{
"description": "Days for which Holidays are blocked for this department.",
"fieldname": "leave_block_list",
"fieldtype": "Link",
"label": "Leave Block List",
"options": "Leave Block List",
"description": "Days for which Holidays are blocked for this department.",
"fieldname": "leave_block_list",
"fieldtype": "Link",
"label": "Leave Block List",
"options": "Leave Block List",
"permlevel": 0
}
],
"icon": "icon-sitemap",
"idx": 1,
"modified": "2014-01-20 17:48:38.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Department",
"owner": "Administrator",
],
"icon": "icon-sitemap",
"idx": 1,
"modified": "2014-01-20 17:48:38.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Department",
"owner": "Administrator",
"permissions": [
{
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"submit": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"submit": 0,
"write": 1
}
]
}
}

View File

@ -1,51 +1,42 @@
{
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:designation_name",
"creation": "2013-01-10 16:34:13.000000",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:designation_name",
"creation": "2013-01-10 16:34:13.000000",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"fields": [
{
"fieldname": "trash_reason",
"fieldtype": "Small Text",
"label": "Trash Reason",
"oldfieldname": "trash_reason",
"oldfieldtype": "Small Text",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "designation_name",
"fieldtype": "Data",
"label": "Designation",
"oldfieldname": "designation_name",
"oldfieldtype": "Data",
"permlevel": 0,
"fieldname": "designation_name",
"fieldtype": "Data",
"label": "Designation",
"oldfieldname": "designation_name",
"oldfieldtype": "Data",
"permlevel": 0,
"reqd": 1
}
],
"icon": "icon-bookmark",
"idx": 1,
"modified": "2014-01-20 17:48:38.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Designation",
"owner": "Administrator",
],
"icon": "icon-bookmark",
"idx": 1,
"modified": "2014-01-20 17:48:38.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Designation",
"owner": "Administrator",
"permissions": [
{
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"submit": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"submit": 0,
"write": 1
}
]
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,72 +1,62 @@
{
"creation": "2013-02-22 01:27:45.000000",
"docstatus": 0,
"doctype": "DocType",
"creation": "2013-02-22 01:27:45.000000",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "branch",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Branch",
"oldfieldname": "branch",
"oldfieldtype": "Select",
"options": "link:Branch",
"fieldname": "branch",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Branch",
"oldfieldname": "branch",
"oldfieldtype": "Select",
"options": "link:Branch",
"permlevel": 0
},
},
{
"fieldname": "department",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Department",
"oldfieldname": "department",
"oldfieldtype": "Select",
"options": "link:Department",
"fieldname": "department",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Department",
"oldfieldname": "department",
"oldfieldtype": "Select",
"options": "link:Department",
"permlevel": 0
},
},
{
"fieldname": "designation",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Designation",
"oldfieldname": "designation",
"oldfieldtype": "Select",
"options": "link:Designation",
"fieldname": "designation",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Designation",
"oldfieldname": "designation",
"oldfieldtype": "Select",
"options": "link:Designation",
"permlevel": 0
},
},
{
"fieldname": "grade",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Grade",
"oldfieldname": "grade",
"oldfieldtype": "Select",
"options": "link:Grade",
"fieldname": "from_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "From Date",
"oldfieldname": "from_date",
"oldfieldtype": "Date",
"permlevel": 0
},
},
{
"fieldname": "from_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "From Date",
"oldfieldname": "from_date",
"oldfieldtype": "Date",
"permlevel": 0
},
{
"fieldname": "to_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "To Date",
"oldfieldname": "to_date",
"oldfieldtype": "Date",
"fieldname": "to_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "To Date",
"oldfieldname": "to_date",
"oldfieldtype": "Date",
"permlevel": 0
}
],
"idx": 1,
"istable": 1,
"modified": "2013-12-20 19:23:12.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Internal Work History",
],
"idx": 1,
"istable": 1,
"modified": "2013-12-20 19:24:12.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Internal Work History",
"owner": "Administrator"
}
}

View File

@ -1,63 +1,54 @@
{
"allow_import": 1,
"autoname": "field:employee_type_name",
"creation": "2013-01-10 16:34:14.000000",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"allow_import": 1,
"autoname": "field:employee_type_name",
"creation": "2013-01-10 16:34:14.000000",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"fields": [
{
"fieldname": "employee_type_name",
"fieldtype": "Data",
"label": "Employment Type",
"oldfieldname": "employee_type_name",
"oldfieldtype": "Data",
"permlevel": 0,
"fieldname": "employee_type_name",
"fieldtype": "Data",
"label": "Employment Type",
"oldfieldname": "employee_type_name",
"oldfieldtype": "Data",
"permlevel": 0,
"reqd": 1
},
{
"fieldname": "trash_reason",
"fieldtype": "Small Text",
"label": "Trash Reason",
"oldfieldname": "trash_reason",
"oldfieldtype": "Small Text",
"permlevel": 0,
"read_only": 1
}
],
"icon": "icon-flag",
"idx": 1,
"modified": "2014-01-20 17:48:43.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Employment Type",
"owner": "Administrator",
],
"icon": "icon-flag",
"idx": 1,
"modified": "2014-01-20 17:48:43.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Employment Type",
"owner": "Administrator",
"permissions": [
{
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"submit": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"submit": 0,
"write": 1
},
},
{
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR Manager",
"submit": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR Manager",
"submit": 0,
"write": 1
}
]
}
}

View File

@ -1 +0,0 @@
Employee grade.

View File

@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@ -1,41 +0,0 @@
{
"allow_import": 1,
"autoname": "field:grade_name",
"creation": "2013-01-10 16:34:14.000000",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"fields": [
{
"fieldname": "grade_name",
"fieldtype": "Data",
"label": "Grade",
"oldfieldname": "grade_name",
"oldfieldtype": "Data",
"permlevel": 0,
"reqd": 1
}
],
"icon": "icon-star-half-empty",
"idx": 1,
"modified": "2014-01-20 17:48:46.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Grade",
"owner": "Administrator",
"permissions": [
{
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"submit": 0,
"write": 1
}
]
}

View File

@ -1,10 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class Grade(Document):
pass

View File

@ -1,6 +0,0 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import frappe
test_records = frappe.get_test_records('Grade')

View File

@ -1 +0,0 @@
[]

View File

@ -1,122 +1,114 @@
{
"allow_copy": 1,
"allow_email": 1,
"allow_print": 1,
"creation": "2013-01-10 16:34:15.000000",
"docstatus": 0,
"doctype": "DocType",
"allow_copy": 1,
"allow_email": 1,
"allow_print": 1,
"creation": "2013-01-10 16:34:15.000000",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "column_break0",
"fieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break0",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"description": "Leave blank if considered for all employee types",
"fieldname": "employee_type",
"fieldtype": "Select",
"label": "Employee Type",
"options": "link:Employment Type",
"description": "Leave blank if considered for all employee types",
"fieldname": "employee_type",
"fieldtype": "Select",
"label": "Employee Type",
"options": "link:Employment Type",
"permlevel": 0
},
},
{
"description": "Leave blank if considered for all branches",
"fieldname": "branch",
"fieldtype": "Select",
"label": "Branch",
"options": "link:Branch",
"description": "Leave blank if considered for all branches",
"fieldname": "branch",
"fieldtype": "Select",
"label": "Branch",
"options": "link:Branch",
"permlevel": 0
},
},
{
"description": "Leave blank if considered for all departments",
"fieldname": "department",
"fieldtype": "Select",
"label": "Department",
"options": "link:Department",
"description": "Leave blank if considered for all departments",
"fieldname": "department",
"fieldtype": "Select",
"label": "Department",
"options": "link:Department",
"permlevel": 0
},
},
{
"description": "Leave blank if considered for all designations",
"fieldname": "designation",
"fieldtype": "Select",
"label": "Designation",
"options": "link:Designation",
"description": "Leave blank if considered for all designations",
"fieldname": "designation",
"fieldtype": "Select",
"label": "Designation",
"options": "link:Designation",
"permlevel": 0
},
},
{
"description": "Leave blank if considered for all grades",
"fieldname": "grade",
"fieldtype": "Select",
"label": "Grade",
"options": "link:Grade",
"permlevel": 0
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"fieldname": "fiscal_year",
"fieldtype": "Select",
"in_filter": 1,
"label": "Fiscal Year",
"options": "link:Fiscal Year",
"permlevel": 0,
"fieldname": "fiscal_year",
"fieldtype": "Select",
"in_filter": 1,
"label": "Fiscal Year",
"options": "link:Fiscal Year",
"permlevel": 0,
"reqd": 1
},
},
{
"fieldname": "leave_type",
"fieldtype": "Select",
"label": "Leave Type",
"options": "link:Leave Type",
"permlevel": 0,
"fieldname": "leave_type",
"fieldtype": "Select",
"label": "Leave Type",
"options": "link:Leave Type",
"permlevel": 0,
"reqd": 1
},
},
{
"description": "Please select Carry Forward if you also want to include previous fiscal year's balance leaves to this fiscal year",
"fieldname": "carry_forward",
"fieldtype": "Check",
"label": "Carry Forward",
"description": "Please select Carry Forward if you also want to include previous fiscal year's balance leaves to this fiscal year",
"fieldname": "carry_forward",
"fieldtype": "Check",
"label": "Carry Forward",
"permlevel": 0
},
},
{
"fieldname": "no_of_days",
"fieldtype": "Float",
"label": "New Leaves Allocated (In Days)",
"permlevel": 0,
"fieldname": "no_of_days",
"fieldtype": "Float",
"label": "New Leaves Allocated (In Days)",
"permlevel": 0,
"reqd": 1
},
},
{
"fieldname": "allocate",
"fieldtype": "Button",
"label": "Allocate",
"options": "allocate_leave",
"fieldname": "allocate",
"fieldtype": "Button",
"label": "Allocate",
"options": "allocate_leave",
"permlevel": 0
}
],
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "icon-cog",
"idx": 1,
"issingle": 1,
"modified": "2013-07-05 14:44:50.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Control Panel",
"owner": "Administrator",
],
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "icon-cog",
"idx": 1,
"issingle": 1,
"modified": "2013-07-05 14:45:50.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Control Panel",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"permlevel": 0,
"read": 1,
"report": 0,
"role": "HR User",
"submit": 0,
"create": 1,
"permlevel": 0,
"read": 1,
"report": 0,
"role": "HR User",
"submit": 0,
"write": 1
}
],
],
"read_only": 1
}
}

View File

@ -10,7 +10,7 @@ from frappe.model.document import Document
class LeaveControlPanel(Document):
def get_employees(self):
lst1 = [[self.employee_type,"employment_type"],[self.branch,"branch"],[self.designation,"designation"],[self.department, "department"],[self.grade,"grade"]]
lst1 = [[self.employee_type,"employment_type"],[self.branch,"branch"],[self.designation,"designation"],[self.department, "department"]]
condition = "where "
flag = 0
for l in lst1:

View File

@ -1,166 +1,159 @@
{
"allow_copy": 1,
"allow_email": 1,
"allow_print": 1,
"creation": "2012-03-27 14:35:59.000000",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Other",
"allow_copy": 1,
"allow_email": 1,
"allow_print": 1,
"creation": "2012-03-27 14:35:59.000000",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Other",
"fields": [
{
"fieldname": "document_description",
"fieldtype": "HTML",
"label": "Document Description",
"options": "<div class=\"field_description\">You can generate multiple salary slips based on the selected criteria, submit and mail those to the employee directly from here</div>",
"fieldname": "document_description",
"fieldtype": "HTML",
"label": "Document Description",
"options": "<div class=\"field_description\">You can generate multiple salary slips based on the selected criteria, submit and mail those to the employee directly from here</div>",
"permlevel": 0
},
},
{
"fieldname": "section_break0",
"fieldtype": "Section Break",
"fieldname": "section_break0",
"fieldtype": "Section Break",
"permlevel": 0
},
},
{
"fieldname": "column_break0",
"fieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break0",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"fieldname": "company",
"fieldtype": "Select",
"label": "Company",
"options": "link:Company",
"permlevel": 0,
"fieldname": "company",
"fieldtype": "Select",
"label": "Company",
"options": "link:Company",
"permlevel": 0,
"reqd": 1
},
},
{
"fieldname": "branch",
"fieldtype": "Link",
"label": "Branch",
"options": "Branch",
"fieldname": "branch",
"fieldtype": "Link",
"label": "Branch",
"options": "Branch",
"permlevel": 0
},
},
{
"fieldname": "department",
"fieldtype": "Link",
"label": "Department",
"options": "Department",
"fieldname": "department",
"fieldtype": "Link",
"label": "Department",
"options": "Department",
"permlevel": 0
},
},
{
"fieldname": "designation",
"fieldtype": "Link",
"label": "Designation",
"options": "Designation",
"fieldname": "designation",
"fieldtype": "Link",
"label": "Designation",
"options": "Designation",
"permlevel": 0
},
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"fieldname": "grade",
"fieldtype": "Select",
"label": "Grade",
"options": "link:Grade",
"permlevel": 0
},
{
"fieldname": "fiscal_year",
"fieldtype": "Select",
"label": "Fiscal Year",
"options": "link:Fiscal Year",
"permlevel": 0,
"fieldname": "fiscal_year",
"fieldtype": "Select",
"label": "Fiscal Year",
"options": "link:Fiscal Year",
"permlevel": 0,
"reqd": 1
},
},
{
"fieldname": "month",
"fieldtype": "Select",
"label": "Month",
"options": "\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12",
"permlevel": 0,
"fieldname": "month",
"fieldtype": "Select",
"label": "Month",
"options": "\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12",
"permlevel": 0,
"reqd": 1
},
},
{
"description": "Check if you want to send salary slip in mail to each employee while submitting salary slip",
"fieldname": "send_email",
"fieldtype": "Check",
"label": "Send Email",
"description": "Check if you want to send salary slip in mail to each employee while submitting salary slip",
"fieldname": "send_email",
"fieldtype": "Check",
"label": "Send Email",
"permlevel": 0
},
},
{
"fieldname": "section_break1",
"fieldtype": "Section Break",
"fieldname": "section_break1",
"fieldtype": "Section Break",
"permlevel": 0
},
},
{
"fieldname": "column_break2",
"fieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break2",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"description": "Creates salary slip for above mentioned criteria.",
"fieldname": "create_salary_slip",
"fieldtype": "Button",
"label": "Create Salary Slip",
"description": "Creates salary slip for above mentioned criteria.",
"fieldname": "create_salary_slip",
"fieldtype": "Button",
"label": "Create Salary Slip",
"permlevel": 0
},
},
{
"fieldname": "column_break3",
"fieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break3",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "25%"
},
},
{
"description": "Submit all salary slips for the above selected criteria",
"fieldname": "submit_salary_slip",
"fieldtype": "Button",
"label": "Submit Salary Slip",
"description": "Submit all salary slips for the above selected criteria",
"fieldname": "submit_salary_slip",
"fieldtype": "Button",
"label": "Submit Salary Slip",
"permlevel": 0
},
},
{
"fieldname": "column_break4",
"fieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break4",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "25%"
},
},
{
"description": "Create Bank Voucher for the total salary paid for the above selected criteria",
"fieldname": "make_bank_voucher",
"fieldtype": "Button",
"label": "Make Bank Voucher",
"description": "Create Bank Voucher for the total salary paid for the above selected criteria",
"fieldname": "make_bank_voucher",
"fieldtype": "Button",
"label": "Make Bank Voucher",
"permlevel": 0
},
},
{
"fieldname": "section_break2",
"fieldtype": "Section Break",
"fieldname": "section_break2",
"fieldtype": "Section Break",
"permlevel": 0
},
},
{
"fieldname": "activity_log",
"fieldtype": "HTML",
"label": "Activity Log",
"fieldname": "activity_log",
"fieldtype": "HTML",
"label": "Activity Log",
"permlevel": 0
}
],
"icon": "icon-cog",
"idx": 1,
"issingle": 1,
"modified": "2013-07-22 15:22:58.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Manager",
"owner": "Administrator",
],
"icon": "icon-cog",
"idx": 1,
"issingle": 1,
"modified": "2013-07-22 15:23:58.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Manager",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"permlevel": 0,
"read": 1,
"role": "HR Manager",
"create": 1,
"permlevel": 0,
"read": 1,
"role": "HR Manager",
"write": 1
}
]
}
}

View File

@ -33,7 +33,7 @@ class SalaryManager(Document):
self.check_mandatory()
cond = ''
for f in ['company', 'branch', 'department', 'designation', 'grade']:
for f in ['company', 'branch', 'department', 'designation']:
if self.get(f):
cond += " and t1." + f + " = '" + self.get(f).replace("'", "\'") + "'"

View File

@ -1,398 +1,386 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
"doctype": "DocType",
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "column_break0",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break0",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"fieldname": "employee",
"fieldtype": "Link",
"in_filter": 1,
"label": "Employee",
"oldfieldname": "employee",
"oldfieldtype": "Link",
"options": "Employee",
"permlevel": 0,
"reqd": 1,
"fieldname": "employee",
"fieldtype": "Link",
"in_filter": 1,
"label": "Employee",
"oldfieldname": "employee",
"oldfieldtype": "Link",
"options": "Employee",
"permlevel": 0,
"reqd": 1,
"search_index": 1
},
},
{
"fieldname": "employee_name",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Employee Name",
"oldfieldname": "employee_name",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1,
"fieldname": "employee_name",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Employee Name",
"oldfieldname": "employee_name",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1,
"reqd": 1
},
},
{
"fieldname": "department",
"fieldtype": "Link",
"in_filter": 1,
"label": "Department",
"oldfieldname": "department",
"oldfieldtype": "Link",
"options": "Department",
"permlevel": 0,
"read_only": 1,
"reqd": 0,
"fieldname": "department",
"fieldtype": "Link",
"in_filter": 1,
"label": "Department",
"oldfieldname": "department",
"oldfieldtype": "Link",
"options": "Department",
"permlevel": 0,
"read_only": 1,
"reqd": 0,
"search_index": 0
},
},
{
"fieldname": "designation",
"fieldtype": "Link",
"in_filter": 1,
"label": "Designation",
"oldfieldname": "designation",
"oldfieldtype": "Link",
"options": "Designation",
"permlevel": 0,
"read_only": 1,
"fieldname": "designation",
"fieldtype": "Link",
"in_filter": 1,
"label": "Designation",
"oldfieldname": "designation",
"oldfieldtype": "Link",
"options": "Designation",
"permlevel": 0,
"read_only": 1,
"search_index": 0
},
},
{
"fieldname": "branch",
"fieldtype": "Link",
"in_filter": 1,
"label": "Branch",
"oldfieldname": "branch",
"oldfieldtype": "Link",
"options": "Branch",
"permlevel": 0,
"read_only": 1,
"fieldname": "branch",
"fieldtype": "Link",
"in_filter": 1,
"label": "Branch",
"oldfieldname": "branch",
"oldfieldtype": "Link",
"options": "Branch",
"permlevel": 0,
"read_only": 1,
"search_index": 0
},
},
{
"fieldname": "grade",
"fieldtype": "Link",
"in_filter": 1,
"label": "Grade",
"oldfieldname": "grade",
"oldfieldtype": "Link",
"options": "Grade",
"permlevel": 0,
"read_only": 1,
"search_index": 0
},
{
"fieldname": "pf_no",
"fieldtype": "Data",
"label": "PF No.",
"oldfieldname": "pf_no",
"oldfieldtype": "Data",
"permlevel": 0,
"fieldname": "pf_no",
"fieldtype": "Data",
"label": "PF No.",
"oldfieldname": "pf_no",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "esic_no",
"fieldtype": "Data",
"label": "ESIC No.",
"oldfieldname": "esic_no",
"oldfieldtype": "Data",
"permlevel": 0,
"fieldname": "esic_no",
"fieldtype": "Data",
"label": "ESIC No.",
"oldfieldname": "esic_no",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "letter_head",
"fieldtype": "Link",
"label": "Letter Head",
"options": "Letter Head",
"fieldname": "letter_head",
"fieldtype": "Link",
"label": "Letter Head",
"options": "Letter Head",
"permlevel": 0
},
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"fieldname": "fiscal_year",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"label": "Fiscal Year",
"oldfieldname": "fiscal_year",
"oldfieldtype": "Data",
"options": "Fiscal Year",
"permlevel": 0,
"reqd": 1,
"fieldname": "fiscal_year",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"label": "Fiscal Year",
"oldfieldname": "fiscal_year",
"oldfieldtype": "Data",
"options": "Fiscal Year",
"permlevel": 0,
"reqd": 1,
"search_index": 0
},
},
{
"fieldname": "company",
"fieldtype": "Select",
"in_filter": 1,
"label": "Company",
"options": "link:Company",
"permlevel": 0,
"fieldname": "company",
"fieldtype": "Select",
"in_filter": 1,
"label": "Company",
"options": "link:Company",
"permlevel": 0,
"reqd": 1
},
},
{
"fieldname": "month",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Month",
"oldfieldname": "month",
"oldfieldtype": "Select",
"options": "\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12",
"permlevel": 0,
"reqd": 1,
"search_index": 1,
"fieldname": "month",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Month",
"oldfieldname": "month",
"oldfieldtype": "Select",
"options": "\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12",
"permlevel": 0,
"reqd": 1,
"search_index": 1,
"width": "37%"
},
},
{
"fieldname": "total_days_in_month",
"fieldtype": "Data",
"label": "Total Working Days In The Month",
"oldfieldname": "total_days_in_month",
"oldfieldtype": "Int",
"permlevel": 0,
"read_only": 1,
"fieldname": "total_days_in_month",
"fieldtype": "Data",
"label": "Total Working Days In The Month",
"oldfieldname": "total_days_in_month",
"oldfieldtype": "Int",
"permlevel": 0,
"read_only": 1,
"reqd": 1
},
},
{
"fieldname": "leave_without_pay",
"fieldtype": "Float",
"label": "Leave Without Pay",
"oldfieldname": "leave_without_pay",
"oldfieldtype": "Currency",
"fieldname": "leave_without_pay",
"fieldtype": "Float",
"label": "Leave Without Pay",
"oldfieldname": "leave_without_pay",
"oldfieldtype": "Currency",
"permlevel": 0
},
},
{
"fieldname": "payment_days",
"fieldtype": "Float",
"label": "Payment Days",
"oldfieldname": "payment_days",
"oldfieldtype": "Float",
"permlevel": 0,
"read_only": 1,
"fieldname": "payment_days",
"fieldtype": "Float",
"label": "Payment Days",
"oldfieldname": "payment_days",
"oldfieldtype": "Float",
"permlevel": 0,
"read_only": 1,
"reqd": 1
},
},
{
"fieldname": "bank_name",
"fieldtype": "Data",
"label": "Bank Name",
"oldfieldname": "bank_name",
"oldfieldtype": "Data",
"permlevel": 0,
"fieldname": "bank_name",
"fieldtype": "Data",
"label": "Bank Name",
"oldfieldname": "bank_name",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "bank_account_no",
"fieldtype": "Data",
"label": "Bank Account No.",
"oldfieldname": "bank_account_no",
"oldfieldtype": "Data",
"permlevel": 0,
"fieldname": "bank_account_no",
"fieldtype": "Data",
"label": "Bank Account No.",
"oldfieldname": "bank_account_no",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "email_check",
"fieldtype": "Check",
"label": "Email",
"no_copy": 1,
"oldfieldname": "email_check",
"oldfieldtype": "Check",
"permlevel": 0,
"print_hide": 1,
"fieldname": "email_check",
"fieldtype": "Check",
"label": "Email",
"no_copy": 1,
"oldfieldname": "email_check",
"oldfieldtype": "Check",
"permlevel": 0,
"print_hide": 1,
"report_hide": 1
},
},
{
"fieldname": "amended_from",
"fieldtype": "Data",
"hidden": 0,
"ignore_restrictions": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"fieldname": "amended_from",
"fieldtype": "Data",
"hidden": 0,
"ignore_restrictions": 1,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"report_hide": 0
},
},
{
"fieldname": "earning_deduction",
"fieldtype": "Section Break",
"label": "Earning & Deduction",
"oldfieldtype": "Section Break",
"fieldname": "earning_deduction",
"fieldtype": "Section Break",
"label": "Earning & Deduction",
"oldfieldtype": "Section Break",
"permlevel": 0
},
},
{
"fieldname": "earning",
"fieldtype": "Column Break",
"label": "Earning",
"oldfieldtype": "Column Break",
"permlevel": 0,
"reqd": 0,
"fieldname": "earning",
"fieldtype": "Column Break",
"label": "Earning",
"oldfieldtype": "Column Break",
"permlevel": 0,
"reqd": 0,
"width": "50%"
},
},
{
"fieldname": "earning_details",
"fieldtype": "Table",
"label": "Salary Structure Earnings",
"oldfieldname": "earning_details",
"oldfieldtype": "Table",
"options": "Salary Slip Earning",
"fieldname": "earning_details",
"fieldtype": "Table",
"label": "Salary Structure Earnings",
"oldfieldname": "earning_details",
"oldfieldtype": "Table",
"options": "Salary Slip Earning",
"permlevel": 0
},
},
{
"fieldname": "deduction",
"fieldtype": "Column Break",
"label": "Deduction",
"oldfieldtype": "Column Break",
"permlevel": 0,
"fieldname": "deduction",
"fieldtype": "Column Break",
"label": "Deduction",
"oldfieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"fieldname": "deduction_details",
"fieldtype": "Table",
"label": "Deductions",
"oldfieldname": "deduction_details",
"oldfieldtype": "Table",
"options": "Salary Slip Deduction",
"fieldname": "deduction_details",
"fieldtype": "Table",
"label": "Deductions",
"oldfieldname": "deduction_details",
"oldfieldtype": "Table",
"options": "Salary Slip Deduction",
"permlevel": 0
},
},
{
"fieldname": "totals",
"fieldtype": "Section Break",
"label": "Totals",
"oldfieldtype": "Section Break",
"fieldname": "totals",
"fieldtype": "Section Break",
"label": "Totals",
"oldfieldtype": "Section Break",
"permlevel": 0
},
},
{
"fieldname": "column_break2",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break2",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"fieldname": "arrear_amount",
"fieldtype": "Currency",
"label": "Arrear Amount",
"oldfieldname": "arrear_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"fieldname": "arrear_amount",
"fieldtype": "Currency",
"label": "Arrear Amount",
"oldfieldname": "arrear_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0
},
},
{
"fieldname": "leave_encashment_amount",
"fieldtype": "Currency",
"label": "Leave Encashment Amount",
"oldfieldname": "encashment_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"fieldname": "leave_encashment_amount",
"fieldtype": "Currency",
"label": "Leave Encashment Amount",
"oldfieldname": "encashment_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0
},
},
{
"fieldname": "gross_pay",
"fieldtype": "Currency",
"label": "Gross Pay",
"oldfieldname": "gross_pay",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"fieldname": "gross_pay",
"fieldtype": "Currency",
"label": "Gross Pay",
"oldfieldname": "gross_pay",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "total_deduction",
"fieldtype": "Currency",
"label": "Total Deduction",
"oldfieldname": "total_deduction",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"fieldname": "total_deduction",
"fieldtype": "Currency",
"label": "Total Deduction",
"oldfieldname": "total_deduction",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "column_break3",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"fieldname": "column_break3",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
},
{
"description": "Gross Pay + Arrear Amount +Encashment Amount - Total Deduction",
"fieldname": "net_pay",
"fieldtype": "Currency",
"label": "Net Pay",
"oldfieldname": "net_pay",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"description": "Gross Pay + Arrear Amount +Encashment Amount - Total Deduction",
"fieldname": "net_pay",
"fieldtype": "Currency",
"label": "Net Pay",
"oldfieldname": "net_pay",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "rounded_total",
"fieldtype": "Currency",
"label": "Rounded Total",
"options": "Company:company:default_currency",
"permlevel": 0,
"fieldname": "rounded_total",
"fieldtype": "Currency",
"label": "Rounded Total",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
},
{
"description": "Net Pay (in words) will be visible once you save the Salary Slip.",
"fieldname": "total_in_words",
"fieldtype": "Data",
"label": "Total in words",
"oldfieldname": "net_pay_in_words",
"oldfieldtype": "Data",
"permlevel": 0,
"description": "Net Pay (in words) will be visible once you save the Salary Slip.",
"fieldname": "total_in_words",
"fieldtype": "Data",
"label": "Total in words",
"oldfieldname": "net_pay_in_words",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1
}
],
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-05-01 04:31:14.543092",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Slip",
"owner": "Administrator",
],
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-05-01 04:21:14.543092",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Slip",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"submit": 1,
"amend": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"submit": 1,
"write": 1
},
},
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR Manager",
"submit": 1,
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR Manager",
"submit": 1,
"write": 1
},
},
{
"permlevel": 0,
"read": 1,
"restricted": 0,
"permlevel": 0,
"read": 1,
"restricted": 0,
"role": "Employee"
}
]
}
}

View File

@ -241,7 +241,6 @@ class SalarySlip(TransactionBase):
</tr>
<tr>
<td width = "50%%">Designation : %s</td>
<td width = "50%%">Grade : %s</td>
</tr>
<tr>
<td width = "50%%">Bank Account No. : %s</td>
@ -285,7 +284,7 @@ class SalarySlip(TransactionBase):
</table></div>''' % (cstr(letter_head), cstr(self.employee),
cstr(self.employee_name), cstr(self.month), cstr(self.fiscal_year),
cstr(self.department), cstr(self.branch), cstr(self.designation),
cstr(self.grade), cstr(self.bank_account_no), cstr(self.bank_name),
cstr(self.bank_account_no), cstr(self.bank_name),
cstr(self.arrear_amount), cstr(self.payment_days), earn_table, ded_table,
cstr(flt(self.gross_pay)), cstr(flt(self.total_deduction)),
cstr(flt(self.net_pay)), cstr(self.total_in_words))

View File

@ -1,273 +1,261 @@
{
"allow_import": 1,
"creation": "2013-03-07 18:50:29.000000",
"docstatus": 0,
"doctype": "DocType",
"allow_import": 1,
"creation": "2013-03-07 18:50:29.000000",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "column_break0",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0,
"fieldname": "column_break0",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0,
"width": "50%"
},
},
{
"fieldname": "employee",
"fieldtype": "Link",
"in_filter": 1,
"label": "Employee",
"oldfieldname": "employee",
"oldfieldtype": "Link",
"options": "Employee",
"permlevel": 0,
"read_only": 0,
"fieldname": "employee",
"fieldtype": "Link",
"in_filter": 1,
"label": "Employee",
"oldfieldname": "employee",
"oldfieldtype": "Link",
"options": "Employee",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
},
{
"fieldname": "employee_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Employee Name",
"oldfieldname": "employee_name",
"oldfieldtype": "Data",
"permlevel": 0,
"fieldname": "employee_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Employee Name",
"oldfieldname": "employee_name",
"oldfieldtype": "Data",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "branch",
"fieldtype": "Select",
"in_filter": 1,
"label": "Branch",
"oldfieldname": "branch",
"oldfieldtype": "Select",
"options": "link:Branch",
"permlevel": 0,
"read_only": 1,
"fieldname": "branch",
"fieldtype": "Select",
"in_filter": 1,
"label": "Branch",
"oldfieldname": "branch",
"oldfieldtype": "Select",
"options": "link:Branch",
"permlevel": 0,
"read_only": 1,
"reqd": 0
},
},
{
"fieldname": "designation",
"fieldtype": "Select",
"in_filter": 1,
"label": "Designation",
"oldfieldname": "designation",
"oldfieldtype": "Select",
"options": "link:Designation",
"permlevel": 0,
"read_only": 1,
"fieldname": "designation",
"fieldtype": "Select",
"in_filter": 1,
"label": "Designation",
"oldfieldname": "designation",
"oldfieldtype": "Select",
"options": "link:Designation",
"permlevel": 0,
"read_only": 1,
"reqd": 0
},
},
{
"fieldname": "department",
"fieldtype": "Select",
"in_filter": 1,
"label": "Department",
"oldfieldname": "department",
"oldfieldtype": "Select",
"options": "link:Department",
"permlevel": 0,
"read_only": 1,
"fieldname": "department",
"fieldtype": "Select",
"in_filter": 1,
"label": "Department",
"oldfieldname": "department",
"oldfieldtype": "Select",
"options": "link:Department",
"permlevel": 0,
"read_only": 1,
"reqd": 0
},
},
{
"fieldname": "grade",
"fieldtype": "Select",
"in_filter": 1,
"label": "Grade",
"oldfieldname": "grade",
"oldfieldtype": "Select",
"options": "link:Grade",
"permlevel": 0,
"read_only": 1,
"reqd": 0
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0,
"width": "50%"
},
},
{
"default": "Yes",
"fieldname": "is_active",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Is Active",
"oldfieldname": "is_active",
"oldfieldtype": "Select",
"options": "\nYes\nNo",
"permlevel": 0,
"read_only": 0,
"default": "Yes",
"fieldname": "is_active",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Is Active",
"oldfieldname": "is_active",
"oldfieldtype": "Select",
"options": "\nYes\nNo",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
},
{
"fieldname": "from_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "From Date",
"oldfieldname": "from_date",
"oldfieldtype": "Date",
"permlevel": 0,
"read_only": 0,
"fieldname": "from_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "From Date",
"oldfieldname": "from_date",
"oldfieldtype": "Date",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
},
{
"fieldname": "to_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "To Date",
"oldfieldname": "to_date",
"oldfieldtype": "Date",
"permlevel": 0,
"fieldname": "to_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "To Date",
"oldfieldname": "to_date",
"oldfieldtype": "Date",
"permlevel": 0,
"read_only": 0
},
},
{
"fieldname": "company",
"fieldtype": "Select",
"in_filter": 1,
"label": "Company",
"options": "link:Company",
"permlevel": 0,
"read_only": 0,
"fieldname": "company",
"fieldtype": "Select",
"in_filter": 1,
"label": "Company",
"options": "link:Company",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
},
{
"description": "Salary breakup based on Earning and Deduction.",
"fieldname": "earning_deduction",
"fieldtype": "Section Break",
"label": "Monthly Earning & Deduction",
"oldfieldname": "earning_deduction",
"oldfieldtype": "Section Break",
"permlevel": 0,
"description": "Salary breakup based on Earning and Deduction.",
"fieldname": "earning_deduction",
"fieldtype": "Section Break",
"label": "Monthly Earning & Deduction",
"oldfieldname": "earning_deduction",
"oldfieldtype": "Section Break",
"permlevel": 0,
"read_only": 0
},
},
{
"fieldname": "earning",
"fieldtype": "Column Break",
"hidden": 0,
"label": "Earning",
"oldfieldname": "col_brk2",
"oldfieldtype": "Column Break",
"permlevel": 0,
"read_only": 0,
"fieldname": "earning",
"fieldtype": "Column Break",
"hidden": 0,
"label": "Earning",
"oldfieldname": "col_brk2",
"oldfieldtype": "Column Break",
"permlevel": 0,
"read_only": 0,
"width": "50%"
},
},
{
"fieldname": "earning_details",
"fieldtype": "Table",
"hidden": 0,
"label": "Earning1",
"oldfieldname": "earning_details",
"oldfieldtype": "Table",
"options": "Salary Structure Earning",
"permlevel": 0,
"fieldname": "earning_details",
"fieldtype": "Table",
"hidden": 0,
"label": "Earning1",
"oldfieldname": "earning_details",
"oldfieldtype": "Table",
"options": "Salary Structure Earning",
"permlevel": 0,
"read_only": 0
},
},
{
"fieldname": "deduction",
"fieldtype": "Column Break",
"hidden": 0,
"label": "Deduction",
"oldfieldname": "col_brk3",
"oldfieldtype": "Column Break",
"permlevel": 0,
"read_only": 0,
"fieldname": "deduction",
"fieldtype": "Column Break",
"hidden": 0,
"label": "Deduction",
"oldfieldname": "col_brk3",
"oldfieldtype": "Column Break",
"permlevel": 0,
"read_only": 0,
"width": "50%"
},
},
{
"fieldname": "deduction_details",
"fieldtype": "Table",
"hidden": 0,
"label": "Deduction1",
"oldfieldname": "deduction_details",
"oldfieldtype": "Table",
"options": "Salary Structure Deduction",
"permlevel": 0,
"fieldname": "deduction_details",
"fieldtype": "Table",
"hidden": 0,
"label": "Deduction1",
"oldfieldname": "deduction_details",
"oldfieldtype": "Table",
"options": "Salary Structure Deduction",
"permlevel": 0,
"read_only": 0
},
},
{
"fieldname": "section_break0",
"fieldtype": "Section Break",
"options": "Simple",
"permlevel": 0,
"fieldname": "section_break0",
"fieldtype": "Section Break",
"options": "Simple",
"permlevel": 0,
"read_only": 0
},
},
{
"fieldname": "column_break2",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0,
"fieldname": "column_break2",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0,
"width": "50%"
},
},
{
"fieldname": "total_earning",
"fieldtype": "Currency",
"label": "Total Earning",
"oldfieldname": "total_earning",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"fieldname": "total_earning",
"fieldtype": "Currency",
"label": "Total Earning",
"oldfieldname": "total_earning",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "total_deduction",
"fieldtype": "Currency",
"label": "Total Deduction",
"oldfieldname": "total_deduction",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"fieldname": "total_deduction",
"fieldtype": "Currency",
"label": "Total Deduction",
"oldfieldname": "total_deduction",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
},
},
{
"fieldname": "column_break3",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0,
"fieldname": "column_break3",
"fieldtype": "Column Break",
"permlevel": 0,
"read_only": 0,
"width": "50%"
},
},
{
"fieldname": "net_pay",
"fieldtype": "Currency",
"label": "Net Pay",
"options": "Company:company:default_currency",
"permlevel": 0,
"fieldname": "net_pay",
"fieldtype": "Currency",
"label": "Net Pay",
"options": "Company:company:default_currency",
"permlevel": 0,
"read_only": 1
}
],
"icon": "icon-file-text",
"idx": 1,
"modified": "2013-12-20 19:24:28.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Structure",
"owner": "Administrator",
],
"icon": "icon-file-text",
"idx": 1,
"modified": "2013-12-20 19:23:28.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Structure",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"create": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"submit": 0,
"amend": 0,
"create": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"submit": 0,
"write": 1
},
},
{
"amend": 0,
"create": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR Manager",
"submit": 0,
"amend": 0,
"create": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "HR Manager",
"submit": 0,
"write": 1
}
]
}
}

View File

@ -16,7 +16,7 @@ class SalaryStructure(Document):
def get_employee_details(self):
ret = {}
det = frappe.db.sql("""select employee_name, branch, designation, department, grade
det = frappe.db.sql("""select employee_name, branch, designation, department
from `tabEmployee` where name = %s""", self.employee)
if det:
ret = {
@ -24,7 +24,6 @@ class SalaryStructure(Document):
'branch': cstr(det[0][1]),
'designation': cstr(det[0][2]),
'department': cstr(det[0][3]),
'grade': cstr(det[0][4]),
'backup_employee': cstr(self.employee)
}
return ret

View File

@ -1,16 +1,16 @@
{
"creation": "2013-05-06 18:43:53.000000",
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"json": "{\"filters\":[],\"columns\":[[\"name\",\"Employee\"],[\"employee_number\",\"Employee\"],[\"date_of_joining\",\"Employee\"],[\"branch\",\"Employee\"],[\"department\",\"Employee\"],[\"designation\",\"Employee\"],[\"gender\",\"Employee\"],[\"status\",\"Employee\"],[\"company\",\"Employee\"],[\"employment_type\",\"Employee\"],[\"grade\",\"Employee\"],[\"reports_to\",\"Employee\"],[\"company_email\",\"Employee\"]],\"sort_by\":\"Employee.bank_ac_no\",\"sort_order\":\"desc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}",
"modified": "2014-03-07 15:30:27.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Information",
"owner": "Administrator",
"ref_doctype": "Employee",
"report_name": "Employee Information",
"creation": "2013-05-06 18:43:53.000000",
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"json": "{\"filters\":[],\"columns\":[[\"name\",\"Employee\"],[\"employee_number\",\"Employee\"],[\"date_of_joining\",\"Employee\"],[\"branch\",\"Employee\"],[\"department\",\"Employee\"],[\"designation\",\"Employee\"],[\"gender\",\"Employee\"],[\"status\",\"Employee\"],[\"company\",\"Employee\"],[\"employment_type\",\"Employee\"],\"Employee\"],[\"reports_to\",\"Employee\"],[\"company_email\",\"Employee\"]],\"sort_by\":\"Employee.bank_ac_no\",\"sort_order\":\"desc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}",
"modified": "2014-03-07 15:30:27.000000",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Information",
"owner": "Administrator",
"ref_doctype": "Employee",
"report_name": "Employee Information",
"report_type": "Report Builder"
}
}

View File

@ -7,7 +7,7 @@ import frappe
from frappe import _
def install():
def install(country=None):
records = [
# item group
@ -44,6 +44,51 @@ def install():
{'doctype': 'Leave Type', 'leave_type_name': _('Privilege Leave'), 'name': _('Privilege Leave'), 'is_encash': 0, 'is_carry_forward': 0, },
{'doctype': 'Leave Type', 'leave_type_name': _('Leave Without Pay'), 'name': _('Leave Without Pay'), 'is_encash': 0, 'is_carry_forward': 0, 'is_lwp':1},
# Employment Type
{'doctype': 'Employment Type', 'employee_type_name': _('Full-time')},
{'doctype': 'Employment Type', 'employee_type_name': _('Part-time')},
{'doctype': 'Employment Type', 'employee_type_name': _('Probation')},
{'doctype': 'Employment Type', 'employee_type_name': _('Contract')},
{'doctype': 'Employment Type', 'employee_type_name': _('Commission')},
{'doctype': 'Employment Type', 'employee_type_name': _('Piecework')},
{'doctype': 'Employment Type', 'employee_type_name': _('Trainee')},
{'doctype': 'Employment Type', 'employee_type_name': _('Intern')},
{'doctype': 'Employment Type', 'employee_type_name': _('Apprentice')},
# Department
{'doctype': 'Department', 'department_name': _('Accounts')},
{'doctype': 'Department', 'department_name': _('Marketing')},
{'doctype': 'Department', 'department_name': _('Sales')},
{'doctype': 'Department', 'department_name': _('Purchase')},
{'doctype': 'Department', 'department_name': _('Operations')},
{'doctype': 'Department', 'department_name': _('Production')},
{'doctype': 'Department', 'department_name': _('Dispatch')},
{'doctype': 'Department', 'department_name': _('Customer Service')},
{'doctype': 'Department', 'department_name': _('Human Resources')},
{'doctype': 'Department', 'department_name': _('Management')},
{'doctype': 'Department', 'department_name': _('Quality Management')},
{'doctype': 'Department', 'department_name': _('Research & Development')},
{'doctype': 'Department', 'department_name': _('Legal')},
# Designation
{'doctype': 'Designation', 'designation_name': _('CEO')},
{'doctype': 'Designation', 'designation_name': _('Director')},
{'doctype': 'Designation', 'designation_name': _('Manager')},
{'doctype': 'Designation', 'designation_name': _('Analyst')},
{'doctype': 'Designation', 'designation_name': _('Engineer')},
{'doctype': 'Designation', 'designation_name': _('Accountant')},
{'doctype': 'Designation', 'designation_name': _('Secretary')},
{'doctype': 'Designation', 'designation_name': _('Associate')},
{'doctype': 'Designation', 'designation_name': _('Administrative Officer')},
{'doctype': 'Designation', 'designation_name': _('Business Development Manager')},
{'doctype': 'Designation', 'designation_name': _('HR Manager')},
{'doctype': 'Designation', 'designation_name': _('Project Manager')},
{'doctype': 'Designation', 'designation_name': _('Head of Marketing and Sales')},
{'doctype': 'Designation', 'designation_name': _('Software Developer')},
{'doctype': 'Designation', 'designation_name': _('Designer')},
{'doctype': 'Designation', 'designation_name': _('Assistant')},
{'doctype': 'Designation', 'designation_name': _('Researcher')},
# territory
{'doctype': 'Territory', 'territory_name': _('All Territories'), 'is_group': 'Yes', 'name': _('All Territories'), 'parent_territory': ''},
@ -76,6 +121,72 @@ def install():
{'uom_name': _('Hour'), 'doctype': 'UOM', 'name': 'Hour'},
{'uom_name': _('Minute'), 'doctype': 'UOM', 'name': 'Minute'},
# Mode of Payment
{'doctype': 'Mode of Payment', 'mode_of_payment': 'Check' if country=="United States" else _('Cheque')},
{'doctype': 'Mode of Payment', 'mode_of_payment': _('Cash')},
{'doctype': 'Mode of Payment', 'mode_of_payment': _('Credit Card')},
{'doctype': 'Mode of Payment', 'mode_of_payment': _('Wire Transfer')},
{'doctype': 'Mode of Payment', 'mode_of_payment': _('Bank Draft')},
# Activity Type
{'doctype': 'Activity Type', 'activity_type': _('Planning')},
{'doctype': 'Activity Type', 'activity_type': _('Research')},
{'doctype': 'Activity Type', 'activity_type': _('Proposal Writing')},
{'doctype': 'Activity Type', 'activity_type': _('Execution')},
{'doctype': 'Activity Type', 'activity_type': _('Communication')},
# Industry Type
{'doctype': 'Industry Type', 'industry': _('Accounting')},
{'doctype': 'Industry Type', 'industry': _('Advertising')},
{'doctype': 'Industry Type', 'industry': _('Aerospace')},
{'doctype': 'Industry Type', 'industry': _('Agriculture')},
{'doctype': 'Industry Type', 'industry': _('Airline')},
{'doctype': 'Industry Type', 'industry': _('Apparel & Accessories')},
{'doctype': 'Industry Type', 'industry': _('Automotive')},
{'doctype': 'Industry Type', 'industry': _('Banking')},
{'doctype': 'Industry Type', 'industry': _('Biotechnology')},
{'doctype': 'Industry Type', 'industry': _('Broadcasting')},
{'doctype': 'Industry Type', 'industry': _('Brokerage')},
{'doctype': 'Industry Type', 'industry': _('Chemical')},
{'doctype': 'Industry Type', 'industry': _('Computer')},
{'doctype': 'Industry Type', 'industry': _('Consulting')},
{'doctype': 'Industry Type', 'industry': _('Consumer Products')},
{'doctype': 'Industry Type', 'industry': _('Cosmetics')},
{'doctype': 'Industry Type', 'industry': _('Defense')},
{'doctype': 'Industry Type', 'industry': _('Department Stores')},
{'doctype': 'Industry Type', 'industry': _('Education')},
{'doctype': 'Industry Type', 'industry': _('Electronics')},
{'doctype': 'Industry Type', 'industry': _('Energy')},
{'doctype': 'Industry Type', 'industry': _('Entertainment & Leisure')},
{'doctype': 'Industry Type', 'industry': _('Executive Search')},
{'doctype': 'Industry Type', 'industry': _('Financial Services')},
{'doctype': 'Industry Type', 'industry': _('Food, Beverage & Tobacco')},
{'doctype': 'Industry Type', 'industry': _('Grocery')},
{'doctype': 'Industry Type', 'industry': _('Health Care')},
{'doctype': 'Industry Type', 'industry': _('Internet Publishing')},
{'doctype': 'Industry Type', 'industry': _('Investment Banking')},
{'doctype': 'Industry Type', 'industry': _('Legal')},
{'doctype': 'Industry Type', 'industry': _('Manufacturing')},
{'doctype': 'Industry Type', 'industry': _('Motion Picture & Video')},
{'doctype': 'Industry Type', 'industry': _('Music')},
{'doctype': 'Industry Type', 'industry': _('Newspaper Publishers')},
{'doctype': 'Industry Type', 'industry': _('Online Auctions')},
{'doctype': 'Industry Type', 'industry': _('Pension Funds')},
{'doctype': 'Industry Type', 'industry': _('Pharmaceuticals')},
{'doctype': 'Industry Type', 'industry': _('Private Equity')},
{'doctype': 'Industry Type', 'industry': _('Publishing')},
{'doctype': 'Industry Type', 'industry': _('Real Estate')},
{'doctype': 'Industry Type', 'industry': _('Retail & Wholesale')},
{'doctype': 'Industry Type', 'industry': _('Securities & Commodity Exchanges')},
{'doctype': 'Industry Type', 'industry': _('Service')},
{'doctype': 'Industry Type', 'industry': _('Soap & Detergent')},
{'doctype': 'Industry Type', 'industry': _('Software')},
{'doctype': 'Industry Type', 'industry': _('Sports')},
{'doctype': 'Industry Type', 'industry': _('Technology')},
{'doctype': 'Industry Type', 'industry': _('Telecommunications')},
{'doctype': 'Industry Type', 'industry': _('Television')},
{'doctype': 'Industry Type', 'industry': _('Transportation')},
{'doctype': 'Industry Type', 'industry': _('Venture Capital')}
]
from frappe.modules import scrub

View File

@ -27,7 +27,7 @@ def setup_account(args=None):
if args.language != "english":
set_default_language(args.language)
install_fixtures.install()
install_fixtures.install(args.get("country"))
update_user_name(args)
frappe.local.message_log = []

View File

View File

@ -0,0 +1,28 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
"""
Run Selenium Tests
Requires a clean install. After reinstalling fresh db, call
frappe --execute erpnext.tests.sel_tests.start
"""
from __future__ import unicode_literals
import frappe
from frappe.utils import sel
def start():
sel.start(verbose=True)
sel.login("#page-setup-wizard")
# complete setup
# new customer
# new supplier
# new item
# sales cycle
# purchase cycle