restructured erpnext and deleted unwanted

This commit is contained in:
nabinhait
2011-07-01 13:34:41 +05:30
parent c1c54c9400
commit ec097975d0
1280 changed files with 54494 additions and 88652 deletions

View File

@@ -1,58 +1,31 @@
# DocType, Company Control
[
# These values are common in all dictionaries
{
'_last_update': None,
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': None,
'change_log': None,
'client_script': None,
'client_script_core': '',
'client_string': None,
'colour': 'White:FFF',
'creation': '2010-08-08 17:08:55',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': None,
'hide_toolbar': None,
'idx': None,
'in_create': None,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': 1,
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2010-11-17 16:25:34',
'modified': '2011-01-13 12:14:36',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all DocType
{
'colour': 'White:FFF',
'doctype': 'DocType',
'issingle': 1,
'module': 'Home',
'name': 'Company Control',
'name_case': '',
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': '',
'read_only': None,
'read_only_onload': None,
'search_fields': None,
'name': '__common__',
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code': '\n\n\t# Update roles of given user\n\tdef update_roles(self,arg):\n\t\targ = eval(arg)\n\t\tsql("delete from `tabUserRole` where parenttype=\'Profile\' and parent =\'%s\'" % (cstr(arg[\'usr\'])))\n\t\trole_list = arg[\'role_list\'].split(\',\')\n\t\tmsgprint(sql("select role from tabUserRole where parent = \'%s\'" % cstr(arg[\'usr\'])))\n\t\tmsgprint(role_list)\n\t\tfor r in role_list:\n\t\t\tpr=Document(\'UserRole\')\n\t\t\tpr.parent = arg[\'usr\']\n\t\t\tpr.parenttype = \'Profile\'\n\t\t\tpr.role = r\n\t\t\tpr.parentfield = \'userroles\'\n\t\t\tpr.save(1)\n\t\tmsgprint(sql("select role from tabUserRole where parent = \'%s\'" % cstr(arg[\'usr\'])))\n\n\n # Create New Profile\n # ====================\n\tdef create_new_profile(self, arg):\n\t\tp = Document(\'Profile\')\n\t\tp.first_name = arg.get(\'first_name\') or arg.get(\'email_id\')\n\t\tp.last_name = arg.get(\'last_name\')\n\t\tp.email = arg.get(\'email_id\')\n\t\tp.name = arg.get(\'email_id\')\n\t\tp.user_type = arg.get(\'user_type\') or \'System User\'\n\t\tp.enabled = 0\t\n\t\tp.save(new=1)\n\t\tp_obj = get_obj(\'Profile\', p.name)\n\t\tp_obj.on_update()',
'server_code_error': ' ',
'show_in_menu': None,
'smallicon': None,
'subject': None,
'tag_fields': None,
'use_template': None,
'version': 7
'version': 13
},
# DocType, Company Control
{
'doctype': 'DocType',
'name': 'Company Control'
}
]

View File

@@ -1,202 +1,73 @@
# DocType, Feed
[
# These values are common in all dictionaries
{
'_last_update': None,
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': '_FEED.#####',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2011-04-06 18:07:23',
'description': None,
'creation': '2011-04-08 10:50:41',
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': None,
'hide_toolbar': None,
'idx': None,
'in_create': None,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': None,
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2011-06-09 16:42:12',
'modified': '2011-04-05 09:16:57',
'modified_by': 'Administrator',
'module': 'Home',
'name': 'Feed',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': None,
'read_only_onload': None,
'search_fields': None,
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': None,
'show_in_menu': 0,
'smallicon': None,
'subject': None,
'tag_fields': None,
'use_template': None,
'version': 2
'owner': 'Administrator'
},
# These values are common for all DocType
{
'autoname': '_FEED.#####',
'colour': 'White:FFF',
'doctype': 'DocType',
'module': 'Home',
'name': '__common__',
'section_style': 'Simple',
'show_in_menu': 0,
'version': 1
},
# These values are common for all DocField
{
'doctype': 'DocField',
'fieldtype': 'Data',
'name': '__common__',
'parent': 'Feed',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0
},
# DocType, Feed
{
'doctype': 'DocType',
'name': 'Feed'
},
# DocField
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-06 18:07:23',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'doc_type',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Doc Type',
'modified': '2011-06-09 16:42:12',
'modified_by': 'Administrator',
'name': '000000498',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Feed',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
'label': 'Doc Type'
},
# DocField
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-06 18:07:24',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'doc_name',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Doc Name',
'modified': '2011-06-09 16:42:12',
'modified_by': 'Administrator',
'name': '000000499',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Feed',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
'label': 'Doc Name'
},
# DocField
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-06 18:07:24',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'subject',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Subject',
'modified': '2011-06-09 16:42:12',
'modified_by': 'Administrator',
'name': '000000500',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Feed',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
'label': 'Subject'
},
# DocField
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-06 18:07:24',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'color',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Color',
'modified': '2011-06-09 16:42:12',
'modified_by': 'Administrator',
'name': '000000501',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Feed',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
'label': 'Color'
}
]

