2015-03-03 09:25:30 +00:00
|
|
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
2014-04-18 10:30:41 +00:00
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
import frappe
|
|
|
|
|
|
|
|
from frappe import _
|
|
|
|
|
2016-09-16 06:07:38 +00:00
|
|
|
default_lead_sources = ["Existing Customer", "Reference", "Advertisement",
|
|
|
|
"Cold Calling", "Exhibition", "Supplier Reference", "Mass Mailing",
|
|
|
|
"Customer's Vendor", "Campaign", "Walk In"]
|
|
|
|
|
2014-05-02 08:24:49 +00:00
|
|
|
def install(country=None):
|
2014-04-18 10:30:41 +00:00
|
|
|
records = [
|
2017-06-16 07:32:45 +00:00
|
|
|
# domains
|
2017-11-17 06:59:26 +00:00
|
|
|
{ 'doctype': 'Domain', 'domain': 'Distribution'},
|
|
|
|
{ 'doctype': 'Domain', 'domain': 'Manufacturing'},
|
|
|
|
{ 'doctype': 'Domain', 'domain': 'Retail'},
|
|
|
|
{ 'doctype': 'Domain', 'domain': 'Services'},
|
|
|
|
{ 'doctype': 'Domain', 'domain': 'Education'},
|
|
|
|
{ 'doctype': 'Domain', 'domain': 'Healthcare'},
|
[Agriculture Domain] (#11663)
* created Soil Analysis, Water Analysis, Weather and Fertilizer doctype
* soil doctype edited and crop doctype added
* minor stuff
* Land Unit + Leaflet
* crop cycle added
* Land Unit changes + Crop cycle
* autoname for plant_analysis
* created Agriculture Task
* minor stuff
* - deleted agriculture_task
- current state after the call
* [Agriculture] modified fertilizer doctype to have a link to Item
This was done so that the `Fertilizer` doctype could track the contents exclusive to the fertilizer, whereas the `Fertilizer Item` could be a seperate entity, so as to leverage the existing ERPNext doctypes
* Added fields to `Water Analysis` doctype
- Collection Datetime
- Laboratory Testing Datetime
- Results Datetime (default to Laboratory Testing Datetime)
* Edited the doctypes `Agrivulture Task`, `Pest` and `Soil Texture`
- Created `agriculture task` doctype
- added fields `Common Name`, `Scientific Name`, `Treatment` and `Treatment Options` to `Pest` doctype
- edited `Soil Texture` doctype to contain a soil texture ternary plot diagram made using SnapSVG. The code was put in public folder so as to be accessible by the entire agriculture module
* Recursively reflect child land unit feature changes on parents
* fixed feature repition bug
* added legeneds to ternary plot
* added stuff
* changes
* fix Task
* reverted the Task Doctype to have naming in the form TASK.#####
* fixed modifications made to TASK doctype
* [dirty commit] added auto create Task from Crop on creation of Crop Cycle
* Changed the Crop Cycle Doctype
- Deleted the "Crop Cycly Task" doctype and its link from "Crop Cycle"
- Creation of a new Project with the same name as the Crop Cycle on creation of a new Crop Cycle
- Creation of all the tasks imported from Agriculture Task doctype of the Crop in the Crop Cycle
* [Agriculture Module] Modifications
- Created childtable doctype "Pest Detected"
- Added childtable "Pest Detected" to Pest
- Modified "Agriculture Task" to include "Start Day" and "End Day" of task
- Modified the code in "Crop Cycle" to create a parent task with same name as Crop Cycle
* [Agriculture Module] fixed Pest doctype not saving issue
* [Agrcilture Module] Changes in Crop Cycle
- removed the creation of a master task on creation of a new crop cycle
- temporary fix to add the pest tasks from the pests added in crop cycle
* land_unit_tree.js fields modified to have field objects instead of just field names
* Revert "land_unit_tree.js modified"
* land_unit_tree.js fields modified to have field objects instead of just field names
* [Agriculture Domain] Converted Agriculture Module to a Domain
- Converted into a Domain field from Select to Link field in Company doctype, linked to Domain doctype
- Agriculture (alpha) is now a Domain
* land_unit area aggregation enabled
* land_unit.py checks feature diff for every ancestor and not just the parent
* Removed unnecessary print messages
* agriculture.py modified to include fixtures
* fixtures added to setup.py inside agriculture module
* [Agriculture Domain] UI tests added
- 'materials' table renamed to 'materials_required' in 'Crop'
- wrote UI test for Crop, Fertilizer, Crop Cycle, Pest, Water Analysis, Soil Texture
- moved creation of tasks from client side to server side in Crop Cycle
- Plant Analysis, Water Analysis, Soil Analysis, Soil Texture docs are now autonamed in the format PAnalysis.#####, WAnalysis.#####, SAnalysis.#####, STexture.##### respectively
- company_name changed in domains.py from 'Schrute Farms.' to 'Schrute Farms'
* [Agriculture Domain] Mostly written server side tests and moved client side code to server side
- moved client side code to server side for Crop, Water Analysis, Pest, Soil Texture,
- wrote server side tests for Crop, Crop Cycle, Fertilizer, Soil Texture, Pest
- NOTE: none of the server side codes were tested
* [Agriculture Domain] All server side tests working locally
* [Agriculture Domain] Testing
- added sample test for Land Unit, which needs to be modified to test multiple things
- modified tests to be independant of each other
* Land Units tests added and area aggregation code migrated to server side
* added land_unit server side tests and on_trash added to land_unit
* Changing field location for start date
* [Agriculture Domain] deleted unnecessary comments
* [Agriculture Domain] reverted changes
* [Agriculture Domain] Modified the code to replace Pest doctype with Land Unit doctype
- Deleted the Pest doctype and replaced it with the more generic Disease doctype
- Deleted the Detected Pest doctype and replaced it with Detected Disease doctype
* [Agriculture Domain] resolves #11654, resolves #11653
* [Agriculture] Added links to soil analysis, soil texture, plant analysis in crop cycle and land unit
- not working perfectly yet
- docs are fetched but not appended
* [Agricuture] Crop Cycle modifed to link with relevent analysis docs, not fully functional
* [Agriculture] added seperate stage for client side agriculture tests
* [Agriculture] minor modification to crop_cycle.js test
* [Agriculture] fixed tests
* upgrade chromedriver in .travis.yml from 2.32 to 2.33
* [Agriculture] added land unit ui test
* [Agriculture] added Agriculture server side test as a seperate stage in travis
* tesing travis.yml
* [Agriculture] Crop Cycle is able to fetch linked analysis docs
* Modified travis.yml for modular server side testing
* [minor fix][Agriculture] in soil_texture
- fixed multiple soil_texture ternary plot creation on refresh
- fixed error on soil composition change
* Update .travis.yml
* removed location field from linked doctypes
* minor fixes and cleanup of agri
* minor fix in agriculture and domain patches
* permissions added to agriculture
- Agriculture Manager and Agriculture User roles were added to all Agriculture doctypes
* [Agriculture]
- Created Agiculture Analysis Criteria and added sample records to it
- All the analysis doctypes now fetch their fields inside a child table, form Agriculture Analysis Criteria
- Also Fertilizer does the same
This was introduced so that, new parameters could be added on demand
* minor changes requested in Agriculture
* minor changes
* minor fix
* Update desktop.py
* Update .travis.yml
2017-12-06 13:06:27 +00:00
|
|
|
{ 'doctype': 'Domain', 'domain': 'Agriculture'},
|
2017-11-20 12:15:24 +00:00
|
|
|
{ 'doctype': 'Domain', 'domain': 'Non Profit'},
|
2017-06-16 07:32:45 +00:00
|
|
|
|
2017-09-04 05:44:04 +00:00
|
|
|
# Setup Progress
|
|
|
|
{'doctype': "Setup Progress", "actions": [
|
2017-09-26 07:37:24 +00:00
|
|
|
{"action_name": "Add Company", "action_doctype": "Company", "min_doc_count": 1, "is_completed": 1,
|
2017-09-04 05:44:04 +00:00
|
|
|
"domains": '[]' },
|
2017-09-26 07:37:24 +00:00
|
|
|
{"action_name": "Set Sales Target", "action_doctype": "Company", "min_doc_count": 99,
|
2017-09-13 13:11:01 +00:00
|
|
|
"action_document": frappe.defaults.get_defaults().get("company") or '',
|
|
|
|
"action_field": "monthly_sales_target", "is_completed": 0,
|
|
|
|
"domains": '["Manufacturing", "Services", "Retail", "Distribution"]' },
|
2017-09-26 07:37:24 +00:00
|
|
|
{"action_name": "Add Customers", "action_doctype": "Customer", "min_doc_count": 1, "is_completed": 0,
|
2017-09-04 05:44:04 +00:00
|
|
|
"domains": '["Manufacturing", "Services", "Retail", "Distribution"]' },
|
2017-09-26 07:37:24 +00:00
|
|
|
{"action_name": "Add Suppliers", "action_doctype": "Supplier", "min_doc_count": 1, "is_completed": 0,
|
2017-09-04 05:44:04 +00:00
|
|
|
"domains": '["Manufacturing", "Services", "Retail", "Distribution"]' },
|
2017-09-26 07:37:24 +00:00
|
|
|
{"action_name": "Add Products", "action_doctype": "Item", "min_doc_count": 1, "is_completed": 0,
|
2017-09-04 05:44:04 +00:00
|
|
|
"domains": '["Manufacturing", "Services", "Retail", "Distribution"]' },
|
2017-09-26 07:37:24 +00:00
|
|
|
{"action_name": "Add Programs", "action_doctype": "Program", "min_doc_count": 1, "is_completed": 0,
|
2017-09-04 05:44:04 +00:00
|
|
|
"domains": '["Education"]' },
|
2017-09-26 07:37:24 +00:00
|
|
|
{"action_name": "Add Instructors", "action_doctype": "Instructor", "min_doc_count": 1, "is_completed": 0,
|
2017-09-04 05:44:04 +00:00
|
|
|
"domains": '["Education"]' },
|
2017-09-26 07:37:24 +00:00
|
|
|
{"action_name": "Add Courses", "action_doctype": "Course", "min_doc_count": 1, "is_completed": 0,
|
2017-09-04 05:44:04 +00:00
|
|
|
"domains": '["Education"]' },
|
2017-09-26 07:37:24 +00:00
|
|
|
{"action_name": "Add Rooms", "action_doctype": "Room", "min_doc_count": 1, "is_completed": 0,
|
2017-09-04 05:44:04 +00:00
|
|
|
"domains": '["Education"]' },
|
2017-09-26 07:37:24 +00:00
|
|
|
{"action_name": "Add Users", "action_doctype": "User", "min_doc_count": 4, "is_completed": 0,
|
2017-11-28 10:39:58 +00:00
|
|
|
"domains": '[]' },
|
|
|
|
{"action_name": "Add Letterhead", "action_doctype": "Letter Head", "min_doc_count": 1, "is_completed": 0,
|
2017-09-04 05:44:04 +00:00
|
|
|
"domains": '[]' }
|
|
|
|
]},
|
|
|
|
|
2014-06-05 07:47:45 +00:00
|
|
|
# address template
|
|
|
|
{'doctype':"Address Template", "country": country},
|
|
|
|
|
2014-04-18 10:30:41 +00:00
|
|
|
# item group
|
2014-04-21 16:40:15 +00:00
|
|
|
{'doctype': 'Item Group', 'item_group_name': _('All Item Groups'),
|
2016-07-14 08:33:19 +00:00
|
|
|
'is_group': 1, 'parent_item_group': ''},
|
2014-04-21 16:40:15 +00:00
|
|
|
{'doctype': 'Item Group', 'item_group_name': _('Products'),
|
2016-07-14 08:33:19 +00:00
|
|
|
'is_group': 0, 'parent_item_group': _('All Item Groups'), "show_in_website": 1 },
|
2014-04-21 16:40:15 +00:00
|
|
|
{'doctype': 'Item Group', 'item_group_name': _('Raw Material'),
|
2016-07-14 08:33:19 +00:00
|
|
|
'is_group': 0, 'parent_item_group': _('All Item Groups') },
|
2014-04-21 16:40:15 +00:00
|
|
|
{'doctype': 'Item Group', 'item_group_name': _('Services'),
|
2016-07-14 08:33:19 +00:00
|
|
|
'is_group': 0, 'parent_item_group': _('All Item Groups') },
|
2014-04-21 16:40:15 +00:00
|
|
|
{'doctype': 'Item Group', 'item_group_name': _('Sub Assemblies'),
|
2016-07-14 08:33:19 +00:00
|
|
|
'is_group': 0, 'parent_item_group': _('All Item Groups') },
|
2014-04-21 16:40:15 +00:00
|
|
|
{'doctype': 'Item Group', 'item_group_name': _('Consumable'),
|
2016-07-14 08:33:19 +00:00
|
|
|
'is_group': 0, 'parent_item_group': _('All Item Groups') },
|
2014-04-18 10:30:41 +00:00
|
|
|
|
2016-07-30 14:40:00 +00:00
|
|
|
# salary component
|
2016-12-15 05:57:35 +00:00
|
|
|
{'doctype': 'Salary Component', 'salary_component': _('Income Tax'), 'description': _('Income Tax'), 'type': 'Deduction'},
|
|
|
|
{'doctype': 'Salary Component', 'salary_component': _('Basic'), 'description': _('Basic'), 'type': 'Earning'},
|
2017-02-09 08:43:35 +00:00
|
|
|
{'doctype': 'Salary Component', 'salary_component': _('Arrear'), 'description': _('Arrear'), 'type': 'Earning'},
|
|
|
|
{'doctype': 'Salary Component', 'salary_component': _('Leave Encashment'), 'description': _('Leave Encashment'), 'type': 'Earning'},
|
2017-06-16 07:32:45 +00:00
|
|
|
|
2016-09-15 09:45:45 +00:00
|
|
|
|
2014-04-18 10:30:41 +00:00
|
|
|
# expense claim type
|
|
|
|
{'doctype': 'Expense Claim Type', 'name': _('Calls'), 'expense_type': _('Calls')},
|
|
|
|
{'doctype': 'Expense Claim Type', 'name': _('Food'), 'expense_type': _('Food')},
|
|
|
|
{'doctype': 'Expense Claim Type', 'name': _('Medical'), 'expense_type': _('Medical')},
|
|
|
|
{'doctype': 'Expense Claim Type', 'name': _('Others'), 'expense_type': _('Others')},
|
|
|
|
{'doctype': 'Expense Claim Type', 'name': _('Travel'), 'expense_type': _('Travel')},
|
|
|
|
|
|
|
|
# leave type
|
2015-08-25 07:19:40 +00:00
|
|
|
{'doctype': 'Leave Type', 'leave_type_name': _('Casual Leave'), 'name': _('Casual Leave'),
|
2015-07-29 10:45:08 +00:00
|
|
|
'is_encash': 1, 'is_carry_forward': 1, 'max_days_allowed': '3', 'include_holiday': 1},
|
2015-08-25 07:19:40 +00:00
|
|
|
{'doctype': 'Leave Type', 'leave_type_name': _('Compensatory Off'), 'name': _('Compensatory Off'),
|
2015-07-29 10:45:08 +00:00
|
|
|
'is_encash': 0, 'is_carry_forward': 0, 'include_holiday': 1},
|
2015-08-25 07:19:40 +00:00
|
|
|
{'doctype': 'Leave Type', 'leave_type_name': _('Sick Leave'), 'name': _('Sick Leave'),
|
2015-07-29 10:45:08 +00:00
|
|
|
'is_encash': 0, 'is_carry_forward': 0, 'include_holiday': 1},
|
2015-08-25 07:19:40 +00:00
|
|
|
{'doctype': 'Leave Type', 'leave_type_name': _('Privilege Leave'), 'name': _('Privilege Leave'),
|
2015-07-29 10:45:08 +00:00
|
|
|
'is_encash': 0, 'is_carry_forward': 0, 'include_holiday': 1},
|
2015-08-25 07:19:40 +00:00
|
|
|
{'doctype': 'Leave Type', 'leave_type_name': _('Leave Without Pay'), 'name': _('Leave Without Pay'),
|
2015-07-29 10:45:08 +00:00
|
|
|
'is_encash': 0, 'is_carry_forward': 0, 'is_lwp':1, 'include_holiday': 1},
|
2014-04-18 10:30:41 +00:00
|
|
|
|
2014-05-02 08:24:49 +00:00
|
|
|
# Employment Type
|
|
|
|
{'doctype': 'Employment Type', 'employee_type_name': _('Full-time')},
|
|
|
|
{'doctype': 'Employment Type', 'employee_type_name': _('Part-time')},
|
|
|
|
{'doctype': 'Employment Type', 'employee_type_name': _('Probation')},
|
|
|
|
{'doctype': 'Employment Type', 'employee_type_name': _('Contract')},
|
|
|
|
{'doctype': 'Employment Type', 'employee_type_name': _('Commission')},
|
|
|
|
{'doctype': 'Employment Type', 'employee_type_name': _('Piecework')},
|
|
|
|
{'doctype': 'Employment Type', 'employee_type_name': _('Intern')},
|
|
|
|
{'doctype': 'Employment Type', 'employee_type_name': _('Apprentice')},
|
|
|
|
|
|
|
|
# Department
|
|
|
|
{'doctype': 'Department', 'department_name': _('Accounts')},
|
|
|
|
{'doctype': 'Department', 'department_name': _('Marketing')},
|
|
|
|
{'doctype': 'Department', 'department_name': _('Sales')},
|
|
|
|
{'doctype': 'Department', 'department_name': _('Purchase')},
|
|
|
|
{'doctype': 'Department', 'department_name': _('Operations')},
|
|
|
|
{'doctype': 'Department', 'department_name': _('Production')},
|
|
|
|
{'doctype': 'Department', 'department_name': _('Dispatch')},
|
|
|
|
{'doctype': 'Department', 'department_name': _('Customer Service')},
|
|
|
|
{'doctype': 'Department', 'department_name': _('Human Resources')},
|
|
|
|
{'doctype': 'Department', 'department_name': _('Management')},
|
|
|
|
{'doctype': 'Department', 'department_name': _('Quality Management')},
|
|
|
|
{'doctype': 'Department', 'department_name': _('Research & Development')},
|
|
|
|
{'doctype': 'Department', 'department_name': _('Legal')},
|
|
|
|
|
|
|
|
# Designation
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('CEO')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Manager')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Analyst')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Engineer')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Accountant')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Secretary')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Associate')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Administrative Officer')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Business Development Manager')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('HR Manager')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Project Manager')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Head of Marketing and Sales')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Software Developer')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Designer')},
|
|
|
|
{'doctype': 'Designation', 'designation_name': _('Researcher')},
|
|
|
|
|
2014-04-18 10:30:41 +00:00
|
|
|
# territory
|
2016-07-14 08:33:19 +00:00
|
|
|
{'doctype': 'Territory', 'territory_name': _('All Territories'), 'is_group': 1, 'name': _('All Territories'), 'parent_territory': ''},
|
2014-04-18 10:30:41 +00:00
|
|
|
|
|
|
|
# customer group
|
2016-07-14 08:33:19 +00:00
|
|
|
{'doctype': 'Customer Group', 'customer_group_name': _('All Customer Groups'), 'is_group': 1, 'name': _('All Customer Groups'), 'parent_customer_group': ''},
|
|
|
|
{'doctype': 'Customer Group', 'customer_group_name': _('Individual'), 'is_group': 0, 'parent_customer_group': _('All Customer Groups')},
|
|
|
|
{'doctype': 'Customer Group', 'customer_group_name': _('Commercial'), 'is_group': 0, 'parent_customer_group': _('All Customer Groups')},
|
|
|
|
{'doctype': 'Customer Group', 'customer_group_name': _('Non Profit'), 'is_group': 0, 'parent_customer_group': _('All Customer Groups')},
|
|
|
|
{'doctype': 'Customer Group', 'customer_group_name': _('Government'), 'is_group': 0, 'parent_customer_group': _('All Customer Groups')},
|
2014-04-18 10:30:41 +00:00
|
|
|
|
|
|
|
# supplier type
|
|
|
|
{'doctype': 'Supplier Type', 'supplier_type': _('Services')},
|
|
|
|
{'doctype': 'Supplier Type', 'supplier_type': _('Local')},
|
|
|
|
{'doctype': 'Supplier Type', 'supplier_type': _('Raw Material')},
|
|
|
|
{'doctype': 'Supplier Type', 'supplier_type': _('Electrical')},
|
|
|
|
{'doctype': 'Supplier Type', 'supplier_type': _('Hardware')},
|
|
|
|
{'doctype': 'Supplier Type', 'supplier_type': _('Pharmaceutical')},
|
|
|
|
{'doctype': 'Supplier Type', 'supplier_type': _('Distributor')},
|
|
|
|
|
|
|
|
# Sales Person
|
2016-07-14 08:33:19 +00:00
|
|
|
{'doctype': 'Sales Person', 'sales_person_name': _('Sales Team'), 'is_group': 1, "parent_sales_person": ""},
|
2014-04-18 10:30:41 +00:00
|
|
|
|
|
|
|
# UOM
|
2014-05-16 18:37:45 +00:00
|
|
|
{'uom_name': _('Unit'), 'doctype': 'UOM', 'name': _('Unit'), "must_be_whole_number": 1},
|
|
|
|
{'uom_name': _('Box'), 'doctype': 'UOM', 'name': _('Box'), "must_be_whole_number": 1},
|
|
|
|
{'uom_name': _('Kg'), 'doctype': 'UOM', 'name': _('Kg')},
|
2016-06-10 07:04:41 +00:00
|
|
|
{'uom_name': _('Meter'), 'doctype': 'UOM', 'name': _('Meter')},
|
|
|
|
{'uom_name': _('Litre'), 'doctype': 'UOM', 'name': _('Litre')},
|
|
|
|
{'uom_name': _('Gram'), 'doctype': 'UOM', 'name': _('Gram')},
|
2014-05-16 18:37:45 +00:00
|
|
|
{'uom_name': _('Nos'), 'doctype': 'UOM', 'name': _('Nos'), "must_be_whole_number": 1},
|
|
|
|
{'uom_name': _('Pair'), 'doctype': 'UOM', 'name': _('Pair'), "must_be_whole_number": 1},
|
|
|
|
{'uom_name': _('Set'), 'doctype': 'UOM', 'name': _('Set'), "must_be_whole_number": 1},
|
|
|
|
{'uom_name': _('Hour'), 'doctype': 'UOM', 'name': _('Hour')},
|
|
|
|
{'uom_name': _('Minute'), 'doctype': 'UOM', 'name': _('Minute')},
|
2014-04-18 10:30:41 +00:00
|
|
|
|
2014-05-02 08:24:49 +00:00
|
|
|
# Mode of Payment
|
2016-06-10 07:04:41 +00:00
|
|
|
{'doctype': 'Mode of Payment',
|
|
|
|
'mode_of_payment': 'Check' if country=="United States" else _('Cheque'),
|
|
|
|
'type': 'Bank'},
|
|
|
|
{'doctype': 'Mode of Payment', 'mode_of_payment': _('Cash'),
|
|
|
|
'type': 'Cash'},
|
|
|
|
{'doctype': 'Mode of Payment', 'mode_of_payment': _('Credit Card'),
|
|
|
|
'type': 'Bank'},
|
|
|
|
{'doctype': 'Mode of Payment', 'mode_of_payment': _('Wire Transfer'),
|
|
|
|
'type': 'Bank'},
|
|
|
|
{'doctype': 'Mode of Payment', 'mode_of_payment': _('Bank Draft'),
|
|
|
|
'type': 'Bank'},
|
2014-05-02 08:24:49 +00:00
|
|
|
|
|
|
|
# Activity Type
|
|
|
|
{'doctype': 'Activity Type', 'activity_type': _('Planning')},
|
|
|
|
{'doctype': 'Activity Type', 'activity_type': _('Research')},
|
|
|
|
{'doctype': 'Activity Type', 'activity_type': _('Proposal Writing')},
|
|
|
|
{'doctype': 'Activity Type', 'activity_type': _('Execution')},
|
|
|
|
{'doctype': 'Activity Type', 'activity_type': _('Communication')},
|
2015-02-10 09:11:27 +00:00
|
|
|
|
2016-09-16 06:07:38 +00:00
|
|
|
# Lead Source
|
2015-02-20 14:39:42 +00:00
|
|
|
{'doctype': "Item Attribute", "attribute_name": _("Size"), "item_attribute_values": [
|
|
|
|
{"attribute_value": _("Extra Small"), "abbr": "XS"},
|
|
|
|
{"attribute_value": _("Small"), "abbr": "S"},
|
|
|
|
{"attribute_value": _("Medium"), "abbr": "M"},
|
|
|
|
{"attribute_value": _("Large"), "abbr": "L"},
|
|
|
|
{"attribute_value": _("Extra Large"), "abbr": "XL"}
|
|
|
|
]},
|
|
|
|
|
|
|
|
{'doctype': "Item Attribute", "attribute_name": _("Colour"), "item_attribute_values": [
|
|
|
|
{"attribute_value": _("Red"), "abbr": "RED"},
|
|
|
|
{"attribute_value": _("Green"), "abbr": "GRE"},
|
|
|
|
{"attribute_value": _("Blue"), "abbr": "BLU"},
|
|
|
|
{"attribute_value": _("Black"), "abbr": "BLA"},
|
|
|
|
{"attribute_value": _("White"), "abbr": "WHI"}
|
|
|
|
]},
|
2015-01-23 09:52:13 +00:00
|
|
|
|
2015-04-02 16:30:34 +00:00
|
|
|
{'doctype': "Email Account", "email_id": "sales@example.com", "append_to": "Opportunity"},
|
2015-01-23 09:52:13 +00:00
|
|
|
{'doctype': "Email Account", "email_id": "support@example.com", "append_to": "Issue"},
|
2015-04-01 09:43:15 +00:00
|
|
|
{'doctype': "Email Account", "email_id": "jobs@example.com", "append_to": "Job Applicant"},
|
2015-05-18 09:06:57 +00:00
|
|
|
|
2017-02-01 06:32:08 +00:00
|
|
|
{'doctype': "Party Type", "party_type": "Customer"},
|
|
|
|
{'doctype': "Party Type", "party_type": "Supplier"},
|
|
|
|
{'doctype': "Party Type", "party_type": "Employee"},
|
2017-09-18 10:34:52 +00:00
|
|
|
{'doctype': "Party Type", "party_type": "Member"},
|
2018-02-12 06:02:47 +00:00
|
|
|
{'doctype': "Party Type", "party_type": "Shareholder"},
|
2017-02-01 06:32:08 +00:00
|
|
|
|
2017-11-16 11:33:52 +00:00
|
|
|
{'doctype': "Opportunity Type", "name": "Hub"},
|
|
|
|
{'doctype': "Opportunity Type", "name": _("Sales")},
|
|
|
|
{'doctype': "Opportunity Type", "name": _("Support")},
|
|
|
|
{'doctype': "Opportunity Type", "name": _("Maintenance")},
|
|
|
|
|
2017-07-26 12:25:25 +00:00
|
|
|
{'doctype': "Project Type", "project_type": "Internal"},
|
|
|
|
{'doctype': "Project Type", "project_type": "External"},
|
|
|
|
{'doctype': "Project Type", "project_type": "Other"},
|
|
|
|
|
2015-04-01 09:43:15 +00:00
|
|
|
{"doctype": "Offer Term", "offer_term": _("Date of Joining")},
|
|
|
|
{"doctype": "Offer Term", "offer_term": _("Annual Salary")},
|
|
|
|
{"doctype": "Offer Term", "offer_term": _("Probationary Period")},
|
|
|
|
{"doctype": "Offer Term", "offer_term": _("Employee Benefits")},
|
|
|
|
{"doctype": "Offer Term", "offer_term": _("Working Hours")},
|
|
|
|
{"doctype": "Offer Term", "offer_term": _("Stock Options")},
|
|
|
|
{"doctype": "Offer Term", "offer_term": _("Department")},
|
|
|
|
{"doctype": "Offer Term", "offer_term": _("Job Description")},
|
|
|
|
{"doctype": "Offer Term", "offer_term": _("Responsibilities")},
|
|
|
|
{"doctype": "Offer Term", "offer_term": _("Leaves per Year")},
|
|
|
|
{"doctype": "Offer Term", "offer_term": _("Notice Period")},
|
|
|
|
{"doctype": "Offer Term", "offer_term": _("Incentives")},
|
2015-05-18 09:06:57 +00:00
|
|
|
|
2015-08-25 07:19:40 +00:00
|
|
|
{'doctype': "Print Heading", 'print_heading': _("Credit Note")},
|
2016-07-08 12:54:46 +00:00
|
|
|
{'doctype': "Print Heading", 'print_heading': _("Debit Note")},
|
2017-02-22 10:56:41 +00:00
|
|
|
|
|
|
|
# Assessment Group
|
|
|
|
{'doctype': 'Assessment Group', 'assessment_group_name': _('All Assessment Groups'),
|
|
|
|
'is_group': 1, 'parent_assessment_group': ''},
|
2017-06-16 07:32:45 +00:00
|
|
|
|
2018-02-12 06:02:47 +00:00
|
|
|
# Share Management
|
|
|
|
{"doctype": "Share Type", "title": _("Equity")},
|
|
|
|
{"doctype": "Share Type", "title": _("Preference")},
|
|
|
|
|
|
|
|
|
2014-04-18 10:30:41 +00:00
|
|
|
]
|
|
|
|
|
2017-12-21 06:25:58 +00:00
|
|
|
from erpnext.setup.setup_wizard.data.industry_type import get_industry_types
|
2015-09-07 04:41:23 +00:00
|
|
|
records += [{"doctype":"Industry Type", "industry": d} for d in get_industry_types()]
|
|
|
|
# records += [{"doctype":"Operation", "operation": d} for d in get_operations()]
|
2015-02-20 14:39:42 +00:00
|
|
|
|
2016-09-16 06:07:38 +00:00
|
|
|
records += [{'doctype': 'Lead Source', 'source_name': _(d)} for d in default_lead_sources]
|
|
|
|
|
2017-07-24 17:12:30 +00:00
|
|
|
# Records for the Supplier Scorecard
|
|
|
|
from erpnext.buying.doctype.supplier_scorecard.supplier_scorecard import make_default_records
|
|
|
|
make_default_records()
|
|
|
|
|
2014-04-18 10:30:41 +00:00
|
|
|
from frappe.modules import scrub
|
|
|
|
for r in records:
|
2014-06-05 07:47:45 +00:00
|
|
|
doc = frappe.new_doc(r.get("doctype"))
|
|
|
|
doc.update(r)
|
2014-04-18 10:30:41 +00:00
|
|
|
|
|
|
|
# ignore mandatory for root
|
|
|
|
parent_link_field = ("parent_" + scrub(doc.doctype))
|
|
|
|
if doc.meta.get_field(parent_link_field) and not doc.get(parent_link_field):
|
2015-02-10 09:11:27 +00:00
|
|
|
doc.flags.ignore_mandatory = True
|
2015-09-11 10:02:06 +00:00
|
|
|
|
|
|
|
try:
|
|
|
|
doc.insert(ignore_permissions=True)
|
2017-07-27 05:08:35 +00:00
|
|
|
except frappe.DuplicateEntryError as e:
|
2015-09-11 10:02:06 +00:00
|
|
|
# pass DuplicateEntryError and continue
|
|
|
|
if e.args and e.args[0]==doc.doctype and e.args[1]==doc.name:
|
|
|
|
# make sure DuplicateEntryError is for the exact same doc and not a related doc
|
|
|
|
pass
|
|
|
|
else:
|
2017-07-27 05:08:35 +00:00
|
|
|
raise
|
2017-09-14 11:56:23 +00:00
|
|
|
|
|
|
|
# set default customer group and territory
|
|
|
|
selling_settings = frappe.get_doc("Selling Settings")
|
|
|
|
selling_settings.set_default_customer_group_and_territory()
|
|
|
|
selling_settings.save()
|