# DocType, Territory
[

	# These values are common in all dictionaries
	{
		'creation': '2012-07-03 13:30:55',
		'docstatus': 0,
		'modified': '2012-07-12 10:01:47',
		'modified_by': u'Administrator',
		'owner': u'Administrator'
	},

	# These values are common for all DocType
	{
		'_last_update': u'1311621379',
		'allow_trash': 1,
		'autoname': u'field:territory_name',
		'colour': u'White:FFF',
		'default_print_format': u'Standard',
		'description': u'You can create **Territories** If your organization operates in multiple regions (could be countries, states or cities). Once you group **Customers** by **Territories**, you can set annual targets for each **Item Group** and get reports that will show your actual performance in the territory v/s what you had planned.',
		'doctype': 'DocType',
		'document_type': u'Master',
		'in_create': 1,
		'module': u'Setup',
		'name': '__common__',
		'name_case': u'Title Case',
		'read_only': 1,
		'search_fields': u'name,parent_territory,territory_manager',
		'section_style': u'Simple',
		'server_code_error': u' ',
		'show_in_menu': 0,
		'version': 1
	},

	# These values are common for all DocField
	{
		'doctype': u'DocField',
		'name': '__common__',
		'parent': u'Territory',
		'parentfield': u'fields',
		'parenttype': u'DocType'
	},

	# These values are common for all DocPerm
	{
		'amend': 0,
		'doctype': u'DocPerm',
		'name': '__common__',
		'parent': u'Territory',
		'parentfield': u'permissions',
		'parenttype': u'DocType',
		'read': 1,
		'submit': 0
	},

	# DocType, Territory
	{
		'doctype': 'DocType',
		'name': u'Territory'
	},

	# DocPerm
	{
		'cancel': 0,
		'create': 0,
		'doctype': u'DocPerm',
		'permlevel': 1,
		'role': u'Sales Manager',
		'write': 0
	},

	# DocPerm
	{
		'cancel': 0,
		'create': 0,
		'doctype': u'DocPerm',
		'permlevel': 0,
		'role': u'Sales Manager',
		'write': 0
	},

	# DocPerm
	{
		'cancel': 0,
		'create': 0,
		'doctype': u'DocPerm',
		'permlevel': 1,
		'role': u'Sales Master Manager',
		'write': 0
	},

	# DocPerm
	{
		'cancel': 0,
		'create': 0,
		'doctype': u'DocPerm',
		'permlevel': 1,
		'role': u'Sales User',
		'write': 0
	},

	# DocPerm
	{
		'cancel': 0,
		'create': 0,
		'doctype': u'DocPerm',
		'permlevel': 0,
		'role': u'Sales User',
		'write': 0
	},

	# DocPerm
	{
		'cancel': 1,
		'create': 1,
		'doctype': u'DocPerm',
		'permlevel': 0,
		'role': u'Sales Master Manager',
		'write': 1
	},

	# DocField
	{
		'doctype': u'DocField',
		'fieldname': u'trash_reason',
		'fieldtype': u'Small Text',
		'label': u'Trash Reason',
		'oldfieldname': u'trash_reason',
		'oldfieldtype': u'Small Text',
		'permlevel': 1
	},

	# DocField
	{
		'doctype': u'DocField',
		'fieldname': u'territory_name',
		'fieldtype': u'Data',
		'label': u'Territory Name',
		'no_copy': 1,
		'oldfieldname': u'territory_name',
		'oldfieldtype': u'Data',
		'permlevel': 0,
		'reqd': 1
	},

	# DocField
	{
		'doctype': u'DocField',
		'fieldname': u'parent_territory',
		'fieldtype': u'Link',
		'label': u'Parent Territory',
		'oldfieldname': u'parent_territory',
		'oldfieldtype': u'Link',
		'options': u'Territory',
		'permlevel': 0,
		'reqd': 1,
		'trigger': u'Client'
	},

	# DocField
	{
		'colour': u'White:FFF',
		'description': u'Only leaf nodes are allowed in transaction',
		'doctype': u'DocField',
		'fieldname': u'is_group',
		'fieldtype': u'Select',
		'label': u'Has Child Node',
		'oldfieldname': u'is_group',
		'oldfieldtype': u'Select',
		'options': u'\nYes\nNo',
		'permlevel': 0,
		'reqd': 1
	},

	# DocField
	{
		'doctype': u'DocField',
		'fieldname': u'cb0',
		'fieldtype': u'Column Break',
		'permlevel': 0
	},

	# DocField
	{
		'colour': u'White:FFF',
		'description': u'For reference',
		'doctype': u'DocField',
		'fieldname': u'territory_manager',
		'fieldtype': u'Link',
		'in_filter': 1,
		'label': u'Territory Manager',
		'oldfieldname': u'territory_manager',
		'oldfieldtype': u'Link',
		'options': u'Sales Person',
		'permlevel': 0,
		'search_index': 1
	},

	# DocField
	{
		'doctype': u'DocField',
		'fieldname': u'lft',
		'fieldtype': u'Int',
		'hidden': 1,
		'in_filter': 1,
		'label': u'lft',
		'no_copy': 1,
		'oldfieldname': u'lft',
		'oldfieldtype': u'Int',
		'permlevel': 0,
		'print_hide': 1,
		'report_hide': 0,
		'search_index': 1
	},

	# DocField
	{
		'doctype': u'DocField',
		'fieldname': u'rgt',
		'fieldtype': u'Int',
		'hidden': 1,
		'in_filter': 1,
		'label': u'rgt',
		'no_copy': 1,
		'oldfieldname': u'rgt',
		'oldfieldtype': u'Int',
		'permlevel': 0,
		'print_hide': 1,
		'report_hide': 0,
		'search_index': 1
	},

	# DocField
	{
		'doctype': u'DocField',
		'fieldname': u'old_parent',
		'fieldtype': u'Link',
		'hidden': 1,
		'label': u'old_parent',
		'no_copy': 1,
		'oldfieldname': u'old_parent',
		'oldfieldtype': u'Data',
		'options': u'Territory',
		'permlevel': 0,
		'print_hide': 1,
		'report_hide': 1
	},

	# DocField
	{
		'colour': u'White:FFF',
		'description': u'Set Item Group-wise budgets on this Territory. You can also include seasonality by setting the Distribution.',
		'doctype': u'DocField',
		'fieldname': u'target_details_section_break',
		'fieldtype': u'Section Break',
		'label': u'Territory Targets',
		'oldfieldtype': u'Section Break',
		'permlevel': 0
	},

	# DocField
	{
		'doctype': u'DocField',
		'fieldname': u'target_details',
		'fieldtype': u'Table',
		'label': u'Target Details',
		'oldfieldname': u'target_details',
		'oldfieldtype': u'Table',
		'options': u'Target Detail',
		'permlevel': 0
	},

	# DocField
	{
		'colour': u'White:FFF',
		'description': u'Select Budget Distribution to unevenly distribute targets across months.',
		'doctype': u'DocField',
		'fieldname': u'distribution_id',
		'fieldtype': u'Link',
		'label': u'Target Distribution',
		'oldfieldname': u'distribution_id',
		'oldfieldtype': u'Link',
		'options': u'Budget Distribution',
		'permlevel': 0
	}
]