View File

@@ -287,7 +287,7 @@ class DocType:
# module settings
# -------------------------------------------------------------------------------------------------------
def get_module_order(self):
show_list = ['Event Updates','My Company','Setup','Accounts','CRM','SRM','Maintenance','Material Management','Payroll','Projects','Analysis','Production']
show_list = ['Home','Setup','Accounts','Selling','Buying','Support','Stock','HR','Projects','Analysis','Production']
ml = filter(lambda x: x[0] in show_list, \
sql("select name, module_label, module_seq, is_hidden from `tabModule Def` where docstatus<2 order by module_seq asc, module_label asc"))
return convert_to_lists(ml)

View File

@@ -1,81 +1,55 @@
# DocType, Home Control
[
# These values are common in all dictionaries
{
'_last_update': None,
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': None,
'change_log': None,
'client_script': None,
'client_script_core': '',
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-07-09 16:32:49',
'description': None,
'docstatus': 0,
'modified': '2010-12-24 17:08:55',
'modified_by': 'nabin@webnotestech.com',
'owner': 'Administrator'
},
# These values are common for all DocType
{
'colour': 'White:FFF',
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': None,
'hide_toolbar': None,
'idx': None,
'in_create': None,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': 1,
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2011-06-09 16:42:37',
'modified_by': 'Administrator',
'module': 'Home',
'name': 'Home Control',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': None,
'read_only_onload': None,
'search_fields': None,
'name': '__common__',
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'subject': None,
'tag_fields': None,
'use_template': None,
'version': 4
'version': 6
},
# These values are common for all DocPerm
{
'amend': None,
'cancel': None,
'create': 1,
'creation': '2010-10-19 13:01:06',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2011-06-09 16:42:37',
'modified_by': 'Administrator',
'name': 'PERM00716',
'owner': 'Administrator',
'name': '__common__',
'parent': 'Home Control',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Guest',
'submit': None,
'write': 1
},
# DocType, Home Control
{
'doctype': 'DocType',
'name': 'Home Control'
},
# DocPerm
{
'doctype': 'DocPerm'
},
# DocPerm
{
'doctype': 'DocPerm'
}
]

View File

