now()",
- 'columns': u'Sales Order\x01ID,Sales Order\x01Owner,Sales Order\x01Status,Sales Order\x01Customer,Sales Order\x01Sales Order Date,Sales Order\x01Expected Delivery Date,Sales Order\x01Quotation No',
- 'criteria_name': u'Sales Order-To be delivered',
- 'doc_type': u'Sales Order',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Sales Order\x01Saved':1,'Sales Order\x01Submitted':1,'Sales Order\x01Fiscal Year':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 100,
- 'sort_by': u'`tabSales Order`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, sales_order-to_be_delivered
- {
- 'doctype': 'Search Criteria',
- 'name': u'sales_order-to_be_delivered'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/sales_order_to_be_submitted/__init__.py b/erpnext/home/search_criteria/sales_order_to_be_submitted/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/sales_order_to_be_submitted/sales_order_to_be_submitted.txt b/erpnext/home/search_criteria/sales_order_to_be_submitted/sales_order_to_be_submitted.txt
deleted file mode 100644
index fe5ea2f5061..00000000000
--- a/erpnext/home/search_criteria/sales_order_to_be_submitted/sales_order_to_be_submitted.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, sales_order-to_be_submitted
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-04-03 12:49:52',
- 'docstatus': 0,
- 'modified': '2012-04-03 12:49:52',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': u"`tabSales Order`.status='Draft'",
- 'columns': u'Sales Order\x01ID,Sales Order\x01Customer,Sales Order\x01Sales Order Date,Sales Order\x01Quotation No',
- 'criteria_name': u'Sales Order-To be submitted',
- 'doc_type': u'Sales Order',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Sales Order\x01Saved':1,'Sales Order\x01Fiscal Year':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 100,
- 'sort_by': u'`tabSales Order`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, sales_order-to_be_submitted
- {
- 'doctype': 'Search Criteria',
- 'name': u'sales_order-to_be_submitted'
- }
-]
\ No newline at end of file
diff --git a/erpnext/home/search_criteria/serial_no_amc_expiring_this_month/__init__.py b/erpnext/home/search_criteria/serial_no_amc_expiring_this_month/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/serial_no_warranty_expiring_this_month/__init__.py b/erpnext/home/search_criteria/serial_no_warranty_expiring_this_month/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/task_open/__init__.py b/erpnext/home/search_criteria/task_open/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/home/search_criteria/task_open/task_open.txt b/erpnext/home/search_criteria/task_open/task_open.txt
deleted file mode 100644
index 3794afc5df9..00000000000
--- a/erpnext/home/search_criteria/task_open/task_open.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, task-open
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-04-03 12:49:53',
- 'docstatus': 0,
- 'modified': '2012-04-03 12:49:53',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_cond': u"`tabTask`.status='Open'",
- 'columns': u'Task\x01ID,Task\x01Subject,Task\x01Priority,Task\x01Raised By,Task\x01Allocated To',
- 'criteria_name': u'Task-Open',
- 'doc_type': u'Task',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Task\x01Priority':''}",
- 'module': u'Home',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabTask`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, task-open
- {
- 'doctype': 'Search Criteria',
- 'name': u'task-open'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/Module Def/HR/HR.txt b/erpnext/hr/Module Def/HR/HR.txt
deleted file mode 100644
index 623bdc5233a..00000000000
--- a/erpnext/hr/Module Def/HR/HR.txt
+++ /dev/null
@@ -1,318 +0,0 @@
-# Module Def, HR
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2011-07-01 17:41:43',
- 'docstatus': 0,
- 'modified': '2011-08-25 13:54:43',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'name': '__common__',
- 'parent': 'HR',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def Item
- {
- 'doctype': 'Module Def Item',
- 'name': '__common__',
- 'parent': 'HR',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def
- {
- 'disabled': 'No',
- 'doctype': u'Module Def',
- 'is_hidden': 'No',
- 'module_desc': 'Human Resource Management - Employee Database, Salaries etc.',
- 'module_icon': 'HR.gif',
- 'module_label': 'HR',
- 'module_name': 'HR',
- 'module_seq': 9,
- 'name': '__common__'
- },
-
- # Module Def, HR
- {
- 'doctype': u'Module Def',
- 'name': 'HR'
- },
-
- # Module Def Item
- {
- 'description': 'Your Employee Database',
- 'display_name': 'Employee',
- 'doc_name': 'Employee',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'employee_name\nemployment_type\nstatus\nbranch\ndesignation\ndepartment\ngrade\nreports_to',
- 'idx': 1
- },
-
- # Module Def Item
- {
- 'description': 'Employees Daily Attendance Tracking Form',
- 'display_name': 'Attendance',
- 'doc_name': 'Attendance',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'employee\nemployee_name\nstatus\natt_date\nfiscal_year\ncompany',
- 'idx': 2
- },
-
- # Module Def Item
- {
- 'description': 'Upload Attendance data',
- 'display_name': 'Attendance Control Panel',
- 'doc_name': 'Attendance Control Panel',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item',
- 'idx': 3
- },
-
- # Module Def Item
- {
- 'description': 'Leave allocation for selected employees at a time',
- 'display_name': 'Leave Control Panel',
- 'doc_name': 'Leave Control Panel',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item',
- 'idx': 4
- },
-
- # Module Def Item
- {
- 'description': 'Allocate leave for fiscal year',
- 'display_name': 'Leave Allocation',
- 'doc_name': 'Leave Allocation',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'employee\nleave_type\nfiscal_year\ntotal_leaves_allocated\nposting_date',
- 'idx': 5
- },
-
- # Module Def Item
- {
- 'description': 'Apply Leave',
- 'display_name': 'Leave Application',
- 'doc_name': 'Leave Application',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'employee\nleave_type\nfiscal_year\nfrom_date\nto_date\ntotal_leave_days',
- 'idx': 6
- },
-
- # Module Def Item
- {
- 'description': 'Submit Employees Expenses',
- 'display_name': 'Expense Claim',
- 'doc_name': 'Expense Claim',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\nemployee\nemployee_name\nposting_date\ntotal_claimed_amount\ntotal_sanctioned_amount\nexp_approver',
- 'idx': 7
- },
-
- # Module Def Item
- {
- 'description': 'Assign Responsibilities to employee and evaluate',
- 'display_name': 'Appraisal',
- 'doc_name': 'Appraisal',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\nemployee\nemployee_name\nstart_date\nend_date\ntotal_score\nkra_approver',
- 'idx': 8
- },
-
- # Module Def Item
- {
- 'description': 'Generate Salary Structure heads for an employee',
- 'display_name': 'Salary Structure',
- 'doc_name': 'Salary Structure',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'employee\nis_active\nfiscal_year\nfrom_date\nctc\ntotal_earning\ntotal_deduction\ntotal',
- 'idx': 9
- },
-
- # Module Def Item
- {
- 'description': 'Generate Salary Slip for an employee',
- 'display_name': 'Salary Slip',
- 'doc_name': 'Salary Slip',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'month\nyear\nemployee\nemployee_name\npayment_days\narrear_amount\nencashment_amount\ngross_pay\ntotal_deduction\nnet_pay',
- 'idx': 10
- },
-
- # Module Def Item
- {
- 'description': 'Generate Salary Slip for multiple employee at a time based on selected criteria',
- 'display_name': 'Salary Manager',
- 'doc_name': 'Salary Manager',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item',
- 'idx': 11
- },
-
- # Module Def Item
- {
- 'description': 'Job Applications received for various positions',
- 'display_name': 'Job Application',
- 'doc_name': 'Job Application',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'applicant_name\nemail\nposition',
- 'idx': 12
- },
-
- # Module Def Item
- {
- 'display_name': 'Employee Information',
- 'doc_name': 'Employee',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 13
- },
-
- # Module Def Item
- {
- 'display_name': "Employee's Birthday",
- 'doc_name': 'Employee',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 14
- },
-
- # Module Def Item
- {
- 'display_name': 'New or left employees for a month',
- 'doc_name': 'Employee',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 15
- },
-
- # Module Def Item
- {
- 'display_name': 'Monthly Attendance Details',
- 'doc_name': 'Attendance',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 16
- },
-
- # Module Def Item
- {
- 'display_name': 'Leave Application Details',
- 'doc_name': 'Leave Application',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 17
- },
-
- # Module Def Item
- {
- 'display_name': 'Leave Allocation Details',
- 'doc_name': 'Leave Allocation',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 18
- },
-
- # Module Def Item
- {
- 'display_name': 'Employee Leave Balance Report',
- 'doc_name': 'Employee',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 19
- },
-
- # Module Def Item
- {
- 'display_name': 'Salary Structure Details',
- 'doc_name': 'Salary Structure',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 20
- },
-
- # Module Def Item
- {
- 'display_name': 'Salary Register',
- 'doc_name': 'Salary Slip',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 21
- },
-
- # Module Def Item
- {
- 'display_name': 'Salary Slips',
- 'doc_name': 'Salary Slip',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 22
- },
-
- # Module Def Item
- {
- 'display_name': 'Pending Appraisals',
- 'doc_name': 'Appraisal',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 23
- },
-
- # Module Def Item
- {
- 'display_name': 'Employee Appraisals',
- 'doc_name': 'Appraisal',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 24
- },
-
- # Module Def Item
- {
- 'display_name': 'Pending Expense Claims',
- 'doc_name': 'Expense Claim',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 25
- },
-
- # Module Def Item
- {
- 'display_name': 'Expense Claims',
- 'doc_name': 'Expense Claim',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'idx': 26
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'idx': 1,
- 'role': 'HR Manager'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'idx': 2,
- 'role': 'HR User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/Role/Employee/Employee.txt b/erpnext/hr/Role/Employee/Employee.txt
deleted file mode 100644
index 4b73c1a0df9..00000000000
--- a/erpnext/hr/Role/Employee/Employee.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-[
- {
- 'creation': '2011-02-12 15:07:26',
- 'docstatus': 0,
- 'doctype': 'Role',
- 'idx': None,
- 'modified': '2011-02-14 14:05:55',
- 'modified_by': 'Administrator',
- 'module': 'Roles',
- 'name': 'Employee',
- 'owner': 'Administrator',
- 'parent': None,
- 'parentfield': None,
- 'parenttype': None,
- 'role_name': 'Employee'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/Role/HR Manager/HR Manager.txt b/erpnext/hr/Role/HR Manager/HR Manager.txt
deleted file mode 100644
index d07db8652f7..00000000000
--- a/erpnext/hr/Role/HR Manager/HR Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, HR Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-01 10:19:09',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'HR',
- 'name': '__common__',
- 'role_name': 'HR Manager'
- },
-
- # Role, HR Manager
- {
- 'doctype': 'Role',
- 'name': 'HR Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/Role/HR User/HR User.txt b/erpnext/hr/Role/HR User/HR User.txt
deleted file mode 100644
index b0c5b76c43f..00000000000
--- a/erpnext/hr/Role/HR User/HR User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, HR User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-01 10:18:55',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'HR',
- 'name': '__common__',
- 'role_name': 'HR User'
- },
-
- # Role, HR User
- {
- 'doctype': 'Role',
- 'name': 'HR User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/__init__.py b/erpnext/hr/__init__.py
index e69de29bb2d..ab2d1976b11 100644
--- a/erpnext/hr/__init__.py
+++ b/erpnext/hr/__init__.py
@@ -0,0 +1,5 @@
+install_docs = [
+ {"doctype":"Role", "name":"Employee"},
+ {"doctype":"Role", "name":"HR Manager"},
+ {"doctype":"Role", "name":"HR User"},
+]
diff --git a/erpnext/hr/search_criteria/employee_details/__init__.py b/erpnext/hr/search_criteria/employee_details/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/hr/search_criteria/employee_details/employee_details.txt b/erpnext/hr/search_criteria/employee_details/employee_details.txt
deleted file mode 100644
index 08d785b5231..00000000000
--- a/erpnext/hr/search_criteria/employee_details/employee_details.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-[
- {
- 'add_col': None,
- 'add_cond': None,
- 'add_tab': None,
- 'columns': 'Employee\x01ID,Employee\x01Employee Name,Employee\x01Employee Code,Employee\x01Employee Number,Employee\x01Gender,Employee\x01Employment Type,Employee\x01Date of Joining,Employee\x01Scheduled Confirmation Date,Employee\x01Contract End Date,Employee\x01Status,Employee\x01Branch,Employee\x01Department,Employee\x01Designation,Employee\x01Grade,Employee\x01Company Email,Employee\x01Relieving Date',
- 'creation': '2010-12-14 10:33:09',
- 'criteria_name': 'Employee Details',
- 'custom_query': '',
- 'description': None,
- 'dis_filters': None,
- 'disabled': None,
- 'doc_type': 'Employee',
- 'docstatus': 0,
- 'doctype': 'Search Criteria',
- 'filters': "{'Employee\x01Gender':'','Employee\x01Month of Birth':'','Employee\x01Status':''}",
- 'graph_series': None,
- 'graph_values': None,
- 'group_by': None,
- 'idx': None,
- 'modified': '2010-04-01 14:27:15',
- 'modified_by': 'Administrator',
- 'module': 'Payroll',
- 'name': 'employee_details',
- 'owner': 'Administrator',
- 'page_len': 50,
- 'parent': None,
- 'parent_doc_type': None,
- 'parentfield': None,
- 'parenttype': None,
- 'report_script': '',
- 'server_script': None,
- 'sort_by': 'ID',
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/employee_in_company_experience/__init__.py b/erpnext/hr/search_criteria/employee_in_company_experience/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/hr/search_criteria/employee_in_company_experience/employee_in_company_experience.txt b/erpnext/hr/search_criteria/employee_in_company_experience/employee_in_company_experience.txt
deleted file mode 100644
index 62b9aa60bd3..00000000000
--- a/erpnext/hr/search_criteria/employee_in_company_experience/employee_in_company_experience.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-[
- {
- 'add_col': None,
- 'add_cond': None,
- 'add_tab': None,
- 'columns': 'Employee Profile\x01Employee,Employee Internal Work History\x01Branch,Employee Internal Work History\x01Department,Employee Internal Work History\x01Designation,Employee Internal Work History\x01Grade,Employee Internal Work History\x01From Date,Employee Internal Work History\x01To Date',
- 'creation': '2010-12-14 10:33:09',
- 'criteria_name': 'Employee In Company Experience',
- 'custom_query': '',
- 'description': None,
- 'dis_filters': None,
- 'disabled': 1,
- 'doc_type': 'Employee Internal Work History',
- 'docstatus': 0,
- 'doctype': 'Search Criteria',
- 'filters': '{}',
- 'graph_series': None,
- 'graph_values': None,
- 'group_by': None,
- 'idx': None,
- 'modified': '2010-04-01 14:27:15',
- 'modified_by': 'Administrator',
- 'module': 'Payroll',
- 'name': 'employee_in_company_experience',
- 'owner': 'Administrator',
- 'page_len': 50,
- 'parent': None,
- 'parent_doc_type': 'Employee Profile',
- 'parentfield': None,
- 'parenttype': None,
- 'report_script': '',
- 'server_script': '',
- 'sort_by': 'ID',
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/employeewise_leave_transaction_details/__init__.py b/erpnext/hr/search_criteria/employeewise_leave_transaction_details/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/hr/search_criteria/employeewise_leave_transaction_details/employeewise_leave_transaction_details.txt b/erpnext/hr/search_criteria/employeewise_leave_transaction_details/employeewise_leave_transaction_details.txt
deleted file mode 100644
index 8cea5934ffc..00000000000
--- a/erpnext/hr/search_criteria/employeewise_leave_transaction_details/employeewise_leave_transaction_details.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Search Criteria, employeewise_leave_transaction_details
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-04-03 12:49:51',
- 'docstatus': 0,
- 'modified': '2012-04-03 12:49:51',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'columns': u'Leave Transaction\x01ID,Leave Transaction\x01Fiscal Year,Leave Transaction\x01Employee,Leave Transaction\x01Leave Type,Leave Transaction\x01Previous Balance,Leave Transaction\x01Leave Transaction Type,Leave Transaction\x01Allocation Type,Leave Transaction\x01Deduction Type,Leave Transaction\x01Half Day,Leave Transaction\x01From Date,Leave Transaction\x01To Date,Leave Transaction\x01Encashment Date,Leave Transaction\x01Total Leave Days,Leave Transaction\x01Status',
- 'criteria_name': u'Employeewise Leave Transaction Details',
- 'doc_type': u'Leave Transaction',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Leave Transaction\x01Saved':1,'Leave Transaction\x01Submitted':1}",
- 'module': u'HR',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabLeave Transaction`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, employeewise_leave_transaction_details
- {
- 'doctype': 'Search Criteria',
- 'name': u'employeewise_leave_transaction_details'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.py b/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.py
new file mode 100644
index 00000000000..998b9270c3c
--- /dev/null
+++ b/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.py
@@ -0,0 +1,98 @@
+colwidths[col_idx['Employee Name']]="120px"
+colwidths[col_idx['Leave Without Pay']] = '120px'
+
+sum_net = total_earning = total_deduction = total_lwp = total_arr = 0
+total = ['Total Net Pay','','']
+
+
+earn_type_lst = sql("select name from `tabEarning Type`")
+
+ded_type_lst = sql("select name from `tabDeduction Type`")
+li=[]
+for lst in earn_type_lst:
+
+ li.append(lst[0])
+
+
+
+li.append('Total Earning')
+for lst in ded_type_lst:
+
+ li.append(lst[0])
+
+
+li.append('Total Deduction')
+li.append('Net Pay')
+
+
+
+for d in li:
+ colnames.append(d)
+ colwidths.append("150px")
+ coltypes.append("Currency")
+ coloptions.append("")
+ col_idx[d] = len(colnames)-1
+ for r in res:
+ r.append("0")
+
+for r in res:
+
+ total_lwp += r[col_idx['Leave Without Pay']]
+ total_arr += r[col_idx['Arrear Amount']]
+
+ for d1 in li:
+ d2 = '%s'%d1
+
+ earn_ret=convert_to_lists(sql("select e_type,e_amount from `tabSS Earning Detail` where parent = '%s'"%r[col_idx['ID']]))
+ ded_ret=convert_to_lists(sql("select d_type,d_amount from `tabSS Deduction Detail` where parent = '%s'"%r[col_idx['ID']]))
+
+
+ for e in earn_ret:
+ e0 = '%s'%e[0]
+ r[col_idx[e0]]=flt(e[1]) or 0.00
+
+
+ for d in ded_ret:
+ d0 = '%s'%d[0]
+ r[col_idx[d0]]=flt(d[1]) or 0.00
+
+
+ tot_earn_ded_net_ret = sql("select gross_pay, total_deduction,net_pay from `tabSalary Slip` where name = '%s'"%r[col_idx['ID']])
+ if d2 == 'Total Earning':
+ r[col_idx[d2]] = flt(tot_earn_ded_net_ret[0][0]) or 0
+ total_earning += flt(tot_earn_ded_net_ret[0][0]) or 0
+ elif d2 == 'Total Deduction':
+ r[col_idx[d2]] = flt(tot_earn_ded_net_ret[0][1]) or 0
+ total_deduction += flt(tot_earn_ded_net_ret[0][1]) or 0
+ elif d2 == 'Net Pay':
+ r[col_idx[d2]] = flt(tot_earn_ded_net_ret[0][2]) or 0
+ sum_net += flt(tot_earn_ded_net_ret[0][2]) or 0
+
+
+total.append(total_lwp)
+total.append(total_arr)
+
+for lst in earn_type_lst:
+
+ total_ear = 0
+ for r in res:
+
+ lst0 = '%s'%lst[0]
+ total_ear += r[col_idx[lst0]]
+
+ total.append(total_ear)
+
+total.append(total_earning)
+for lst in ded_type_lst:
+ total_ded = 0
+ for r in res:
+ lst0 = '%s'%lst[0]
+ total_ded += r[col_idx[lst0]]
+
+ total.append(total_ded)
+
+
+total.append(total_deduction)
+total.append(sum_net)
+
+res.append(total)
diff --git a/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.txt b/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.txt
index 4df2a0f6f70..b24bfb1b930 100644
--- a/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.txt
+++ b/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-04-03 12:49:51',
+ 'creation': '2012-03-30 14:50:44',
'docstatus': 0,
- 'modified': '2012-04-03 12:49:51',
+ 'modified': '2012-04-05 17:23:13',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -16,11 +16,11 @@
'criteria_name': u'Monthly Salary Register',
'doc_type': u'Salary Slip',
'doctype': 'Search Criteria',
- 'filters': u"{'Salary Slip\x01Month':'','Salary Slip\x01Year':''}",
+ 'filters': u'{"Salary Slip\\u0001Submitted":1,"Salary Slip\\u0001Company":[""],"Salary Slip\\u0001Month":[""]}',
'module': u'HR',
'name': '__common__',
'page_len': 50,
- 'sort_by': u'ID',
+ 'sort_by': u'`tabSalary Slip`.`name`',
'sort_order': u'DESC',
'standard': u'Yes'
},
diff --git a/erpnext/hr/search_criteria/pending_appraisals/__init__.py b/erpnext/hr/search_criteria/pending_appraisals/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js b/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js
deleted file mode 100644
index 810fe16fc33..00000000000
--- a/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js
+++ /dev/null
@@ -1,57 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-report.customize_filters = function() {
- this.hide_all_filters();
-
- this.add_filter({fieldname:'approver', label:'Approver', fieldtype:'Link', options:'Profile', ignore : 1, parent:'Appraisal'});
- this.filter_fields_dict['Appraisal'+FILTER_SEP +'Approver'].df.in_first_page = 1;
-
- this.filter_fields_dict['Appraisal'+FILTER_SEP +'Employee'].df.filter_hide = 0;
- this.filter_fields_dict['Appraisal'+FILTER_SEP +'Employee Name'].df.filter_hide = 0;
- this.filter_fields_dict['Appraisal'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
- this.filter_fields_dict['Appraisal'+FILTER_SEP +'From Start Date'].df.filter_hide = 0;
- //this.filter_fields_dict['Appraisal'+FILTER_SEP +'To Start Date'].df.filter_hide = 0;
- //this.filter_fields_dict['Appraisal'+FILTER_SEP +'From End Date'].df.filter_hide = 0;
- this.filter_fields_dict['Appraisal'+FILTER_SEP +'To End Date'].df.filter_hide = 0;
-}
-this.mytabs.items['Select Columns'].hide();
-
-report.get_query = function(){
- //get filter values
- emp = this.filter_fields_dict['Appraisal'+FILTER_SEP+'Employee'].get_value();
- emp_nm = this.filter_fields_dict['Appraisal'+FILTER_SEP+'Employee Name'].get_value();
- frm_start_date = this.filter_fields_dict['Appraisal'+FILTER_SEP+'From Start Date'].get_value();
- //to_start_date = this.filter_fields_dict['Appraisal'+FILTER_SEP+'To Start Date'].get_value();
- //frm_end_date = this.filter_fields_dict['Appraisal'+FILTER_SEP+'From End Date'].get_value();
- to_end_date = this.filter_fields_dict['Appraisal'+FILTER_SEP+'To End Date'].get_value();
- fiscal_year = this.filter_fields_dict['Appraisal'+FILTER_SEP+'Fiscal Year'].get_value();
- approver = this.filter_fields_dict['Appraisal'+FILTER_SEP+'Approver'].get_value();
-
- var cond = '';
- if(emp) cond += ' AND `tabAppraisal`.employee = "'+emp+'"';
- if(emp_nm) cond += ' AND `tabAppraisal`.employee_name = "'+emp_nm+'"';
- if(frm_start_date) cond += ' AND `tabAppraisal`.start_date >= "'+frm_start_date+'"';
- //if(to_start_date) cond += ' AND `tabAppraisal`.start_date <= "'+to_start_date+'"';
- //if(frm_end_date) cond += ' AND `tabAppraisal`.end_date >= "'+frm_end_date+'"';
- if(to_end_date) cond += ' AND `tabAppraisal`.end_date <= "'+to_end_date+'"';
- if(fiscal_year !='') cond += ' AND `tabAppraisal`.fiscal_year = "'+fiscal_year+'"';
- if(approver) cond += ' AND `tabAppraisal`.kra_approver = "'+approver+'"';
-
- //var q = 'SELECT DISTINCT `tabAppraisal`.name, `tabAppraisal`.status, `tabAppraisal`.employee, `tabAppraisal`.employee_name, `tabAppraisal`.start_date,`tabAppraisal`.end_date,`tabAppraisal`.kra_approver, `tabAppraisal`.total_score FROM `tabAppraisal` WHERE `tabAppraisal`.status= "Submitted" AND `tabAppraisal`.kra_approver = "'+ user+'"'+cond;
- var q = 'SELECT DISTINCT `tabAppraisal`.name, `tabAppraisal`.employee, `tabAppraisal`.employee_name, `tabAppraisal`.start_date,`tabAppraisal`.end_date,`tabAppraisal`.kra_approver, `tabAppraisal`.total_score FROM `tabAppraisal` WHERE `tabAppraisal`.status= "Submitted"'+cond;
- return q;
-}
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.txt b/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.txt
deleted file mode 100644
index b62b452748f..00000000000
--- a/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Search Criteria, pending_appraisals
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-04-03 12:49:51',
- 'docstatus': 0,
- 'modified': '2012-04-03 12:49:51',
- 'modified_by': u'Administrator',
- 'owner': u'ashwini@webnotestech.com'
- },
-
- # These values are common for all Search Criteria
- {
- 'criteria_name': u'Pending Appraisals',
- 'disabled': 0,
- 'doc_type': u'Appraisal',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Appraisal\x01Submitted':1,'Appraisal\x01Status':'Submitted','Appraisal\x01Fiscal Year':'','Appraisal\x01Approver':''}",
- 'module': u'HR',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`tabAppraisal`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, pending_appraisals
- {
- 'doctype': 'Search Criteria',
- 'name': u'pending_appraisals'
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/pending_expense_claims/__init__.py b/erpnext/hr/search_criteria/pending_expense_claims/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/hr/search_criteria/pending_expense_claims/pending_expense_claims.txt b/erpnext/hr/search_criteria/pending_expense_claims/pending_expense_claims.txt
deleted file mode 100644
index 0bff5ad1421..00000000000
--- a/erpnext/hr/search_criteria/pending_expense_claims/pending_expense_claims.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-# Search Criteria, pending_expense_claims
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-30 14:50:44',
- 'docstatus': 0,
- 'modified': '2012-03-30 14:50:44',
- 'modified_by': u'Administrator',
- 'owner': u'ashwini@webnotestech.com'
- },
-
- # These values are common for all Search Criteria
- {
- 'criteria_name': u'Pending Expense Claims',
- 'doc_type': u'Expense Claim',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Expense Claim\x01Approval Status':'','Expense Claim\x01Fiscal Year':''}",
- 'module': u'HR',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, pending_expense_claims
- {
- 'doctype': 'Search Criteria',
- 'name': u'pending_expense_claims'
- }
-]
\ No newline at end of file
diff --git a/erpnext/knowledge_base/Module Def/Knowledge Base/Knowledge Base.txt b/erpnext/knowledge_base/Module Def/Knowledge Base/Knowledge Base.txt
deleted file mode 100644
index 8aee002f2bd..00000000000
--- a/erpnext/knowledge_base/Module Def/Knowledge Base/Knowledge Base.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-[
- {
- 'creation': '2010-08-08 17:35:42',
- 'disabled': 'Yes',
- 'docstatus': 0,
- 'doctype': u'Module Def',
- 'doctype_list': None,
- 'file_list': None,
- 'idx': None,
- 'is_hidden': None,
- 'last_updated_date': None,
- 'modified': '2011-05-02 12:40:40',
- 'modified_by': 'Administrator',
- 'module_desc': 'Maintain your knowledge base of Questions & Answers
',
- 'module_icon': 'help.png',
- 'module_label': 'Knowledge Base',
- 'module_name': 'Knowledge Base',
- 'module_page': 'questions',
- 'module_seq': 13,
- 'name': 'Knowledge Base',
- 'owner': 'Administrator',
- 'parent': None,
- 'parentfield': None,
- 'parenttype': None,
- 'trash_reason': None,
- 'widget_code': None
- },
- {
- 'creation': '2010-08-08 17:35:42',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 1,
- 'modified': '2010-08-08 17:35:42',
- 'modified_by': 'Administrator',
- 'name': 'MDR00106',
- 'owner': 'Administrator',
- 'parent': 'Knowledge Base',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'All'
- }
-]
\ No newline at end of file
diff --git a/erpnext/patches/jan_mar_2012/rename_dt.py b/erpnext/patches/jan_mar_2012/rename_dt.py
index 5d5e1bf9805..01e6bafd082 100644
--- a/erpnext/patches/jan_mar_2012/rename_dt.py
+++ b/erpnext/patches/jan_mar_2012/rename_dt.py
@@ -7,13 +7,13 @@ from webnotes.modules import reload_doc
from webnotes.utils import make_esc
import os
-def execute():
+def execute1():
#rendt = get_dt_to_be_renamed()
#rename_dt_files(rendt)
#update_local_file_system()
replace_labels_with_fieldnames()
-def execute1():
+def execute():
# delete dt, mapper
delete_dt_and_mapper()
@@ -65,7 +65,35 @@ def execute1():
'lease_receipt_summary_month_wise', 'lease_receipts_client_wise',
'lease_yearly_future_installment_inflows',
'monthly_ledger_summary_report', 'payables_-_as_on_outstanding',
- 'payment_report')""")
+ 'payment_report', 'progressive_total_excise_duty',
+ 'service_tax_credit_account_-_inputs',
+ 'total_amout_collection_for_a_period_-_customerwise',
+ 'invoices-to_be_submitted', 'invoices-to_receive_payment',
+ 'opportunity-quotations_to_be_sent', 'purchase_order-to_be_billed',
+ 'purchase_order-to_be_submitted',
+ 'purchase_order-to_receive_items',
+ 'purchase_request-purchase_order_to_be_made',
+ 'purchase_request-to_be_submitted',
+ 'sales-order_to_be_submitted', 'sales_order-overdue',
+ 'sales_order-to_be_billed', 'sales_order-to_be_delivered',
+ 'sales_order-to_be_submitted', 'task-open', 'appraisal_custom',
+ 'employee_details', 'employee_in_company_experience',
+ 'employee_leave_balance_report', 'employeewise_leave_transaction_details',
+ 'pending_appraisals', 'pending_expense_claims', 'delivery_plan', 'flat_bom_report',
+ 'dispatch_report', 'projectwise_delivered_qty_and_costs_as_per_purchase_cost',
+ 'projectwise_pending_qty_and_costs_as_per_purchase_cost', 'custom_test', 'custom_test1',
+ 'delivery_notes', 'delivery_note_disabled', 'lead', 'lead_interested', 'lead_report',
+ 'periodic_sales_summary', 'monthly_despatched_trend', 'sales', 'sales_order',
+ 'sales_order1', 'sales_agentwise_commission', 'test_report', 'territory_wise_sales_-_target_vs_actual_')""")
+
+ webnotes.conn.sql("""
+ DELETE FROM `tabSearch Criteria`
+ WHERE name IN ('monthly_transaction_summary', 'trend_analyzer',
+ 'yearly_transaction_summary', 'invoices-overdue', 'lead-to_follow_up',
+ 'opportunity-to_follow_up', 'serial_no-amc_expiring_this_month',
+ 'serial_no-warranty_expiring_this_month', )
+ AND IFNULL(standard, 'No') = 'Yes'
+ """)
# reload custom search criteria
for d in webnotes.conn.sql("""select name, module from
diff --git a/erpnext/production/Module Def/Production/Production.txt b/erpnext/production/Module Def/Production/Production.txt
deleted file mode 100644
index 50e9adce95f..00000000000
--- a/erpnext/production/Module Def/Production/Production.txt
+++ /dev/null
@@ -1,519 +0,0 @@
-[
- {
- '_last_update': '1300959287',
- 'creation': '2010-11-30 22:42:49',
- 'disabled': 'No',
- 'docstatus': 0,
- 'doctype': u'Module Def',
- 'doctype_list': None,
- 'file_list': 'support.gif,FileData/00214',
- 'idx': None,
- 'is_hidden': 'No',
- 'last_updated_date': '2010-11-29 12:02:02',
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'module_desc': 'Production Documents
',
- 'module_icon': 'process.png',
- 'module_label': 'Production',
- 'module_name': 'Production',
- 'module_page': None,
- 'module_seq': 7,
- 'name': 'Production',
- 'owner': 'Administrator',
- 'parent': None,
- 'parentfield': None,
- 'parenttype': None,
- 'trash_reason': None,
- 'widget_code': None
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Bill of material master containing raw materials, operation and costs',
- 'display_name': 'BOM',
- 'doc_name': 'BOM',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': 'id\nitem\ndescription\noperating_cost\nmaintained_by',
- 'hide': None,
- 'icon': None,
- 'idx': 1,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00209',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Machinery in warehouse where operations are performed on raw materials',
- 'display_name': 'Workstation',
- 'doc_name': 'Workstation',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': 'id\nworkstation_name\nwarehouse\ndescription',
- 'hide': None,
- 'icon': None,
- 'idx': 2,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00210',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Explode Bill of Materials in a tree and calculate the cost',
- 'display_name': 'Bill of Materials (Tree)',
- 'doc_name': 'Bill of Materials',
- 'doc_type': 'Pages',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 3,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00211',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Update confirmed delivery dates in Sales Orders included in Production Plan',
- 'display_name': 'Update Delivery Dates',
- 'doc_name': 'Update Delivery Date',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 4,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00212',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Plan your production by including relevant Sales Orders in your plan',
- 'display_name': 'Production Planning Tool',
- 'doc_name': 'Production Planning Tool',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 5,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00213',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Change raw materials used in a Bill of Material through BOM replace utility',
- 'display_name': 'BOM Replace Utility',
- 'doc_name': 'BOM Replace Utility',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 6,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00214',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Raise your Production Orders Manually',
- 'display_name': 'Production Order',
- 'doc_name': 'Production Order',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 7,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00215',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': None,
- 'doc_name': 'Reports',
- 'doc_type': 'Separator',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 8,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003093',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Delivery Plan',
- 'doc_name': 'Sales Order Item',
- 'doc_type': 'Reports',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 9,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003094',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Itemwise Production Report',
- 'doc_name': 'Stock Entry Detail',
- 'doc_type': 'Reports',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 10,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003095',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Production Orders In Process',
- 'doc_name': 'Production Order',
- 'doc_type': 'Reports',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 11,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003096',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Bill of material master containing raw materials, operation and costs',
- 'display_name': 'BOM',
- 'doc_name': 'BOM',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': 'id\nitem\ndescription\noperating_cost\nmaintained_by',
- 'hide': None,
- 'icon': None,
- 'idx': 1,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00209',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Machinery in warehouse where operations are performed on raw materials',
- 'display_name': 'Workstation',
- 'doc_name': 'Workstation',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': 'id\nworkstation_name\nwarehouse\ndescription',
- 'hide': None,
- 'icon': None,
- 'idx': 2,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00210',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Explode Bill of Materials in a tree and calculate the cost',
- 'display_name': 'Bill of Materials (Tree)',
- 'doc_name': 'Bill of Materials',
- 'doc_type': 'Pages',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 3,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00211',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Update confirmed delivery dates in Sales Orders included in Production Plan',
- 'display_name': 'Update Delivery Dates',
- 'doc_name': 'Update Delivery Date',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 4,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00212',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Plan your production by including relevant Sales Orders in your plan',
- 'display_name': 'Production Planning Tool',
- 'doc_name': 'Production Planning Tool',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 5,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00213',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Change raw materials used in a Bill of Material through BOM replace utility',
- 'display_name': 'BOM Replace Utility',
- 'doc_name': 'BOM Replace Utility',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 6,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00214',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:42:49',
- 'description': 'Raise your Production Orders Manually',
- 'display_name': 'Production Order',
- 'doc_name': 'Production Order',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 7,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDI00215',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': None,
- 'doc_name': 'Reports',
- 'doc_type': 'Separator',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 8,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003093',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Delivery Plan',
- 'doc_name': 'Sales Order Item',
- 'doc_type': 'Reports',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 9,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003094',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Itemwise Production Report',
- 'doc_name': 'Stock Entry Detail',
- 'doc_type': 'Reports',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 10,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003095',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Production Orders In Process',
- 'doc_name': 'Production Order',
- 'doc_type': 'Reports',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 11,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': '000003096',
- 'owner': 'jai@webnotestech.com',
- 'parent': 'Production',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'creation': '2010-11-30 22:42:49',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 1,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDR00040',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Production User'
- },
- {
- 'creation': '2010-11-30 22:42:49',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 2,
- 'modified': '2011-03-24 15:29:36',
- 'modified_by': 'Administrator',
- 'name': 'MDR00041',
- 'owner': 'Administrator',
- 'parent': 'Production',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Production Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/production/Role/Production Manager/Production Manager.txt b/erpnext/production/Role/Production Manager/Production Manager.txt
deleted file mode 100644
index b87fc745223..00000000000
--- a/erpnext/production/Role/Production Manager/Production Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Production Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-09-23 16:35:35',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Production',
- 'name': '__common__',
- 'role_name': 'Production Manager'
- },
-
- # Role, Production Manager
- {
- 'doctype': 'Role',
- 'name': 'Production Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/production/Role/Production User/Production User.txt b/erpnext/production/Role/Production User/Production User.txt
deleted file mode 100644
index ed6d6d69a2b..00000000000
--- a/erpnext/production/Role/Production User/Production User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Production User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-09-23 16:36:08',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Production',
- 'name': '__common__',
- 'role_name': 'Production User'
- },
-
- # Role, Production User
- {
- 'doctype': 'Role',
- 'name': 'Production User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/production/__init__.py b/erpnext/production/__init__.py
index e69de29bb2d..4da0c58ae93 100644
--- a/erpnext/production/__init__.py
+++ b/erpnext/production/__init__.py
@@ -0,0 +1,4 @@
+install_docs = [
+ {"doctype":"Role", "name":"Production Manager"},
+ {"doctype":"Role", "name":"Production User"},
+]
diff --git a/erpnext/production/search_criteria/delivery_plan/__init__.py b/erpnext/production/search_criteria/delivery_plan/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/production/search_criteria/delivery_plan/delivery_plan.js b/erpnext/production/search_criteria/delivery_plan/delivery_plan.js
deleted file mode 100644
index 03f910550f2..00000000000
--- a/erpnext/production/search_criteria/delivery_plan/delivery_plan.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-report.customize_filters = function() {
-
- //to hide all filters
- //this.hide_all_filters();
-
- // to disable a filter from query set
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Status'].df.ignore = 1;
-
- // to unhide required filters
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer Name'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'From Confirmed Delivery Date'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'To Confirmed Delivery Date'].df.filter_hide = 0;
-
-
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
\ No newline at end of file
diff --git a/erpnext/production/search_criteria/delivery_plan/delivery_plan.txt b/erpnext/production/search_criteria/delivery_plan/delivery_plan.txt
deleted file mode 100644
index 5ea811ad332..00000000000
--- a/erpnext/production/search_criteria/delivery_plan/delivery_plan.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Search Criteria, delivery_plan
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-04-03 12:49:51',
- 'docstatus': 0,
- 'modified': '2012-04-03 12:49:51',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_col': u"SUM(`tabSales Order Item`.`pending_qty` * `tabSales Order Item`.`basic_rate` ) AS 'Amount'",
- 'add_cond': u"`tabSales Order Item`.pending_qty > 0 and (`tabSales Order Item`.confirmation_date is not null or `tabSales Order Item`.confirmation_date!='' or `tabSales Order Item`.confirmation_date != '00-00-0000')",
- 'columns': u'Sales Order\x01ID,Sales Order\x01Customer,Sales Order\x01Customer Name',
- 'criteria_name': u'Delivery Plan',
- 'doc_type': u'Sales Order Item',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Sales Order\x01Saved':1,'Sales Order\x01Submitted':1,'Sales Order\x01Status':'','Sales Order\x01Fiscal Year':''}",
- 'group_by': u'`tabSales Order Item`.`confirmation_date`, `tabSales Order`.`name`',
- 'module': u'Production',
- 'name': '__common__',
- 'page_len': 50,
- 'parent_doc_type': u'Sales Order',
- 'sort_by': u'`tabSales Order`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, delivery_plan
- {
- 'doctype': 'Search Criteria',
- 'name': u'delivery_plan'
- }
-]
\ No newline at end of file
diff --git a/erpnext/projects/Role/Projects User/Projects User.txt b/erpnext/projects/Role/Projects User/Projects User.txt
deleted file mode 100644
index 61a5a3b1177..00000000000
--- a/erpnext/projects/Role/Projects User/Projects User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Projects User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-05-08 09:40:07',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Projects',
- 'name': '__common__',
- 'role_name': 'Projects User'
- },
-
- # Role, Projects User
- {
- 'doctype': 'Role',
- 'name': 'Projects User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/projects/__init__.py b/erpnext/projects/__init__.py
index e69de29bb2d..636248f51f9 100644
--- a/erpnext/projects/__init__.py
+++ b/erpnext/projects/__init__.py
@@ -0,0 +1,3 @@
+install_docs = [
+ {"doctype":"Role", "name":"Projects User"},
+]
diff --git a/erpnext/projects/search_criteria/dispatch_report/__init__.py b/erpnext/projects/search_criteria/dispatch_report/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js b/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js
deleted file mode 100644
index a31d6e4ea6a..00000000000
--- a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-report.customize_filters = function() {
- this.mytabs.items['Select Columns'].hide()
- //this.mytabs.items['More Filters'].hide()
- //this.hide_all_filters();
-}
\ No newline at end of file
diff --git a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.txt b/erpnext/projects/search_criteria/dispatch_report/dispatch_report.txt
deleted file mode 100644
index 0927411be74..00000000000
--- a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Search Criteria, dispatch_report
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-04-03 12:49:51',
- 'docstatus': 0,
- 'modified': '2012-04-03 12:49:51',
- 'modified_by': u'Administrator',
- 'owner': u'ashwini@webnotestech.com'
- },
-
- # These values are common for all Search Criteria
- {
- 'columns': u'Delivery Note\x01ID,Delivery Note\x01Project Name,Delivery Note\x01Customer,Delivery Note\x01Customer Name,Delivery Note\x01Posting Date,Delivery Note Item\x01Item Code,Delivery Note Item\x01Item Name,Delivery Note Item\x01Quantity,Delivery Note Item\x01Amount*',
- 'criteria_name': u'Dispatch Report',
- 'doc_type': u'Delivery Note Item',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Delivery Note\x01Saved':1,'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'Submitted','Delivery Note\x01Fiscal Year':''}",
- 'module': u'Projects',
- 'name': '__common__',
- 'page_len': 50,
- 'parent_doc_type': u'Delivery Note',
- 'sort_by': u'`tabDelivery Note`.`name`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, dispatch_report
- {
- 'doctype': 'Search Criteria',
- 'name': u'dispatch_report'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/Role/Customer/Customer.txt b/erpnext/selling/Role/Customer/Customer.txt
deleted file mode 100644
index 3f7e9d21825..00000000000
--- a/erpnext/selling/Role/Customer/Customer.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Customer
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-06-26 14:42:33',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Selling',
- 'name': '__common__',
- 'role_name': 'Customer'
- },
-
- # Role, Customer
- {
- 'doctype': 'Role',
- 'name': 'Customer'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/Role/Partner/Partner.txt b/erpnext/selling/Role/Partner/Partner.txt
deleted file mode 100644
index 339929cbbae..00000000000
--- a/erpnext/selling/Role/Partner/Partner.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Partner
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-07-13 11:29:39',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Selling',
- 'name': '__common__',
- 'role_name': 'Partner'
- },
-
- # Role, Partner
- {
- 'doctype': 'Role',
- 'name': 'Partner'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/Role/Sales Manager/Sales Manager.txt b/erpnext/selling/Role/Sales Manager/Sales Manager.txt
deleted file mode 100644
index 5d975fc51f8..00000000000
--- a/erpnext/selling/Role/Sales Manager/Sales Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Sales Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 12:07:36',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Selling',
- 'name': '__common__',
- 'role_name': 'Sales Manager'
- },
-
- # Role, Sales Manager
- {
- 'doctype': 'Role',
- 'name': 'Sales Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/Role/Sales Master Manager/Sales Master Manager.txt b/erpnext/selling/Role/Sales Master Manager/Sales Master Manager.txt
deleted file mode 100644
index 1140f99fc97..00000000000
--- a/erpnext/selling/Role/Sales Master Manager/Sales Master Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Sales Master Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 13:50:11',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Selling',
- 'name': '__common__',
- 'role_name': 'Sales Master Manager'
- },
-
- # Role, Sales Master Manager
- {
- 'doctype': 'Role',
- 'name': 'Sales Master Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/Role/Sales User/Sales User.txt b/erpnext/selling/Role/Sales User/Sales User.txt
deleted file mode 100644
index 97229b853b1..00000000000
--- a/erpnext/selling/Role/Sales User/Sales User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Sales User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 12:07:44',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Selling',
- 'name': '__common__',
- 'role_name': 'Sales User'
- },
-
- # Role, Sales User
- {
- 'doctype': 'Role',
- 'name': 'Sales User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/__init__.py b/erpnext/selling/__init__.py
index e69de29bb2d..c61f23cc043 100644
--- a/erpnext/selling/__init__.py
+++ b/erpnext/selling/__init__.py
@@ -0,0 +1,7 @@
+install_docs = [
+ {"doctype":"Role", "name":"Customer"},
+ {"doctype":"Role", "name":"Partner"},
+ {"doctype":"Role", "name":"Sales Manager"},
+ {"doctype":"Role", "name":"Sales Master Manager"},
+ {"doctype":"Role", "name":"Sales User"},
+]
diff --git a/erpnext/analysis/doctype/trend_analyzer_control/__init__.py b/erpnext/selling/search_criteria/lead_to_follow_up/__init__.py
old mode 100755
new mode 100644
similarity index 100%
rename from erpnext/analysis/doctype/trend_analyzer_control/__init__.py
rename to erpnext/selling/search_criteria/lead_to_follow_up/__init__.py
diff --git a/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.js b/erpnext/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.js
similarity index 100%
rename from erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.js
rename to erpnext/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.js
diff --git a/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.txt b/erpnext/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.txt
similarity index 97%
rename from erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.txt
rename to erpnext/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.txt
index 6367859ac77..3a5c98311d1 100644
--- a/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.txt
+++ b/erpnext/selling/search_criteria/lead_to_follow_up/lead_to_follow_up.txt
@@ -18,7 +18,7 @@
'doc_type': u'Lead',
'doctype': 'Search Criteria',
'filters': u"{'Lead\x01Status':'','Lead\x01Source':'','Lead\x01Expected Month':'','Lead\x01Industry':'','Lead\x01Market Segment':'','Lead\x01Rating':''}",
- 'module': u'Home',
+ 'module': u'Selling',
'name': '__common__',
'page_len': 50,
'sort_by': u'`tabLead`.`name`',
@@ -31,4 +31,4 @@
'doctype': 'Search Criteria',
'name': u'lead-to_follow_up'
}
-]
\ No newline at end of file
+]
diff --git a/erpnext/home/search_criteria/lead_to_follow_up/sales_order_overdue.js b/erpnext/selling/search_criteria/lead_to_follow_up/sales_order_overdue.js
similarity index 100%
rename from erpnext/home/search_criteria/lead_to_follow_up/sales_order_overdue.js
rename to erpnext/selling/search_criteria/lead_to_follow_up/sales_order_overdue.js
diff --git a/erpnext/selling/search_criteria/monthly_despatched_trend/__init__.py b/erpnext/selling/search_criteria/monthly_despatched_trend/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js
deleted file mode 100644
index ac04e287fea..00000000000
--- a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-this.mytabs.items['Select Columns'].hide();
-this.mytabs.items['More Filters'].hide();
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py
deleted file mode 100644
index f18ee153be1..00000000000
--- a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-total = 0.0
-monthlist = ['','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
-for r in res:
- r[0] = monthlist[r[0]]
- total += r[1]
-
-colwidths[col_idx['Total Despatched']] = '200px'
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.txt b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.txt
deleted file mode 100644
index 22717c60616..00000000000
--- a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-# Search Criteria, monthly_despatched_trend
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-04-03 12:49:51',
- 'docstatus': 0,
- 'modified': '2012-04-03 12:49:51',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_col': u"month(`tabDelivery Note`.posting_date) AS 'Sales Month'\nsum(`tabDelivery Note`.net_total) AS 'Total Despatched'",
- 'add_cond': u'`tabDelivery Note`.net_total > 10',
- 'criteria_name': u'Monthly Despatched Trend',
- 'description': u'Monthly Despatched Trend',
- 'doc_type': u'Delivery Note',
- 'doctype': 'Search Criteria',
- 'filters': u"{'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'','Delivery Note\x01Chargeable':'Yes','Delivery Note\x01Department':'','Delivery Note\x01Type':'','Delivery Note\x01Company Name':'Janak Healthcare Pvt Ltd','Delivery Note\x01Fiscal Year':'2009-2010'}",
- 'graph_series': u'Despatched Month',
- 'graph_values': u'Total Despatched',
- 'group_by': u'month(`tabDelivery Note`.Posting_date)',
- 'module': u'Selling',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_by': u'`Sales Month`',
- 'sort_order': u'DESC',
- 'standard': u'Yes'
- },
-
- # Search Criteria, monthly_despatched_trend
- {
- 'doctype': 'Search Criteria',
- 'name': u'monthly_despatched_trend'
- }
-]
\ No newline at end of file
diff --git a/erpnext/analysis/page/__init__.py b/erpnext/selling/search_criteria/opportunity_to_follow_up/__init__.py
similarity index 100%
rename from erpnext/analysis/page/__init__.py
rename to erpnext/selling/search_criteria/opportunity_to_follow_up/__init__.py
diff --git a/erpnext/home/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt b/erpnext/selling/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt
similarity index 97%
rename from erpnext/home/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt
rename to erpnext/selling/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt
index ee57967db83..3ca813b5c1d 100644
--- a/erpnext/home/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt
+++ b/erpnext/selling/search_criteria/opportunity_to_follow_up/opportunity_to_follow_up.txt
@@ -18,7 +18,7 @@
'doc_type': u'Opportunity',
'doctype': 'Search Criteria',
'filters': u"{'Opportunity\x01Fiscal Year':''}",
- 'module': u'Home',
+ 'module': u'Selling',
'name': '__common__',
'page_len': 50,
'sort_by': u'`tabOpportunity`.`name`',
@@ -31,4 +31,4 @@
'doctype': 'Search Criteria',
'name': u'opportunity-to_follow_up'
}
-]
\ No newline at end of file
+]
diff --git a/erpnext/selling/search_criteria/periodic_sales_summary/__init__.py b/erpnext/selling/search_criteria/periodic_sales_summary/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js b/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js
deleted file mode 100644
index 2fa8a0fae0d..00000000000
--- a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js
+++ /dev/null
@@ -1,35 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.add_filter({fieldname:'transaction_date', label:'Sales Order Date', fieldtype:'Date', parent:'Sales Order', in_first_page : 1,default:''});
-
- //this.filter_fields_dict['Sales Order'+FILTER_SEP +'Territory'].df.filter_hide = 0;
- //this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Order Date'].df.filter_hide = 0;
- //this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Order Date'].df.in_first_page = 1;
-
- this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'Item Code'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'Item Code'].df.in_first_page = 1;
-
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df.in_first_page = 1;
-
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
-
- //this.mytabs.items['Select Columns'].hide();
- //this.mytabs.items['More Filters'].hide();
-}
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.txt b/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.txt
deleted file mode 100644
index b4d370fde92..00000000000
--- a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Search Criteria, periodic_sales_summary
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:09:31',
- 'docstatus': 0,
- 'modified': '2010-06-03 13:09:00',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'columns': 'Sales Order Item\x01Item Code,Sales Order Item\x01Quantity,Sales Order Item\x01Delivered Qty,Sales Order Item\x01Billed Qty',
- 'criteria_name': 'Periodic Sales Summary',
- 'dis_filters': 'fiscal_year',
- 'disabled': 1,
- 'doc_type': 'Sales Order Item',
- 'doctype': 'Search Criteria',
- 'filters': "{'Sales Order\x01Submitted':1,'Sales Order\x01Company Name':'','Sales Order\x01Fiscal Year':''}",
- 'group_by': '`tabSales Order Item`.`item_code`',
- 'module': 'Selling',
- 'name': '__common__',
- 'page_len': 50,
- 'parent_doc_type': 'Sales Order',
- 'sort_by': '`tabSales Order Item`.`item_code`',
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- },
-
- # Search Criteria, periodic_sales_summary
- {
- 'doctype': 'Search Criteria',
- 'name': 'periodic_sales_summary'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/sales_agentwise_commission/__init__.py b/erpnext/selling/search_criteria/sales_agentwise_commission/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js
deleted file mode 100644
index 049c5979748..00000000000
--- a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-report.customize_filters = function() {
- this.hide_all_filters();
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Partner'].df.filter_hide = 0;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Partner'].df.in_first_page = 1;
-}
-
-
-this.mytabs.items['Select Columns'].hide();
-this.mytabs.items['More Filters'].hide();
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py
deleted file mode 100644
index 4958674d141..00000000000
--- a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-coltypes[col_idx['Average Commission Rate']] = 'Currency'
-colwidths[col_idx['Average Commission Rate']] = '200px'
-
-coltypes[col_idx['Net Total']] = 'Currency'
-colwidths[col_idx['Net Total']] = '150px'
-
-coltypes[col_idx['Total Commission']] = 'Currency'
-colwidths[col_idx['Total Commission']] = '150px'
diff --git a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.txt b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.txt
deleted file mode 100644
index 047a175d213..00000000000
--- a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Search Criteria, sales_agentwise_commission
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-26 11:52:28',
- 'docstatus': 0,
- 'modified': '2010-08-26 11:48:17',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Search Criteria
- {
- 'add_col': "SUM(`tabSales Order`.`total_commission`) AS 'Total Commission'\nSUM(`tabSales Order`.`net_total`) AS 'Net Total'\n((SUM(`tabSales Order`.`total_commission`) / SUM(`tabSales Order`.`net_total`)) * 100) AS 'Average Commission Rate'",
- 'add_cond': '`tabSales Order`.`net_total` > 0',
- 'columns': 'Sales Order\x01Business Associate',
- 'criteria_name': 'Sales Agentwise Commission',
- 'description': 'Sales Agentwise Commission',
- 'disabled': 1,
- 'doc_type': 'Sales Order',
- 'doctype': 'Search Criteria',
- 'filters': "{'Sales Order\x01Submitted':1}",
- 'group_by': '`tabSales Order`.`sales_partner`',
- 'module': 'Selling',
- 'name': '__common__',
- 'page_len': 50,
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- },
-
- # Search Criteria, sales_agentwise_commission
- {
- 'doctype': 'Search Criteria',
- 'name': 'sales_agentwise_commission'
- }
-]
\ No newline at end of file
diff --git a/erpnext/analysis/search_criteria/__init__.py b/erpnext/selling/search_criteria/sales_order_pending_items/__init__.py
similarity index 100%
rename from erpnext/analysis/search_criteria/__init__.py
rename to erpnext/selling/search_criteria/sales_order_pending_items/__init__.py
diff --git a/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.js b/erpnext/selling/search_criteria/sales_order_pending_items/sales_order_pending_items.js
similarity index 100%
rename from erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.js
rename to erpnext/selling/search_criteria/sales_order_pending_items/sales_order_pending_items.js
diff --git a/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.txt b/erpnext/selling/search_criteria/sales_order_pending_items/sales_order_pending_items.txt
similarity index 95%
rename from erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.txt
rename to erpnext/selling/search_criteria/sales_order_pending_items/sales_order_pending_items.txt
index a13b00b3fb0..036d689ad68 100644
--- a/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.txt
+++ b/erpnext/selling/search_criteria/sales_order_pending_items/sales_order_pending_items.txt
@@ -5,7 +5,7 @@
'add_tab': None,
'columns': 'Sales Order\x01ID,Sales Order\x01Sales Order Date,Sales Order\x01Customer,Sales Order\x01Customer Name,Sales Order Item\x01Item Code,Sales Order Item\x01Item Name,Sales Order Item\x01Description,Sales Order Item\x01Quantity,Sales Order Item\x01Delivered Qty,Sales Order Item\x01Billed Qty',
'creation': '2011-05-09 11:04:19',
- 'criteria_name': 'Sales Order Pending Items1',
+ 'criteria_name': 'Sales Order Pending Items',
'custom_query': '',
'description': 'Sales Order Pending Items',
'dis_filters': None,
@@ -21,7 +21,7 @@
'modified': '2011-05-09 11:08:05',
'modified_by': 'Administrator',
'module': 'CRM',
- 'name': 'sales_order_pending_items1',
+ 'name': 'sales_order_pending_items',
'owner': 'Administrator',
'page_len': 50,
'parent': None,
@@ -34,4 +34,4 @@
'sort_order': 'DESC',
'standard': 'Yes'
}
-]
\ No newline at end of file
+]
diff --git a/erpnext/selling/search_criteria/sales_order_pending_items1/__init__.py b/erpnext/selling/search_criteria/sales_order_pending_items1/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/selling/search_criteria/sales_orderwise_booking_ b/erpnext/selling/search_criteria/sales_orderwise_booking_
deleted file mode 100644
index 46a478cd762..00000000000
--- a/erpnext/selling/search_criteria/sales_orderwise_booking_
+++ /dev/null
@@ -1,4 +0,0 @@
-report.customize_filters = function() {
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
-}
diff --git a/erpnext/analysis/search_criteria/monthly_transaction_summary/__init__.py b/erpnext/selling/search_criteria/serial_no_amc_expiring_this_month/__init__.py
similarity index 100%
rename from erpnext/analysis/search_criteria/monthly_transaction_summary/__init__.py
rename to erpnext/selling/search_criteria/serial_no_amc_expiring_this_month/__init__.py
diff --git a/erpnext/home/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt b/erpnext/selling/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt
similarity index 97%
rename from erpnext/home/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt
rename to erpnext/selling/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt
index db8f03d7cd8..1f303229e55 100644
--- a/erpnext/home/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt
+++ b/erpnext/selling/search_criteria/serial_no_amc_expiring_this_month/serial_no_amc_expiring_this_month.txt
@@ -18,7 +18,7 @@
'doc_type': u'Serial No',
'doctype': 'Search Criteria',
'filters': u"{'Serial No\x01Saved':1,'Serial No\x01Submitted':1,'Serial No\x01Status':'','Serial No\x01Warranty Status':''}",
- 'module': u'Home',
+ 'module': u'Selling',
'name': '__common__',
'page_len': 50,
'sort_by': u'`tabSerial No`.`name`',
@@ -31,4 +31,4 @@
'doctype': 'Search Criteria',
'name': u'serial_no-amc_expiring_this_month'
}
-]
\ No newline at end of file
+]
diff --git a/erpnext/analysis/search_criteria/trend_analyzer/__init__.py b/erpnext/selling/search_criteria/serial_no_warranty_expiring_this_month/__init__.py
similarity index 100%
rename from erpnext/analysis/search_criteria/trend_analyzer/__init__.py
rename to erpnext/selling/search_criteria/serial_no_warranty_expiring_this_month/__init__.py
diff --git a/erpnext/home/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt b/erpnext/selling/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt
similarity index 98%
rename from erpnext/home/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt
rename to erpnext/selling/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt
index 76cdeac2567..63c3e747dca 100644
--- a/erpnext/home/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt
+++ b/erpnext/selling/search_criteria/serial_no_warranty_expiring_this_month/serial_no_warranty_expiring_this_month.txt
@@ -18,7 +18,7 @@
'doc_type': u'Serial No',
'doctype': 'Search Criteria',
'filters': u"{'Serial No\x01Saved':1,'Serial No\x01Submitted':1,'Serial No\x01Status':'Issued','Serial No\x01Maintenance Status':''}",
- 'module': u'Home',
+ 'module': u'Selling',
'name': '__common__',
'page_len': 50,
'sort_by': u'`tabSerial No`.`name`',
@@ -31,4 +31,4 @@
'doctype': 'Search Criteria',
'name': u'serial_no-warranty_expiring_this_month'
}
-]
\ No newline at end of file
+]
diff --git a/erpnext/selling/search_criteria/territory_item_group_wise_gp/__init__.py b/erpnext/selling/search_criteria/territory_item_group_wise_gp/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py b/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py
deleted file mode 100644
index 560596e8d25..00000000000
--- a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-# Add Columns
-# ------------
-based_on = filter_values.get('based_on')
-
-columns = [[based_on,'Data','150px',''],
- ['Total Qty','Currency','150px',''],
- ['Revenue','Currency','150px',''],
- ['Valuation Amount','Currency','150px',''],
- ['Gross Profit (%)','Currrency','150px',''],
- ['Gross Profit','Currency','150px','']]
-
-for c in columns:
- colnames.append(c[0])
- coltypes.append(c[1])
- colwidths.append(c[2])
- coloptions.append(c[3])
- col_idx[c[0]] = len(colnames)-1
-
-
-
-def make_child_lst(based_on,name):
- rg = sql("select lft, rgt from `tab%s` where name = '%s'"%(based_on,name))
- ch_name = sql("select name from `tab%s` where lft between %d and %d"%(based_on,int(rg[0][0]),int(rg[0][1])))
- chl ='('
- flag = 1
- for c in ch_name:
- if flag == 1:
- chl += "'%s'"%c[0]
- flag = 2
- else:
- chl +=",'%s'"%c[0]
-
- chl +=")"
- return chl
-
-
-
-for r in res:
-
- qty, rate, amt, tot_val_rate, val_amount = 0, 0, 0, 0,0
- cn = make_child_lst(based_on,r[0].strip())
-
-
-
- if based_on == 'Item Group':
-
- dn = sql("select name from `tabItem` where item_group in %s"%(cn))
- for n in dn:
-
- dt = sql("select sum(qty),sum(amount) from `tabDelivery Note Item` where item_code ='%s' and docstatus = 1"%n[0])
-
- qty += dt[0][0] and dt[0][0] or 0
- amt += dt[0][1] and dt[0][1] or 0
- prt = sql("select distinct t1.name from `tabDelivery Note` t1, `tabDelivery Note Item` t2 where t1.name = t2.parent and t2.item_code = '%s' and t1.docstatus = 1 and t2.docstatus =1 order by t1.name"%n[0])
- for p in prt:
- d1 = sql("select qty from `tabDelivery Note Item` where parent = '%s' and parenttype ='Delivery Note' and docstatus =1 and item_code = '%s'"%(p[0],n[0]))
- for t in d1:
- tot_val_rate = 0
- packing_list_items = sql("select item_code, warehouse, qty from `tabDelivery Note Packing Item` where parent = '%s' and parent_item = '%s' and docstatus = 1 order by item_code, warehouse, qty"%(p[0],n[0]))
-
- for d in packing_list_items:
- if d[1]:
- val_rate = sql("select valuation_rate from `tabStock Ledger Entry` where item_code = '%s' and warehouse = '%s' and voucher_type = 'Delivery Note' and voucher_no = '%s' and is_cancelled = 'No'"%(d[0], d[1], p[0]))
-
- val_rate = val_rate and val_rate[0][0] or 0
-
- tot_val_rate += t[0] and (flt(val_rate) * flt(d[2]) / flt(t[0])) or 0
- val_amount += flt(tot_val_rate) * flt(t[0])
- elif based_on == 'Territory':
-
-
- dn = sql("select name from `tabDelivery Note` where territory in %s and docstatus =1 order by name"%(cn))
-
- for n in dn:
-
- dt = sql("select sum(qty), sum(amount) from `tabDelivery Note Item` where parent = '%s' and docstatus = 1"%n[0])
- qty += dt[0][0] and dt[0][0] or 0
- amt += dt[0][1] and dt[0][1] or 0
-
- d1 = sql("select item_code,qty from `tabDelivery Note Item` where parent = '%s' and parenttype ='Delivery Note' and docstatus =1"%n[0])
-
- for t in d1:
- tot_val_rate = 0
- packing_list_items = sql("select item_code, warehouse, qty from `tabDelivery Note Packing Item` where parent = '%s' and parent_item = '%s' and docstatus = 1 order by item_code, warehouse,qty"%(n[0],t[0]))
-
- for d in packing_list_items:
- if d[1]:
-
- val_rate = sql("select valuation_rate from `tabStock Ledger Entry` where item_code = '%s' and warehouse = '%s' and voucher_type = 'Delivery Note' and voucher_no = '%s' and is_cancelled = 'No'"%(d[0], d[1], n[0]))
- val_rate = val_rate and val_rate[0][0] or 0
-
- tot_val_rate += t[1] and (flt(val_rate) * flt(d[2]) / flt(t[1])) or 0
- val_amount += flt(tot_val_rate) * flt(t[1])
- r.append(fmt_money(qty))
-
- r.append(fmt_money(amt))
- gp = flt(r[col_idx['Revenue']]) - flt(val_amount)
-
- if val_amount: gp_percent = gp * 100 / flt(val_amount)
- else: gp_percent = gp
- gp_percent = '%0.2f'%gp_percent
-
-
-
- r.append(fmt_money(val_amount))
- r.append(fmt_money(gp_percent))
- r.append(fmt_money(gp))
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.txt b/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.txt
deleted file mode 100644
index ff29d1d1c29..00000000000
--- a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-[
- {
- 'add_col': None,
- 'add_cond': None,
- 'add_tab': None,
- 'columns': None,
- 'creation': '2010-12-14 17:52:48',
- 'criteria_name': 'Territory, Item Group wise GP',
- 'custom_query': '',
- 'description': None,
- 'dis_filters': None,
- 'disabled': None,
- 'doc_type': 'Delivery Note',
- 'docstatus': 0,
- 'doctype': 'Search Criteria',
- 'filters': "{'Delivery Note\x01Status':'','Delivery Note\x01Fiscal Year':''}",
- 'graph_series': None,
- 'graph_values': None,
- 'group_by': None,
- 'idx': None,
- 'modified': '2011-05-09 14:40:26',
- 'modified_by': 'Administrator',
- 'module': 'CRM',
- 'name': 'territory_item_group_wise_gp',
- 'owner': 'harshada@webnotestech.com',
- 'page_len': 50,
- 'parent': None,
- 'parent_doc_type': None,
- 'parentfield': None,
- 'parenttype': None,
- 'report_script': '',
- 'server_script': None,
- 'sort_by': None,
- 'sort_order': 'DESC',
- 'standard': 'Yes'
- }
-]
\ No newline at end of file
diff --git a/erpnext/setup_masters/Module Def/Setup Masters/Setup Masters.txt b/erpnext/setup_masters/Module Def/Setup Masters/Setup Masters.txt
deleted file mode 100644
index fe1a04840c3..00000000000
--- a/erpnext/setup_masters/Module Def/Setup Masters/Setup Masters.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-# Module Def, Setup Masters
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:35:42',
- 'docstatus': 0,
- 'modified': '2012-01-23 17:04:53',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Module Def
- {
- 'disabled': 'No',
- 'doctype': u'Module Def',
- 'is_hidden': 'No',
- 'last_updated_date': '2010-11-29 12:02:02',
- 'module_label': 'Setup Masters',
- 'module_name': 'Setup Masters',
- 'name': '__common__'
- },
-
- # Module Def, Setup Masters
- {
- 'doctype': u'Module Def',
- 'name': 'Setup Masters'
- }
-]
\ No newline at end of file
diff --git a/erpnext/stock/Role/Material Manager/Material Manager.txt b/erpnext/stock/Role/Material Manager/Material Manager.txt
deleted file mode 100644
index 1d6369b53fe..00000000000
--- a/erpnext/stock/Role/Material Manager/Material Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Material Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-03-19 14:56:51',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Stock',
- 'name': '__common__',
- 'role_name': 'Material Manager'
- },
-
- # Role, Material Manager
- {
- 'doctype': 'Role',
- 'name': 'Material Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/stock/Role/Material Master Manager/Material Master Manager.txt b/erpnext/stock/Role/Material Master Manager/Material Master Manager.txt
deleted file mode 100644
index 10fac2c5ae3..00000000000
--- a/erpnext/stock/Role/Material Master Manager/Material Master Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Material Master Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 13:49:58',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Stock',
- 'name': '__common__',
- 'role_name': 'Material Master Manager'
- },
-
- # Role, Material Master Manager
- {
- 'doctype': 'Role',
- 'name': 'Material Master Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/stock/Role/Material User/Material User.txt b/erpnext/stock/Role/Material User/Material User.txt
deleted file mode 100644
index 1436ccb89cd..00000000000
--- a/erpnext/stock/Role/Material User/Material User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Material User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 12:08:13',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Stock',
- 'name': '__common__',
- 'role_name': 'Material User'
- },
-
- # Role, Material User
- {
- 'doctype': 'Role',
- 'name': 'Material User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/stock/Role/Quality Manager/Quality Manager.txt b/erpnext/stock/Role/Quality Manager/Quality Manager.txt
deleted file mode 100644
index 226e9aadc84..00000000000
--- a/erpnext/stock/Role/Quality Manager/Quality Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Quality Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-05-04 13:12:27',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Stock',
- 'name': '__common__',
- 'role_name': 'Quality Manager'
- },
-
- # Role, Quality Manager
- {
- 'doctype': 'Role',
- 'name': 'Quality Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/stock/__init__.py b/erpnext/stock/__init__.py
index e69de29bb2d..ee2b061cdcc 100644
--- a/erpnext/stock/__init__.py
+++ b/erpnext/stock/__init__.py
@@ -0,0 +1,6 @@
+install_docs = [
+ {"doctype":"Role", "name":"Material Manager"},
+ {"doctype":"Role", "name":"Material Master Manager"},
+ {"doctype":"Role", "name":"Material User"},
+ {"doctype":"Role", "name":"Quality Manager"},
+]