@@ -1,58 +1,32 @@
# DocType, Widget Control
[
# These values are common in all dictionaries
{
'_last_update': None,
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': None,
'change_log': None,
'client_script': None,
'client_script_core': '',
'client_string': None,
'colour': 'White:FFF',
'creation': '2010-08-08 17:09:30',
'description': None,
'docstatus': 0,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all DocType
{
'colour': 'White:FFF',
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': None,
'hide_toolbar': None,
'idx': None,
'in_create': None,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': 1,
'istable': 0,
'max_attachments': None,
'menu_index': None,
'modified': '2011-06-09 16:44:21',
'modified_by': 'Administrator',
'module': 'Home',
'name': 'Widget Control',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': None,
'read_only_onload': None,
'search_fields': None,
'name': '__common__',
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'subject': None,
'tag_fields': None,
'use_template': None,
'version': 28
'version': 27
},
# DocType, Widget Control
{
'doctype': 'DocType',
'name': 'Widget Control'
}
]

View File

@@ -1,36 +1,27 @@
# Page, Event Updates
[
# These values are common in all dictionaries
{
'author': None,
'category': None,
'content': None,
'creation': '2010-12-14 10:33:09',
'creation': '2010-12-14 10:23:23',
'docstatus': 0,
'doctype': 'Page',
'file_list': None,
'icon': None,
'idx': None,
'keywords': None,
'menu_index': None,
'modified': '2010-12-23 11:48:49',
'modified': '2010-12-27 10:58:56',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all Page
{
'doctype': 'Page',
'module': 'Home',
'name': 'Event Updates',
'owner': 'Administrator',
'name': '__common__',
'page_name': 'Event Updates',
'page_title': None,
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'publish': None,
'script': None,
'show_in_menu': None,
'site_description': None,
'standard': 'Yes',
'static_content': None,
'style': None,
'stylesheet': None,
'template': None,
'write_content': None
'standard': 'Yes'
},
# Page, Event Updates
{
'doctype': 'Page',
'name': 'Event Updates'
}
]

View File

@@ -108,7 +108,7 @@ def post_comment(arg):
fn = webnotes.user.name
from webnotes.utils.email_lib import sendmail
from settings.doctype.notification_control.notification_control import get_formatted_message
from setup.doctype.notification_control.notification_control import get_formatted_message
message = '''A new comment has been posted on your page by %s:

View File

@@ -1,64 +1,51 @@
# Page, My Company
[
# These values are common in all dictionaries
{
'author': None,
'category': None,
'content': '',
'creation': '2010-12-14 10:33:09',
'creation': '2010-12-14 10:23:19',
'docstatus': 0,
'doctype': 'Page',
'file_list': None,
'icon': None,
'idx': None,
'keywords': None,
'menu_index': None,
'modified': '2010-12-01 17:09:46',
'modified': '2010-12-27 17:44:15',
'modified_by': 'Administrator',
'module': 'Home',
'name': 'My Company',
'owner': 'Administrator',
'page_name': 'My Company',
'page_title': None,
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'publish': None,
'script': None,
'show_in_menu': 1,
'site_description': None,
'standard': 'Yes',
'static_content': '',
'style': '',
'stylesheet': None,
'template': None,
'write_content': None
'owner': 'Administrator'
},
# These values are common for all Page
{
'doctype': 'Page',
'module': 'Home',
'name': '__common__',
'page_name': 'My Company',
'show_in_menu': 1,
'standard': 'Yes'
},
# These values are common for all Page Role
{
'doctype': 'Page Role',
'name': '__common__',
'parent': 'My Company',
'parentfield': 'roles',
'parenttype': 'Page'
},
# Page, My Company
{
'doctype': 'Page',
'name': 'My Company'
},
# Page Role
{
'creation': '2010-12-14 10:33:09',
'docstatus': 0,
'doctype': 'Page Role',
'idx': 1,
'modified': '2010-12-14 10:33:09',
'modified_by': 'Administrator',
'name': 'PR000235',
'owner': 'Administrator',
'parent': 'My Company',
'parentfield': 'roles',
'parenttype': 'Page',
'role': 'Administrator'
},
# Page Role
{
'creation': '2010-12-14 10:33:09',
'docstatus': 0,
'doctype': 'Page Role',
'idx': 2,
'modified': '2010-12-14 10:33:09',
'modified_by': 'Administrator',
'name': 'PR000236',
'owner': 'nabin@webnotestech.com',
'parent': 'My Company',
'parentfield': 'roles',
'parenttype': 'Page',
'role': 'All'
}
]

View File

@@ -1,36 +1,27 @@
# Page, profile-settings
[
# These values are common in all dictionaries
{
'author': None,
'category': 'Standard',
'content': None,
'creation': '2011-04-13 12:08:59',
'creation': '2011-04-18 10:19:10',
'docstatus': 0,
'doctype': 'Page',
'file_list': None,
'icon': None,
'idx': None,
'keywords': None,
'menu_index': None,
'modified': '2011-04-13 12:08:59',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all Page
{
'doctype': 'Page',
'module': 'Home',
'name': 'profile-settings',
'owner': 'Administrator',
'name': '__common__',
'page_name': 'Profile Settings',
'page_title': None,
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'publish': None,
'script': None,
'show_in_menu': None,
'site_description': None,
'standard': 'Yes',
'static_content': None,
'style': None,
'stylesheet': None,
'template': None,
'write_content': None
'standard': 'Yes'
},
# Page, profile-settings
{
'doctype': 'Page',
'name': 'profile-settings'
}
]