Преглед изворни кода

Sourced WebNotes Framework from Google Code.

version-14
Pratik Vyas пре 14 година
комит
d9404210e4
100 измењених фајлова са 17625 додато и 0 уклоњено
  1. +81
    -0
      INSTALL.txt
  2. +39
    -0
      blank.html
  3. +0
    -0
      blank1.html
  4. +24
    -0
      cgi-bin/backupall.py
  5. +84
    -0
      f/Core/Core.txt
  6. +17
    -0
      cgi-bin/core/Role/Administrator/Administrator.txt
  7. +17
    -0
      cgi-bin/core/Role/All/All.txt
  8. +47
    -0
      cgi-bin/core/Role/Guest/Guest.txt
  9. +0
    -0
      cgi-bin/core/__init__.py
  10. +0
    -0
      cgi-bin/core/doctype/__init__.py
  11. +0
    -0
      cgi-bin/core/doctype/comment_widget_record/__init__.py
  12. +358
    -0
      cgi-bin/core/doctype/comment_widget_record/comment_widget_record.txt
  13. +0
    -0
      cgi-bin/core/doctype/control_panel/__init__.py
  14. +36
    -0
      cgi-bin/core/doctype/control_panel/control_panel.py
  15. +1933
    -0
      cgi-bin/core/doctype/control_panel/control_panel.txt
  16. +0
    -0
      cgi-bin/core/doctype/custom_field/__init__.py
  17. +54
    -0
      cgi-bin/core/doctype/custom_field/custom_field.js
  18. +100
    -0
      cgi-bin/core/doctype/custom_field/custom_field.py
  19. +929
    -0
      cgi-bin/core/doctype/custom_field/custom_field.txt
  20. +0
    -0
      cgi-bin/core/doctype/custom_script/__init__.py
  21. +189
    -0
      cgi-bin/core/doctype/custom_script/custom_script.txt
  22. +0
    -0
      cgi-bin/core/doctype/default_home_page/__init__.py
  23. +125
    -0
      cgi-bin/core/doctype/default_home_page/default_home_page.txt
  24. +0
    -0
      cgi-bin/core/doctype/defaultvalue/__init__.py
  25. +125
    -0
      cgi-bin/core/doctype/defaultvalue/defaultvalue.txt
  26. +0
    -0
      cgi-bin/core/doctype/docfield/__init__.py
  27. +907
    -0
      cgi-bin/core/doctype/docfield/docfield.txt
  28. +0
    -0
      cgi-bin/core/doctype/docformat/__init__.py
  29. +90
    -0
      cgi-bin/core/doctype/docformat/docformat.txt
  30. +0
    -0
      cgi-bin/core/doctype/docperm/__init__.py
  31. +405
    -0
      cgi-bin/core/doctype/docperm/docperm.txt
  32. +0
    -0
      cgi-bin/core/doctype/doctrigger/__init__.py
  33. +196
    -0
      cgi-bin/core/doctype/doctrigger/doctrigger.txt
  34. +0
    -0
      cgi-bin/core/doctype/doctype/__init__.py
  35. +75
    -0
      cgi-bin/core/doctype/doctype/doctype.js
  36. +94
    -0
      cgi-bin/core/doctype/doctype/doctype.py
  37. +1796
    -0
      cgi-bin/core/doctype/doctype/doctype.txt
  38. +0
    -0
      cgi-bin/core/doctype/doctype_label/__init__.py
  39. +148
    -0
      cgi-bin/core/doctype/doctype_label/doctype_label.txt
  40. +0
    -0
      cgi-bin/core/doctype/doctype_mapper/__init__.py
  41. +9
    -0
      cgi-bin/core/doctype/doctype_mapper/doctype_mapper.js
  42. +247
    -0
      cgi-bin/core/doctype/doctype_mapper/doctype_mapper.py
  43. +311
    -0
      cgi-bin/core/doctype/doctype_mapper/doctype_mapper.txt
  44. +0
    -0
      cgi-bin/core/doctype/event/__init__.py
  45. +603
    -0
      cgi-bin/core/doctype/event/event.txt
  46. +0
    -0
      cgi-bin/core/doctype/event_role/__init__.py
  47. +90
    -0
      cgi-bin/core/doctype/event_role/event_role.txt
  48. +0
    -0
      cgi-bin/core/doctype/event_user/__init__.py
  49. +90
    -0
      cgi-bin/core/doctype/event_user/event_user.txt
  50. +0
    -0
      cgi-bin/core/doctype/field_mapper_detail/__init__.py
  51. +230
    -0
      cgi-bin/core/doctype/field_mapper_detail/field_mapper_detail.txt
  52. +0
    -0
      cgi-bin/core/doctype/file_data/__init__.py
  53. +125
    -0
      cgi-bin/core/doctype/file_data/file_data.txt
  54. +0
    -0
      cgi-bin/core/doctype/letter_head/__init__.py
  55. +26
    -0
      cgi-bin/core/doctype/letter_head/letter_head.js
  56. +31
    -0
      cgi-bin/core/doctype/letter_head/letter_head.py
  57. +324
    -0
      cgi-bin/core/doctype/letter_head/letter_head.txt
  58. +0
    -0
      cgi-bin/core/doctype/module_def/__init__.py
  59. +50
    -0
      cgi-bin/core/doctype/module_def/module_def.py
  60. +708
    -0
      cgi-bin/core/doctype/module_def/module_def.txt
  61. +0
    -0
      cgi-bin/core/doctype/module_def_item/__init__.py
  62. +335
    -0
      cgi-bin/core/doctype/module_def_item/module_def_item.txt
  63. +0
    -0
      cgi-bin/core/doctype/module_def_role/__init__.py
  64. +90
    -0
      cgi-bin/core/doctype/module_def_role/module_def_role.txt
  65. +0
    -0
      cgi-bin/core/doctype/page/__init__.py
  66. +49
    -0
      cgi-bin/core/doctype/page/page.py
  67. +1023
    -0
      cgi-bin/core/doctype/page/page.txt
  68. +0
    -0
      cgi-bin/core/doctype/page_role/__init__.py
  69. +90
    -0
      cgi-bin/core/doctype/page_role/page_role.txt
  70. +0
    -0
      cgi-bin/core/doctype/page_template/__init__.py
  71. +20
    -0
      cgi-bin/core/doctype/page_template/page_template.py
  72. +160
    -0
      cgi-bin/core/doctype/page_template/page_template.txt
  73. +0
    -0
      cgi-bin/core/doctype/print_format/__init__.py
  74. +183
    -0
      cgi-bin/core/doctype/print_format/print_format.txt
  75. +0
    -0
      cgi-bin/core/doctype/profile/__init__.py
  76. +26
    -0
      cgi-bin/core/doctype/profile/profile.js
  77. +48
    -0
      cgi-bin/core/doctype/profile/profile.py
  78. +2003
    -0
      cgi-bin/core/doctype/profile/profile.txt
  79. +0
    -0
      cgi-bin/core/doctype/property_setter/__init__.py
  80. +8
    -0
      cgi-bin/core/doctype/property_setter/property_setter.comp.js
  81. +109
    -0
      cgi-bin/core/doctype/property_setter/property_setter.js
  82. +29
    -0
      cgi-bin/core/doctype/property_setter/property_setter.py
  83. +500
    -0
      cgi-bin/core/doctype/property_setter/property_setter.txt
  84. +0
    -0
      cgi-bin/core/doctype/role/__init__.py
  85. +183
    -0
      cgi-bin/core/doctype/role/role.txt
  86. +0
    -0
      cgi-bin/core/doctype/search_criteria/__init__.py
  87. +71
    -0
      cgi-bin/core/doctype/search_criteria/search_criteria.py
  88. +1092
    -0
      cgi-bin/core/doctype/search_criteria/search_criteria.txt
  89. +0
    -0
      cgi-bin/core/doctype/stylesheet/__init__.py
  90. +18
    -0
      cgi-bin/core/doctype/stylesheet/stylesheet.py
  91. +160
    -0
      cgi-bin/core/doctype/stylesheet/stylesheet.txt
  92. +0
    -0
      cgi-bin/core/doctype/system_console/__init__.py
  93. +8
    -0
      cgi-bin/core/doctype/system_console/system_console.comp.js
  94. +23
    -0
      cgi-bin/core/doctype/system_console/system_console.js
  95. +17
    -0
      cgi-bin/core/doctype/system_console/system_console.py
  96. +242
    -0
      cgi-bin/core/doctype/system_console/system_console.txt
  97. +0
    -0
      cgi-bin/core/doctype/table_mapper_detail/__init__.py
  98. +335
    -0
      cgi-bin/core/doctype/table_mapper_detail/table_mapper_detail.txt
  99. +0
    -0
      cgi-bin/core/doctype/tag/__init__.py
  100. +90
    -0
      cgi-bin/core/doctype/tag/tag.txt

+ 81
- 0
INSTALL.txt Прегледај датотеку

@@ -0,0 +1,81 @@
INSTALL.txt
===========

Web Notes Framework Installation guide

Web Notes Framework (WNF) is a meta-data driven web app framework. After install, you build
and configure your application from the web browser.

WNF requires the following applications

1. Python
2. MySQL
3. MySQL-Python (connector)
4. simplejson (for Python 2.4 or lower)
5. email (for Python 2.4 or lower)
6. pytz (easy_install pytz)
7. Apache
8. PIL (optional - for image processing (thumbnails etc)
- yum install libjpeg-devel
- yum install python-imaging
)

------------------------------------------------------------------------
1. Create a databse instance for your application

Call the install script with the following options. For more options use -h
python [folder]/cgi-bin/webnotes/install_lib/install.py MYSQL_ROOT_LOGIN MYSQL_ROOT_PASSWORD DBNAME

------------------------------------------------------------------------
2. Setup defs.py

The framework picks up the database details from cgi-bin/webnotes/defs.py
You need to edit this file and set your database name and other options
------------------------------------------------------------------------
3. Configuring Apache

a. You must set Apache to execute index.cgi file, one way to do this is to add cgi handler
and add ExecCGI in the options directive.

b. You can also add couple of lines below to block Apache from rendering .py files

RewriteEngine on
RewriteRule \.py - [F]

c. Add "index.cgi" to DirectoryIndex

------------------------------------------------------------------------
4. Login to application

Start Apache, go to your web-browser and point to the folder where you installed the framework

The default logins are:

login: Administrator
password: admin

------------------------------------------------------------------------

Step by step instructions on CentOS/Fedora:
0.Check out the source code.
1. Modify the v170/cgi-bin/webnotes/defs file to your required settings and rename it to defs.py
2. yum install mysql
3. yum install httpd
4. yum install MySQL-python
5. yum install python-setuptools
6. easy_install pytz
7. easy_install email
8. easy_install simplejson suds
9. easy_install pygeoip (optional for geo ip)
9. yum install libjpeg-devel (optional)
10.yum install python-imaging (optional)

11. Edit /etc/httpd/conf/httpd.conf and add the options as mentioned above.
12. from the trunk/v170/cgi-bin folder run python webnotes/install_lib/install.py install




+ 39
- 0
blank.html Прегледај датотеку

@@ -0,0 +1,39 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!--
Copyright (c) 2007 Brian Dillard and Brad Neuberg:
Brian Dillard | Project Lead | bdillard@pathf.com | http://blogs.pathf.com/agileajax/
Brad Neuberg | Original Project Creator | http://codinginparadise.org

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<script language="JavaScript">
function pageLoaded() {
window.parent.dhtmlHistory.iframeLoaded(window.location);
document.getElementById("output").innerHTML = window.location;
}
</script>

</head>

<body onload="pageLoaded();" style="width:700px;padding:2px;margin:0;">

<p>blank.html - Needed for Internet Explorer's hidden iframe</p>
<p id="output"></p>

</body>
</html>


+ 24
- 0
cgi-bin/backupall.py Прегледај датотеку

@@ -0,0 +1,24 @@
import os

# go to current directory
os.chdir(__file__[:-12])

import webnotes.utils.backups

webnotes.utils.backups.backup_all()

# send the daily backup to the pair server
import webnotes.defs
if hasattr(webnotes.defs,'ps_host'):
import ftplib, time

ftp = ftplib.FTP(webnotes.defs.ps_host, webnotes.defs.ps_login, webnotes.defs.ps_pwd)
ftp.cwd('pair_backups')
fname = 'daily-' + time.strftime('%Y-%m-%d') + '.tar.gz'
f = open('/backups/daily/' + fname, 'rb')
ftp.storbinary('STOR ' + webnotes.defs.server_prefix + '-' + fname, f)
ftp.quit()
# delete from local pair directory
if hasattr(webnotes.defs, 'pair_dir') and len(os.listdir(webnotes.defs.pair_dir)) > 3:
delete_oldest_file(webnotes.defs.pair_dir)

cgi-bin/core/Module → f/Core/Core.txt Прегледај датотеку

@@ -0,0 +1,84 @@
[
{
'creation': '2011-02-12 10:07:59',
'disabled': 'No',
'docstatus': 0,
'doctype': 'Module Def',
'doctype_list': None,
'file_list': None,
'idx': None,
'is_hidden': 'Yes',
'last_updated_date': None,
'modified': '2011-02-12 10:07:59',
'modified_by': 'Administrator',
'module_desc': None,
'module_icon': None,
'module_label': 'Core',
'module_name': 'Core',
'module_page': None,
'module_seq': None,
'name': 'Core',
'owner': 'Administrator',
'parent': None,
'parentfield': None,
'parenttype': None,
'trash_reason': None,
'widget_code': None
},
{
'click_function': None,
'creation': '2011-02-12 10:07:59',
'description': None,
'display_name': None,
'doc_name': 'Pages',
'doc_type': 'Separator',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': None,
'modified': '2011-02-12 10:07:59',
'modified_by': 'Administrator',
'name': 'MDI00288',
'owner': 'Administrator',
'parent': 'Core',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2011-02-12 10:07:59',
'description': None,
'display_name': 'Manage Users',
'doc_name': 'Manage Users',
'doc_type': 'Pages',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': None,
'modified': '2011-02-12 10:07:59',
'modified_by': 'Administrator',
'name': 'MDI00289',
'owner': 'Administrator',
'parent': 'Core',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'creation': '2011-02-12 10:07:59',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 1,
'modified': '2011-02-12 10:07:59',
'modified_by': 'Administrator',
'name': 'MDR00076',
'owner': 'Administrator',
'parent': 'Core',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Administrator'
}
]

+ 17
- 0
cgi-bin/core/Role/Administrator/Administrator.txt Прегледај датотеку

@@ -0,0 +1,17 @@
[
{
'creation': '2010-08-08 17:08:51',
'docstatus': 0,
'doctype': 'Role',
'idx': 0,
'modified': '2011-06-03 10:08:30',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Administrator',
'owner': 'Administrator',
'parent': None,
'parentfield': None,
'parenttype': None,
'role_name': 'Administrator'
}
]

+ 17
- 0
cgi-bin/core/Role/All/All.txt Прегледај датотеку

@@ -0,0 +1,17 @@
[
{
'creation': '2010-08-08 17:08:51',
'docstatus': 0,
'doctype': 'Role',
'idx': None,
'modified': '2011-06-03 10:08:41',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'All',
'owner': 'Administrator',
'parent': None,
'parentfield': None,
'parenttype': None,
'role_name': 'All'
}
]

+ 47
- 0
cgi-bin/core/Role/Guest/Guest.txt Прегледај датотеку

@@ -0,0 +1,47 @@
[
{
'creation': '2010-08-08 17:08:51',
'docstatus': 0,
'doctype': 'Role',
'idx': None,
'modified': '2011-06-03 10:08:51',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Guest',
'owner': 'Administrator',
'parent': None,
'parentfield': None,
'parenttype': None,
'role_name': 'Guest'
},
{
'creation': '2010-08-08 17:08:51',
'defkey': 'hide_webnotes_toolbar',
'defvalue': '1',
'docstatus': 0,
'doctype': 'DefaultValue',
'idx': 1,
'modified': '2011-06-03 10:08:51',
'modified_by': 'Administrator',
'name': 'DEF000004',
'owner': 'Administrator',
'parent': 'Guest',
'parentfield': 'defaults',
'parenttype': 'Role'
},
{
'creation': '2010-08-08 17:08:51',
'defkey': 'hide_sidebars',
'defvalue': '1',
'docstatus': 0,
'doctype': 'DefaultValue',
'idx': 2,
'modified': '2011-06-03 10:08:51',
'modified_by': 'Administrator',
'name': 'DEF000005',
'owner': 'Administrator',
'parent': 'Guest',
'parentfield': 'defaults',
'parenttype': 'Role'
}
]

+ 0
- 0
cgi-bin/core/__init__.py Прегледај датотеку


+ 0
- 0
cgi-bin/core/doctype/__init__.py Прегледај датотеку


+ 0
- 0
cgi-bin/core/doctype/comment_widget_record/__init__.py Прегледај датотеку


+ 358
- 0
cgi-bin/core/doctype/comment_widget_record/comment_widget_record.txt Прегледај датотеку

@@ -0,0 +1,358 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'CWR/.#####',
'change_log': None,
'client_script': None,
'client_script_core': None,
'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': 0,
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2011-02-21 17:10:05',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Comment Widget Record',
'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': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': 10
},
{
'amend': None,
'cancel': None,
'create': 1,
'creation': '2010-08-08 17:08:55',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2010-08-08 17:08:55',
'modified_by': 'Administrator',
'name': '_PERM00118',
'owner': 'Administrator',
'parent': 'Comment Widget Record',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Administrator',
'submit': None,
'write': 1
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:55',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'comment',
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Comment',
'modified': '2011-04-05 09:58:09',
'modified_by': 'Administrator',
'name': '_FL00686',
'no_copy': None,
'oldfieldname': 'comment',
'oldfieldtype': 'Text',
'options': None,
'owner': 'Administrator',
'parent': 'Comment Widget Record',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:55',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'comment_by',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Comment By',
'modified': '2011-04-05 09:58:09',
'modified_by': 'Administrator',
'name': '_FL00687',
'no_copy': None,
'oldfieldname': 'comment_by',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Comment Widget Record',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:55',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'comment_by_fullname',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Comment By Fullname',
'modified': '2011-04-05 09:58:09',
'modified_by': 'Administrator',
'name': '_FL00688',
'no_copy': None,
'oldfieldname': 'comment_by_fullname',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Comment Widget Record',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:55',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'comment_date',
'fieldtype': 'Date',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Comment Date',
'modified': '2011-04-05 09:58:09',
'modified_by': 'Administrator',
'name': '_FL00689',
'no_copy': None,
'oldfieldname': 'comment_date',
'oldfieldtype': 'Date',
'options': None,
'owner': 'Administrator',
'parent': 'Comment Widget Record',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:55',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'comment_time',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 5,
'in_filter': None,
'label': 'Comment Time',
'modified': '2011-04-05 09:58:09',
'modified_by': 'Administrator',
'name': '_FL00690',
'no_copy': None,
'oldfieldname': 'comment_time',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Comment Widget Record',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:55',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'comment_doctype',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 6,
'in_filter': None,
'label': 'Comment Doctype',
'modified': '2011-04-05 09:58:09',
'modified_by': 'Administrator',
'name': '_FL00691',
'no_copy': None,
'oldfieldname': 'comment_doctype',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Comment Widget Record',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:55',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'comment_docname',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 7,
'in_filter': None,
'label': 'Comment Docname',
'modified': '2011-04-05 09:58:09',
'modified_by': 'Administrator',
'name': '_FL00692',
'no_copy': None,
'oldfieldname': 'comment_docname',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Comment Widget Record',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:55',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'post_topic',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 8,
'in_filter': None,
'label': 'Post Topic',
'modified': '2010-08-08 17:08:55',
'modified_by': 'Administrator',
'name': '_FL00693',
'no_copy': None,
'oldfieldname': 'post_topic',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Comment Widget Record',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/control_panel/__init__.py Прегледај датотеку


+ 36
- 0
cgi-bin/core/doctype/control_panel/control_panel.py Прегледај датотеку

@@ -0,0 +1,36 @@
# Please edit this list and import only required elements
import webnotes

from webnotes.utils import cint, flt
from webnotes.model.doc import Document
from webnotes.model.code import get_obj
from webnotes import session, form, is_testing, msgprint, errprint

sql = webnotes.conn.sql
get_value = webnotes.conn.get_value
# -----------------------------------------------------------------------------------------


class DocType:
def __init__(self, doc, doclist):
self.doc = doc
self.doclist = doclist

def on_update(self):
# clear cache on save
sql("delete from __SessionCache")

def upload_many(self,form):
pass

def upload_callback(self,form):
pass
def execute_test(self, arg=''):
if webnotes.user.name=='Guest':
raise Exception, 'Guest cannot call execute test!'
out = ''
exec(arg and arg or self.doc.test_code)
webnotes.msgprint('that worked!')
return out

+ 1933
- 0
cgi-bin/core/doctype/control_panel/control_panel.txt
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 0
- 0
cgi-bin/core/doctype/custom_field/__init__.py Прегледај датотеку


+ 54
- 0
cgi-bin/core/doctype/custom_field/custom_field.js Прегледај датотеку

@@ -0,0 +1,54 @@
//168
// Refresh
// --------
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(!doc.__islocal) get_field(doc.doctype, 'dt' , doc.name).permlevel = 1;
cur_frm.cscript.dt(doc, cdt, cdn);
}


cur_frm.cscript.has_special_chars = function(t) {
var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?";
for (var i = 0; i < t.length; i++) {
if (iChars.indexOf(t.charAt(i)) != -1) {
return true;
}
}
return false;
}


// Label
// ------
cur_frm.cscript.label = function(doc){
if(doc.label && cur_frm.cscript.has_special_chars(doc.label)){
cur_frm.fields_dict['Label Help'].disp_area.innerHTML = '<font color = "red">Special Characters are not allowed</font>';
doc.label = '';
refresh_field('label');
}
else
cur_frm.fields_dict['Label Help'].disp_area.innerHTML = '';
}


// Get Field Label based on DocType
// ---------------------------------
cur_frm.cscript.dt = function(doc, cdt, cdn) {
var callback = function(r, rt){
set_field_options('insert_after', r.message);
}
$c_obj([doc], 'get_fields_label', '', callback);
}


cur_frm.fields_dict['dt'].get_query = function(doc, dt, dn) {
return 'SELECT tabDocType.name FROM tabDocType WHERE IFNULL(tabDocType.issingle,0)=0 AND tabDocType.name LIKE "%s" ORDER BY name ASC LIMIT 50'
}


cur_frm.cscript.fieldtype = function(doc, dt, dn) {
if(doc.fieldtype == 'Link') cur_frm.fields_dict['Options Help'].disp_area.innerHTML = 'Please enter name of the document you want this field to be linked to in <b>Options</b>.<br> Eg.: Customer';
else if(doc.fieldtype == 'Select') cur_frm.fields_dict['Options Help'].disp_area.innerHTML = 'Please enter values in <b>Options</b> separated by enter. <br>Eg.: <b>Field:</b> Country <br><b>Options:</b><br>China<br>India<br>United States<br><br><b> OR </b><br>You can also link it to existing Documents.<br>Eg.: <b>link:</b>Customer';
else cur_frm.fields_dict['Options Help'].disp_area.innerHTML = '';
}

+ 100
- 0
cgi-bin/core/doctype/custom_field/custom_field.py Прегледај датотеку

@@ -0,0 +1,100 @@
# Please edit this list and import only required elements
import webnotes

from webnotes.utils import cint, cstr, flt, formatdate, now
from webnotes.model.doc import Document
from webnotes import msgprint, errprint

sql = webnotes.conn.sql
# -----------------------------------------------------------------------------------------


class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl

# Get Fields
# -----------
def get_fields_label(self):
label_name = []
for i in sql("SELECT idx, label FROM tabDocField WHERE parent = '%s' and ifnull(hidden,0) = 0 and fieldname != '%s' order by idx" % (self.doc.dt, cstr(self.doc.fieldname))): i[1] and i[0] and label_name.append(i[1]+' - '+cstr(i[0]))
return "\n".join(label_name)


# *************************** Validate *******************************
# Set Field name
# ----------------
def set_fieldname(self):
if not self.doc.fieldname:
# remove special characters from fieldname
self.doc.fieldname = filter(lambda x: x.isdigit() or x.isalpha() or '_', cstr(self.doc.label).lower().replace(' ','_'))


# Validate Field
# ---------------
def validate_field(self):
if self.doc.__islocal == 1 and sql("select name from tabDocField where parent = %s and (label = %s or fieldname = %s)" , (self.doc.dt, self.doc.label, self.doc.fieldname)):
msgprint("%s field already exists in Document : %s" % (self.doc.label, self.doc.dt))
raise Exception

if self.doc.fieldtype=='Link' and self.doc.options:
if not sql("select name from tabDocType where name=%s", self.doc.options):
msgprint("%s is not a valid Document" % self.doc.options)
raise Exception


# Update Field
# -------------
def update_field(self, df, new):
import webnotes.model
sql("update tabDocField set idx = idx + 1, modified = %s where parent = %s and idx > %s", (now(),self.doc.dt, self.idx))
for k in self.doc.fields:
if k not in webnotes.model.default_fields and k not in self.ignore_fields and not k.startswith('_'):
df.fields[k] = self.doc.fields[k]
df.parent = self.doc.dt
df.parenttype = 'DocType'
df.parentfield = 'fields'
df.idx = self.idx+1
df.save(new)


# Add Field
# ----------
def add_field(self):
field_exists = sql("select name from tabDocField where parent = %s and (label = %s or fieldname = %s)" , (self.doc.dt, self.doc.label, self.doc.fieldname))
field_exists = field_exists and field_exists[0][0] or ''
self.ignore_fields = ['dt','trash_reason','insert_after','index','customfield1','length']
if field_exists:
df = Document('DocField',field_exists)
self.update_field(df, new = 0)
else:
df = Document('DocField')
self.update_field(df, new = 1)

# Validate
# ---------
def validate(self):
self.set_fieldname()
self.validate_field()
self.idx = cint((self.doc.insert_after).split(' - ')[1])
self.add_field()
# update the schema
from webnotes.model.db_schema import updatedb
updatedb(self.doc.dt)

# Trash
# ------
def on_trash(self):
sql("update tabDocField set idx = idx - 1 where parent = %s and idx > %s" , (self.doc.dt, cint((self.doc.insert_after).split(' - ')[1])))
sql("delete from tabDocField where parent = %s and fieldname = %s", (self.doc.dt, self.doc.fieldname))


# Restore
# --------
def on_restore(self):
self.validate_field()
self.idx = cint((self.doc.insert_after).split(' - ')[1])
self.add_field()

+ 929
- 0
cgi-bin/core/doctype/custom_field/custom_field.txt Прегледај датотеку

@@ -0,0 +1,929 @@
[
{
'_last_update': '1305006253',
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': 1,
'autoname': "eval:doc.dt+'-'+doc.label",
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2010-10-13 16:39:01',
'description': 'Add a custom field to a DocType',
'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-05-18 11:07:49',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Custom Field',
'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': 'dt,label,fieldtype',
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'subject': '%(label)s (%(fieldtype)s) on %(dt)s',
'tag_fields': 'dt,fieldtype',
'use_template': None,
'version': 159
},
{
'amend': None,
'cancel': 1,
'create': 1,
'creation': '2010-10-13 16:39:01',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_PERM00695',
'owner': 'Administrator',
'parent': 'Custom Field',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Administrator',
'submit': None,
'write': 1
},
{
'amend': None,
'cancel': None,
'create': None,
'creation': '2010-10-13 16:39:01',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 2,
'match': None,
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_PERM00696',
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 1,
'read': 1,
'role': 'Administrator',
'submit': None,
'write': None
},
{
'amend': None,
'cancel': None,
'create': None,
'creation': '2010-10-13 16:39:01',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 3,
'match': None,
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_PERM00697',
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 2,
'read': 1,
'role': 'Administrator',
'submit': None,
'write': None
},
{
'amend': None,
'cancel': 1,
'create': 1,
'creation': '2010-10-13 16:39:01',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 4,
'match': None,
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_PERM00698',
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'System Manager',
'submit': None,
'write': 1
},
{
'amend': None,
'cancel': None,
'create': None,
'creation': '2010-10-13 16:39:01',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 5,
'match': None,
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_PERM00699',
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 1,
'read': 1,
'role': 'System Manager',
'submit': None,
'write': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Details',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03961',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Column Break',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '50%'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'trash_reason',
'fieldtype': 'Small Text',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Trash Reason',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03962',
'no_column': None,
'no_copy': None,
'oldfieldname': 'trash_reason',
'oldfieldtype': 'Small Text',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 1,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'dt',
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': 1,
'label': 'Document',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03963',
'no_column': None,
'no_copy': None,
'oldfieldname': 'dt',
'oldfieldtype': 'Link',
'options': 'DocType',
'owner': 'Administrator',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': 1,
'trigger': 'Client',
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'label',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': 1,
'label': 'Label',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03964',
'no_column': None,
'no_copy': 1,
'oldfieldname': 'label',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-14 09:28:31',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'HTML',
'hidden': None,
'icon': None,
'idx': 5,
'in_filter': None,
'label': 'Label Help',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03981',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'HTML',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'fieldtype',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 6,
'in_filter': 1,
'label': 'Field Type',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03965',
'no_column': None,
'no_copy': None,
'oldfieldname': 'fieldtype',
'oldfieldtype': 'Select',
'options': '\nButton\nCheck\nColumn Break\nCurrency\nData\nDate\nFloat\nHTML\nInt\nLink\nRead Only\nSection Break\nSelect\nSmall Text\nText\nText Editor\nTime',
'owner': 'Administrator',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': 0,
'trigger': 'Client',
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'HTML',
'hidden': None,
'icon': None,
'idx': 7,
'in_filter': None,
'label': 'Options Help',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03966',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'HTML',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'options',
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 8,
'in_filter': None,
'label': 'Options',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03967',
'no_column': None,
'no_copy': None,
'oldfieldname': 'options',
'oldfieldtype': 'Text',
'options': None,
'owner': 'Administrator',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 9,
'in_filter': None,
'label': 'Field Description',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03968',
'no_column': None,
'no_copy': None,
'oldfieldname': 'description',
'oldfieldtype': 'Text',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '300px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 10,
'in_filter': None,
'label': 'Properties',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03969',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Column Break',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '50%'
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': 'Select the label after which you want to insert new field.',
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'insert_after',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 11,
'in_filter': None,
'label': 'Insert After',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03970',
'no_column': None,
'no_copy': None,
'oldfieldname': 'insert_after',
'oldfieldtype': 'Select',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': 'Client',
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'default',
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 12,
'in_filter': None,
'label': 'Default Value',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03971',
'no_column': None,
'no_copy': None,
'oldfieldname': 'default',
'oldfieldtype': 'Text',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'fieldname',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 13,
'in_filter': None,
'label': 'Fieldname',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03972',
'no_column': None,
'no_copy': 1,
'oldfieldname': 'fieldname',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 2,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'width',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 14,
'in_filter': None,
'label': 'Width',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03973',
'no_column': None,
'no_copy': None,
'oldfieldname': 'width',
'oldfieldtype': 'Data',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'reqd',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 15,
'in_filter': None,
'label': 'Is Mandatory Field',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03974',
'no_column': None,
'no_copy': None,
'oldfieldname': 'reqd',
'oldfieldtype': 'Check',
'options': None,
'owner': 'Administrator',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'in_filter',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 16,
'in_filter': None,
'label': 'In Report Filter',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03975',
'no_column': None,
'no_copy': None,
'oldfieldname': 'in_filter',
'oldfieldtype': 'Check',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'no_copy',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 17,
'in_filter': None,
'label': 'No Copy',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03976',
'no_column': None,
'no_copy': None,
'oldfieldname': 'no_copy',
'oldfieldtype': 'Check',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'print_hide',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 18,
'in_filter': None,
'label': 'Print Hide',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03977',
'no_column': None,
'no_copy': None,
'oldfieldname': 'print_hide',
'oldfieldtype': 'Check',
'options': None,
'owner': 'Administrator',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'report_hide',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 19,
'in_filter': None,
'label': 'Report Hide',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03978',
'no_column': None,
'no_copy': None,
'oldfieldname': 'report_hide',
'oldfieldtype': 'Check',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'allow_on_submit',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 20,
'in_filter': None,
'label': 'Allow on Submit',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03979',
'no_column': None,
'no_copy': None,
'oldfieldname': 'allow_on_submit',
'oldfieldtype': 'Check',
'options': None,
'owner': 'saumil@webnotestech.com',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-13 16:39:01',
'default': '0',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'permlevel',
'fieldtype': 'Int',
'hidden': None,
'icon': None,
'idx': 21,
'in_filter': None,
'label': 'Permission Level',
'modified': '2011-05-18 11:07:49',
'modified_by': 'Administrator',
'name': '_FL03980',
'no_column': None,
'no_copy': None,
'oldfieldname': 'permlevel',
'oldfieldtype': 'Int',
'options': None,
'owner': 'Administrator',
'parent': 'Custom Field',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/custom_script/__init__.py Прегледај датотеку


+ 189
- 0
cgi-bin/core/doctype/custom_script/custom_script.txt Прегледај датотеку

@@ -0,0 +1,189 @@
[
{
'_last_update': '1305701384',
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': "eval:doc.dt + '-' + doc.script_type",
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2010-08-08 17:08:56',
'description': 'Add a custom script (client or server) to a DocType',
'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-05-18 12:19:44',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Custom Script',
'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': ' ',
'show_in_menu': 0,
'smallicon': None,
'subject': ' ',
'tag_fields': 'dt,script_type',
'use_template': None,
'version': 8
},
{
'amend': None,
'cancel': 1,
'create': 1,
'creation': '2010-08-08 17:08:56',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2011-05-18 12:19:44',
'modified_by': 'Administrator',
'name': '_PERM00149',
'owner': 'Administrator',
'parent': 'Custom Script',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'System Manager',
'submit': None,
'write': 1
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:56',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'dt',
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': 1,
'label': 'DocType',
'modified': '2011-05-18 12:19:44',
'modified_by': 'Administrator',
'name': '_FL00824',
'no_column': None,
'no_copy': None,
'oldfieldname': 'dt',
'oldfieldtype': 'Link',
'options': 'DocType',
'owner': 'Administrator',
'parent': 'Custom Script',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:56',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'script_type',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': 1,
'label': 'Script Type',
'modified': '2011-05-18 12:19:44',
'modified_by': 'Administrator',
'name': '_FL00825',
'no_column': None,
'no_copy': None,
'oldfieldname': 'script_type',
'oldfieldtype': 'Select',
'options': 'Server\nClient',
'owner': 'Administrator',
'parent': 'Custom Script',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:56',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'script',
'fieldtype': 'Code',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Script',
'modified': '2011-05-18 12:19:44',
'modified_by': 'Administrator',
'name': '_FL00826',
'no_column': None,
'no_copy': None,
'oldfieldname': 'script',
'oldfieldtype': 'Code',
'options': 'Script',
'owner': 'Administrator',
'parent': 'Custom Script',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/default_home_page/__init__.py Прегледај датотеку


+ 125
- 0
cgi-bin/core/doctype/default_home_page/default_home_page.txt Прегледај датотеку

@@ -0,0 +1,125 @@
[
{
'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': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-10-28 11:12:48',
'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': None,
'istable': 1,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Default Home Page',
'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,
'use_template': None,
'version': 2
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-10-28 11:12:48',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'role',
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Role',
'modified': '2009-10-28 11:22:02',
'modified_by': 'Administrator',
'name': '_FL00354',
'no_copy': None,
'oldfieldname': 'role',
'oldfieldtype': 'Link',
'options': 'Role',
'owner': 'Administrator',
'parent': 'Default Home Page',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-10-28 11:12:48',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'home_page',
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Home Page',
'modified': '2009-10-28 11:22:02',
'modified_by': 'Administrator',
'name': '_FL00355',
'no_copy': None,
'oldfieldname': 'home_page',
'oldfieldtype': 'Link',
'options': 'Page',
'owner': 'Administrator',
'parent': 'Default Home Page',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/defaultvalue/__init__.py Прегледај датотеку


+ 125
- 0
cgi-bin/core/doctype/defaultvalue/defaultvalue.txt Прегледај датотеку

@@ -0,0 +1,125 @@
[
{
'allow_attach': None,
'allow_copy': 0,
'allow_email': 0,
'allow_print': 0,
'allow_rename': None,
'allow_trash': None,
'autoname': 'DEF.######',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:11',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': 0,
'hide_toolbar': 0,
'idx': 0,
'in_create': None,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': 0,
'istable': 1,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'DefaultValue',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': 0,
'read_only_onload': None,
'search_fields': None,
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': None
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:11',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'defkey',
'fieldtype': 'Data',
'hidden': 0,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Key',
'modified': '2009-05-12 11:19:11',
'modified_by': 'Administrator',
'name': '_FL00030',
'no_copy': None,
'oldfieldname': 'defkey',
'oldfieldtype': 'Data',
'options': '',
'owner': 'Administrator',
'parent': 'DefaultValue',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': 0,
'trigger': '',
'width': '200px'
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:11',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'defvalue',
'fieldtype': 'Text',
'hidden': 0,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Value',
'modified': '2009-05-12 11:19:11',
'modified_by': 'Administrator',
'name': '_FL00031',
'no_copy': None,
'oldfieldname': 'defvalue',
'oldfieldtype': 'Text',
'options': '',
'owner': 'Administrator',
'parent': 'DefaultValue',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': '200px'
}
]

+ 0
- 0
cgi-bin/core/doctype/docfield/__init__.py Прегледај датотеку


+ 907
- 0
cgi-bin/core/doctype/docfield/docfield.txt Прегледај датотеку

@@ -0,0 +1,907 @@
[
{
'_last_update': '1304505340',
'allow_attach': None,
'allow_copy': 0,
'allow_email': 0,
'allow_print': 0,
'allow_rename': None,
'allow_trash': None,
'autoname': 'FL.#####',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:11',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': 0,
'hide_toolbar': 0,
'idx': 0,
'in_create': None,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': 0,
'istable': 1,
'max_attachments': None,
'menu_index': None,
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'DocField',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': 0,
'read_only_onload': None,
'search_fields': None,
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': 4
},
{
'amend': None,
'cancel': 0,
'create': 0,
'creation': '2009-05-12 11:19:22',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': 0,
'idx': 1,
'match': None,
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_PERM00003',
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 0,
'role': 'Administrator',
'submit': 0,
'write': 0
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:11',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'label',
'fieldtype': 'Data',
'hidden': 0,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Label',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00032',
'no_column': None,
'no_copy': None,
'oldfieldname': 'label',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:11',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'fieldtype',
'fieldtype': 'Select',
'hidden': 0,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Type',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00033',
'no_column': None,
'no_copy': None,
'oldfieldname': 'fieldtype',
'oldfieldtype': 'Select',
'options': 'Data\nSelect\nText\nSmall Text\nText Editor\nLink\nInt\nDate\nTime\nCurrency\nTable\nFloat\nCheck\nSection Break\nColumn Break\nButton\nRead Only\nCode\nHTML\nImage\nBlob\nPassword',
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:11',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'fieldname',
'fieldtype': 'Data',
'hidden': 0,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Name',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00034',
'no_column': None,
'no_copy': None,
'oldfieldname': 'fieldname',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:11',
'default': None,
'depends_on': None,
'description': 'For Links, enter the DocType as range\nFor Select, enter list of Options separated by comma',
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'options',
'fieldtype': 'Text',
'hidden': 0,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Options',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00035',
'no_column': None,
'no_copy': None,
'oldfieldname': 'options',
'oldfieldtype': 'Text',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:11',
'default': '0',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'permlevel',
'fieldtype': 'Int',
'hidden': 0,
'icon': None,
'idx': 5,
'in_filter': None,
'label': 'Perm Level',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00036',
'no_column': None,
'no_copy': None,
'oldfieldname': 'permlevel',
'oldfieldtype': 'Int',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:11',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'width',
'fieldtype': 'Data',
'hidden': 0,
'icon': None,
'idx': 6,
'in_filter': None,
'label': 'Width',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00037',
'no_column': None,
'no_copy': None,
'oldfieldname': 'width',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': '50px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:11',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'reqd',
'fieldtype': 'Check',
'hidden': 0,
'icon': None,
'idx': 7,
'in_filter': None,
'label': 'Reqd',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00038',
'no_column': None,
'no_copy': None,
'oldfieldname': 'reqd',
'oldfieldtype': 'Check',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': '50px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:11',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'search_index',
'fieldtype': 'Check',
'hidden': 0,
'icon': None,
'idx': 8,
'in_filter': None,
'label': 'Index',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00039',
'no_column': None,
'no_copy': None,
'oldfieldname': 'search_index',
'oldfieldtype': 'Check',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': '50px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-01-20 11:09:13',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'in_filter',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 9,
'in_filter': None,
'label': 'In Filter',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00390',
'no_column': None,
'no_copy': None,
'oldfieldname': 'in_filter',
'oldfieldtype': 'Check',
'options': None,
'owner': 'nabin@webnotestech.com',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '50px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:11',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'hidden',
'fieldtype': 'Check',
'hidden': 0,
'icon': None,
'idx': 10,
'in_filter': None,
'label': 'Hidden',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00040',
'no_column': None,
'no_copy': None,
'oldfieldname': 'hidden',
'oldfieldtype': 'Check',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': '50px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-05 14:00:58',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'no_column',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 11,
'in_filter': None,
'label': 'No Column',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '000000705',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:11',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'print_hide',
'fieldtype': 'Check',
'hidden': 0,
'icon': None,
'idx': 12,
'in_filter': None,
'label': 'Print Hide',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00041',
'no_column': None,
'no_copy': None,
'oldfieldname': 'print_hide',
'oldfieldtype': 'Check',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:11',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'no_copy',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 13,
'in_filter': None,
'label': 'No Copy',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00042',
'no_column': None,
'no_copy': None,
'oldfieldname': 'no_copy',
'oldfieldtype': 'Check',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '50px'
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'report_hide',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 14,
'in_filter': None,
'label': 'Report Hide',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00043',
'no_column': None,
'no_copy': None,
'oldfieldname': 'report_hide',
'oldfieldtype': 'Check',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'allow_on_submit',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 15,
'in_filter': None,
'label': 'Allow on Submit',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00044',
'no_column': None,
'no_copy': None,
'oldfieldname': 'allow_on_submit',
'oldfieldtype': 'Check',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'depends_on',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 16,
'in_filter': None,
'label': 'Depends On',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00045',
'no_column': None,
'no_copy': None,
'oldfieldname': 'depends_on',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 17,
'in_filter': None,
'label': 'Description',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00046',
'no_column': None,
'no_copy': None,
'oldfieldname': 'description',
'oldfieldtype': 'Text',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '300px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'trigger',
'fieldtype': 'Select',
'hidden': 0,
'icon': None,
'idx': 18,
'in_filter': None,
'label': 'Trigger',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00047',
'no_column': None,
'no_copy': None,
'oldfieldname': 'trigger',
'oldfieldtype': 'Select',
'options': '\nClient\nServer',
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'default',
'fieldtype': 'Text',
'hidden': 0,
'icon': None,
'idx': 19,
'in_filter': None,
'label': 'Default',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00048',
'no_column': None,
'no_copy': None,
'oldfieldname': 'default',
'oldfieldtype': 'Text',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'colour',
'fieldtype': 'Select',
'hidden': 0,
'icon': None,
'idx': 20,
'in_filter': None,
'label': 'Colour',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00049',
'no_column': None,
'no_copy': None,
'oldfieldname': 'colour',
'oldfieldtype': 'Select',
'options': 'White:FFF\nLight Blue:DEF\nLight Green:DFE\nPeach:FEF3C5\nPink:FEF2EA\nLilac:FDEAFE\nAqua:EAFEFA',
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'icon',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 21,
'in_filter': None,
'label': 'Icon',
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00050',
'no_column': None,
'no_copy': None,
'oldfieldname': 'icon',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'oldfieldname',
'fieldtype': 'Data',
'hidden': 1,
'icon': None,
'idx': 22,
'in_filter': None,
'label': None,
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00051',
'no_column': None,
'no_copy': None,
'oldfieldname': 'oldfieldname',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'oldfieldtype',
'fieldtype': 'Data',
'hidden': 1,
'icon': None,
'idx': 23,
'in_filter': None,
'label': None,
'modified': '2011-05-05 14:00:58',
'modified_by': 'Administrator',
'name': '_FL00052',
'no_column': None,
'no_copy': None,
'oldfieldname': 'oldfieldtype',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'DocField',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/docformat/__init__.py Прегледај датотеку


+ 90
- 0
cgi-bin/core/doctype/docformat/docformat.txt Прегледај датотеку

@@ -0,0 +1,90 @@
[
{
'allow_attach': None,
'allow_copy': 0,
'allow_email': 0,
'allow_print': 0,
'allow_rename': None,
'allow_trash': None,
'autoname': 'DF.######',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:11',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': 0,
'hide_toolbar': 0,
'idx': 0,
'in_create': None,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': 0,
'istable': 1,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'DocFormat',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': 0,
'read_only_onload': None,
'search_fields': None,
'section_style': None,
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': None,
'smallicon': None,
'use_template': None,
'version': None
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:12',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'format',
'fieldtype': 'Link',
'hidden': 0,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Format',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00054',
'no_copy': None,
'oldfieldname': 'format',
'oldfieldtype': 'Link',
'options': 'Print Format',
'owner': 'Administrator',
'parent': 'DocFormat',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': ''
}
]

+ 0
- 0
cgi-bin/core/doctype/docperm/__init__.py Прегледај датотеку


+ 405
- 0
cgi-bin/core/doctype/docperm/docperm.txt Прегледај датотеку

@@ -0,0 +1,405 @@
[
{
'allow_attach': None,
'allow_copy': 0,
'allow_email': 0,
'allow_print': 0,
'allow_rename': None,
'allow_trash': None,
'autoname': 'PERM.#####',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:11',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': 0,
'hide_toolbar': 0,
'idx': 0,
'in_create': None,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': 0,
'istable': 1,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'DocPerm',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': 0,
'read_only_onload': None,
'search_fields': None,
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': None
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:12',
'default': '0',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'permlevel',
'fieldtype': 'Int',
'hidden': 0,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Level',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00055',
'no_copy': None,
'oldfieldname': 'permlevel',
'oldfieldtype': 'Int',
'options': '',
'owner': 'Administrator',
'parent': 'DocPerm',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': '40px'
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:12',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'role',
'fieldtype': 'Link',
'hidden': 0,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Role',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00056',
'no_copy': None,
'oldfieldname': 'role',
'oldfieldtype': 'Link',
'options': 'Role',
'owner': 'Administrator',
'parent': 'DocPerm',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': '150px'
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:12',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'read',
'fieldtype': 'Check',
'hidden': 0,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Read',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00057',
'no_copy': None,
'oldfieldname': 'read',
'oldfieldtype': 'Check',
'options': '',
'owner': 'Administrator',
'parent': 'DocPerm',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': '32px'
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:12',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'write',
'fieldtype': 'Check',
'hidden': 0,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Write',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00058',
'no_copy': None,
'oldfieldname': 'write',
'oldfieldtype': 'Check',
'options': '',
'owner': 'Administrator',
'parent': 'DocPerm',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': '32px'
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:12',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'create',
'fieldtype': 'Check',
'hidden': 0,
'icon': None,
'idx': 5,
'in_filter': None,
'label': 'Create',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00059',
'no_copy': None,
'oldfieldname': 'create',
'oldfieldtype': 'Check',
'options': '',
'owner': 'Administrator',
'parent': 'DocPerm',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': '32px'
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:12',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'submit',
'fieldtype': 'Check',
'hidden': 0,
'icon': None,
'idx': 6,
'in_filter': None,
'label': 'Submit',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00060',
'no_copy': None,
'oldfieldname': 'submit',
'oldfieldtype': 'Check',
'options': '',
'owner': 'Administrator',
'parent': 'DocPerm',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': '32px'
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:12',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'cancel',
'fieldtype': 'Check',
'hidden': 0,
'icon': None,
'idx': 7,
'in_filter': None,
'label': 'Cancel',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00061',
'no_copy': None,
'oldfieldname': 'cancel',
'oldfieldtype': 'Check',
'options': '',
'owner': 'Administrator',
'parent': 'DocPerm',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': '32px'
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:12',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'execute',
'fieldtype': 'Check',
'hidden': 0,
'icon': None,
'idx': 8,
'in_filter': None,
'label': 'Execute',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00062',
'no_copy': None,
'oldfieldname': 'execute',
'oldfieldtype': 'Check',
'options': '',
'owner': 'Administrator',
'parent': 'DocPerm',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': '32px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'amend',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 9,
'in_filter': None,
'label': 'Amend',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00063',
'no_copy': None,
'oldfieldname': 'amend',
'oldfieldtype': 'Check',
'options': None,
'owner': 'Administrator',
'parent': 'DocPerm',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:12',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'match',
'fieldtype': 'Data',
'hidden': 0,
'icon': None,
'idx': 10,
'in_filter': None,
'label': 'Match',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00064',
'no_copy': None,
'oldfieldname': 'match',
'oldfieldtype': 'Data',
'options': '',
'owner': 'Administrator',
'parent': 'DocPerm',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': ''
}
]

+ 0
- 0
cgi-bin/core/doctype/doctrigger/__init__.py Прегледај датотеку


+ 196
- 0
cgi-bin/core/doctype/doctrigger/doctrigger.txt Прегледај датотеку

@@ -0,0 +1,196 @@
[
{
'_last_update': None,
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': '_TRIGGER.######',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2011-05-09 11:04:24',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': None,
'hide_toolbar': None,
'idx': None,
'in_create': 1,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': None,
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2011-03-31 15:23:46',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'DocTrigger',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': 1,
'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,
'use_template': None,
'version': 2
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 11:04:24',
'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-05-09 11:04:24',
'modified_by': 'Administrator',
'name': '000000396',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'DocTrigger',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': 0,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 11:04: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-05-09 11:04:24',
'modified_by': 'Administrator',
'name': '000000397',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'DocTrigger',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 11:04:24',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'event_name',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Event Name',
'modified': '2011-05-09 11:04:24',
'modified_by': 'Administrator',
'name': '000000398',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'DocTrigger',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 11:04:24',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'method',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Method',
'modified': '2011-05-09 11:04:24',
'modified_by': 'Administrator',
'name': '000000399',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'DocTrigger',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/doctype/__init__.py Прегледај датотеку


+ 75
- 0
cgi-bin/core/doctype/doctype/doctype.js Прегледај датотеку

@@ -0,0 +1,75 @@
// -------------
// Menu Display
// -------------

cur_frm.cscript.issingle = function(doc, cdt, cdn) {
if(doc.issingle)
unhide_field('show_in_menu');
else {
doc.show_in_menu = 0;
hide_field('show_in_menu');
hide_field('parent_node');
hide_field('Parent HTML');
hide_field('Menu HTML');
hide_field('menu_index');
hide_field('smallicon');
}
}

cur_frm.cscript.show_in_menu = function(doc, cdt, cdn) {
if(doc.show_in_menu) {
unhide_field('parent_node');
unhide_field('Parent HTML');
unhide_field('Menu HTML');
unhide_field('menu_index');
unhide_field('smallicon');
} else {
hide_field('parent_node');
hide_field('Parent HTML');
hide_field('Menu HTML');
hide_field('menu_index');
hide_field('smallicon');
}
}

// Attachment

cur_frm.cscript.allow_attach = function(doc, cdt, cdn) {
if(doc.allow_attach) {
unhide_field('max_attachments');
} else {
hide_field('max_attachments');
}
}

cur_frm.cscript.onload = function(doc, cdt, cdn) {
this.issingle(doc, cdt, cdn);
this.allow_attach(doc, cdt, cdn);
this.show_in_menu(doc, cdt, cdn);
}

cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(in_list(user_roles, 'System Manager') && !in_list(user_roles, 'Administrator')) {
// make the document read-only
cur_frm.perm = [[1,0,0]]
// make help heading
cur_frm.tip_wrapper.innerHTML = '';
$a(cur_frm.tip_wrapper, 'div', 'help_box','','<b>Cannot Edit DocType directly</b>: To edit DocType properties, create / update <a href="#!List/Custom%20Field">Custom Field</a>, <a href="#!List/Custom%20Script">Custom Script</a> and <a href="#!List/Property%20Setter">Property Setter</a>')
}


// show button for import
cur_frm.add_custom_button('Import from File', cur_frm.cscript.do_import);
}

cur_frm.cscript.validate = function(doc, cdt, cdn) {
doc.server_code_compiled = null;
}

cur_frm.cscript.do_import = function(doc, cdt, cdn) {
callback = function(r,rt) {
cur_frm.refresh_doc();
}
$c_obj([doc], 'import_doctype', '', callback)
}

+ 94
- 0
cgi-bin/core/doctype/doctype/doctype.py Прегледај датотеку

@@ -0,0 +1,94 @@
# Please edit this list and import only required elements
import webnotes

from webnotes.utils import now, cint
sql = webnotes.conn.sql
msgprint = webnotes.msgprint


# -----------------------------------------------------------------------------------------


class DocType:
def __init__(self, doc=None, doclist=[]):
self.doc = doc
self.doclist = doclist

def change_modified_of_parent(self):
parent_list = sql('SELECT parent from tabDocField where fieldtype="Table" and options="%s"' % self.doc.name)
for p in parent_list:
sql('UPDATE tabDocType SET modified="%s" WHERE `name`="%s"' % (now(), p[0]))

def scrub_field_names(self):
restricted = ('name','parent','idx','owner','creation','modified','modified_by','parentfield','parenttype')
for d in self.doclist:
if d.parent and d.fieldtype:
if (not d.fieldname) and (d.fieldtype.lower() in ('data', 'select', 'int', 'float', 'currency', 'table', 'text', 'link', 'date', 'code', 'check', 'read only', 'small_text', 'time')):
d.fieldname = d.label.strip().lower().replace(' ','_')
if d.fieldname in restricted:
d.fieldname = d.fieldname + '1'
def set_version(self):
self.doc.version = cint(self.doc.version) + 1
#
# check if this series is not used elsewhere
#
def validate_series(self, autoname=None, name=None):
if not autoname: autoname = self.doc.autoname
if not name: name = self.doc.name
if autoname and (not autoname.startswith('field:')) and (not autoname.startswith('eval:')) and (not autoname=='Prompt'):
prefix = autoname.split('.')[0]
used_in = sql('select name from tabDocType where substring_index(autoname, ".", 1) = %s and name!=%s', (prefix, name))
if used_in:
msgprint('<b>Series already in use:</b> The series "%s" is already used in "%s"' % (prefix, used_in[0][0]), raise_exception=1)

#
# field validations
#
def validate_fields(self):
"validates fields for incorrect properties and double entries"
fieldnames = {}
for d in self.doclist:
if d.parent and d.fieldtype and d.parent == self.doc.name:
# check if not double
if d.fieldname:
if fieldnames.get(d.fieldname):
webnotes.msgprint('Fieldname <b>%s</b> appears twice (rows %s and %s). Please rectify' \
% (d.fieldname, str(d.idx + 1), str(fieldnames[d.fieldname] + 1)), raise_exception=1)
fieldnames[d.fieldname] = d.idx
# check illegal mandatory
if d.fieldtype in ('HTML', 'Button', 'Section Break', 'Column Break') and d.reqd:
webnotes.msgprint('%(lable)s [%(fieldtype)s] cannot be mandatory', raise_exception=1)
# validate if allow attach, then file_list must be present
if self.doc.allow_attach and not fieldnames.get('file_list'):
webnotes.msgprint('To allow attachments, a field with fieldname "file_list" of type text must be present', raise_exception = 1)
def validate(self):
self.validate_series()
self.scrub_field_names()
self.validate_fields()
self.set_version()

def on_update(self):
# make schma changes
from webnotes.model.db_schema import updatedb
updatedb(self.doc.name)

self.change_modified_of_parent()
import webnotes.defs
if hasattr(webnotes.defs, 'developer_mode') and webnotes.defs.developer_mode:
self.export_doc()
sql("delete from __DocTypeCache")
def export_doc(self):
from webnotes.modules.export_module import export_to_files
export_to_files(record_list=[['DocType', self.doc.name]])
def import_doc(self):
from webnotes.modules.import_module import import_from_files
import_from_files(record_list=[[self.doc.module, 'doctype', self.doc.name]])

+ 1796
- 0
cgi-bin/core/doctype/doctype/doctype.txt
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 0
- 0
cgi-bin/core/doctype/doctype_label/__init__.py Прегледај датотеку


+ 148
- 0
cgi-bin/core/doctype/doctype_label/doctype_label.txt Прегледај датотеку

@@ -0,0 +1,148 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'field:dt',
'change_log': None,
'client_script': None,
'client_script_core': '',
'client_string': None,
'colour': 'White:FFF',
'creation': '2010-11-30 17:30:00',
'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': None,
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'DocType Label',
'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,
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': '',
'server_code_error': ' ',
'show_in_menu': None,
'smallicon': None,
'use_template': None,
'version': 2
},
{
'amend': None,
'cancel': None,
'create': 1,
'creation': '2010-11-30 17:30:00',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2010-11-30 17:30:00',
'modified_by': 'Administrator',
'name': '_PERM00045',
'owner': 'Administrator',
'parent': 'DocType Label',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Administrator',
'submit': None,
'write': 1
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:00',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'dt',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Select DocType',
'modified': '2010-11-30 17:30:00',
'modified_by': 'Administrator',
'name': '_FL00494',
'no_copy': None,
'oldfieldname': 'dt',
'oldfieldtype': 'Select',
'options': 'link:DocType',
'owner': 'Administrator',
'parent': 'DocType Label',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:00',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'dt_label',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'DocType Label',
'modified': '2010-11-30 17:30:00',
'modified_by': 'Administrator',
'name': '_FL00495',
'no_copy': None,
'oldfieldname': 'dt_label',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'DocType Label',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/doctype_mapper/__init__.py Прегледај датотеку


+ 9
- 0
cgi-bin/core/doctype/doctype_mapper/doctype_mapper.js Прегледај датотеку

@@ -0,0 +1,9 @@
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(doc.from_doctype) {
get_field(doc.doctype, 'from_doctype', doc.name).permlevel = 1;
refresh_field('from_doctype');

get_field(doc.doctype, 'to_doctype', doc.name).permlevel = 1;
refresh_field('to_doctype');
}
}

+ 247
- 0
cgi-bin/core/doctype/doctype_mapper/doctype_mapper.py Прегледај датотеку

@@ -0,0 +1,247 @@
# Please edit this list and import only required elements
import webnotes

from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
from webnotes.model import db_exists
from webnotes.model.doc import Document, addchild, removechild, getchildren, make_autoname, SuperDocType
from webnotes.model.doclist import getlist, copy_doclist
from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
from webnotes import session, form, is_testing, msgprint, errprint

set = webnotes.conn.set
sql = webnotes.conn.sql
get_value = webnotes.conn.get_value
in_transaction = webnotes.conn.in_transaction
convert_to_lists = webnotes.conn.convert_to_lists
# -----------------------------------------------------------------------------------------


class DocType:
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclist
self.prefix = is_testing and 'test' or 'tab'
self.ref_doc = ''
# Autoname
#---------
def autoname(self):
self.doc.name = make_autoname(self.doc.from_doctype + '-' + self.doc.to_doctype)

# Map Custom Fields
# ------------------
def map_custom_fields(self, from_doctype, to_doctype, from_doc, to_doc):
fld_list = []
for d in sql("select fieldname from `tabCustom Field` where dt = %s and docstatus != 2",from_doctype):
if sql("select fieldname from `tabCustom Field` where dt = %s and fieldname = %s and docstatus != 2",(to_doctype, d[0])):
fld_list.append([d[0], d[0]])
self.set_value(fld_list, from_doc, to_doc)

# Maps the fields in 'To DocType'
#--------------------------------
def dt_map(self, from_doctype, to_doctype, from_docname, to_doc, doclist, from_to_list = '[]'):

# definition of arguments
'''
String <from_doctype> : contains the name of DocType initiating the function
String <to_doctype> : contains the name of DocType created by the function
String <from_docname> : contains ID(name) of 'from_doctype'
String <to_doc> : contains doc of 'to_doctype'
String <doclist> : contains doclist of 'to_doctype'
String <from_to_list> : contains list of tables which will be mapped
'''
# Validate reference doc docstatus
self.ref_doc = from_docname
self.check_ref_docstatus()
if not doclist:
doclist.append(to_doc)

tbl_list = sql("select from_table, to_table, from_field, to_field, match_id, validation_logic from `tabTable Mapper Detail` where parent ='%s' order by match_id" % (from_doctype + "-" + to_doctype))

for t in tbl_list:
from_table_name = t[0]
to_table_name = t[1]
from_table_fname = t[2]
to_table_fname = t[3]
match_id = t[4]
validation_logic = t[5]

from_to = [from_table_name, to_table_name]

if from_to in eval(from_to_list):
fld_list = sql("select from_field, to_field from `tabField Mapper Detail` where parent = '%s' and match_id = %s and map = 'Yes'" % (from_doctype + "-" + to_doctype, match_id))
if fld_list:
if not from_docname:
msgprint(from_doctype + " not selected for mapping")
raise Exception
# Parent to parent mapping
if from_table_name == self.doc.from_doctype and to_table_name == self.doc.to_doctype:
# Check validation
nm = sql("select name from `tab%s` where name = '%s' and %s" % (from_doctype, from_docname, validation_logic))
nm = nm and nm[0][0] or ''
# If validation failed raise exception
if not nm:
msgprint("Validation failed in doctype mapper. Please contact Administrator.")
raise Exception
from_doc = Document(from_doctype, nm)
# Maps field in parent
self.set_value(fld_list, from_doc, to_doc)
# Map custom fields
self.map_custom_fields(from_doctype, to_doctype, from_doc, to_doc)

# Parent to child OR child to child mapping
else:
dnlist = ()
if from_table_name == self.doc.from_doctype:
dnlist = ((from_docname,),)
else:
dnlist = sql("select name from `tab%s` where parent='%s' and parenttype = '%s' and %s order by idx" % (from_table_name, from_docname, self.doc.from_doctype, validation_logic))
for dn in dnlist:
# Add a row in target table in 'To DocType' and returns obj
ch = addchild(to_doc, t[3], t[1], 1, doclist)
# Creates object for 'From DocType', it can be parent or child
d = Document(t[0], dn[0])
# Map values
self.set_value(fld_list, d, ch)
# Map custom fields
self.map_custom_fields(from_table_name, t[1], d, ch)

# Required when called from server side for refreshing table
return doclist
# Assigns value to "To Doctype"
#------------------------------
def set_value(self, fld_list, obj, to_doc):
for f in fld_list:
if f[0].startswith('eval:'):
to_doc.fields[f[1]] = eval(f[0][5:])
else:
to_doc.fields[f[1]] = obj.fields.get(f[0])
# Validate
#---------
def validate(self):
for d in getlist(self.doclist, 'field_mapper_details'):
# Automatically assigns default value if not entered
if not d.match_id:
d.match_id = 0
if not d.map:
d.map = 'Yes'
for d in getlist(self.doclist, 'table_mapper_details'):
if not d.reference_doctype_key:
d.reference_doctype_key = ''
if not d.reference_key:
d.reference_key = ''
# Check wrong field name
self.check_fields_in_dt()

# Check if any wrong fieldname entered
#--------------------------------------
def check_fields_in_dt(self):
for d in getlist(self.doclist, 'field_mapper_details'):
table_name = sql("select from_table, to_table from `tabTable Mapper Detail` where parent ='%s' and match_id = '%s'" % (self.doc.name, d.match_id))
if table_name:
exists1 = sql("select name from tabDocField where parent = '%s' and fieldname = '%s'" % (table_name[0][0], d.from_field))
exists2 = sql("select name from tabDocField where parent = '%s' and fieldname = '%s'" % (table_name[0][1], d.to_field))
# Default fields like name, parent, owner does not exists in DocField
if not exists1 and d.from_field not in default_fields:
msgprint('"' + cstr(d.from_field) + '" does not exists in DocType "' + cstr(table_name[0][0]) + '"')
if not exists2 and d.to_field not in default_fields:
msgprint('"' + cstr(d.to_field) + '" does not exists in DocType "' + cstr(table_name[0][1]) + '"')
# Check consistency of value with reference document
#---------------------------------------------------
def validate_reference_value(self, obj, to_docname):
for t in getlist(self.doclist, 'table_mapper_details'):
# Reference key is the fieldname which will relate to the from_table
if t.reference_doctype_key:
for d in getlist(obj.doclist, t.to_field):
if d.fields[t.reference_doctype_key] == self.doc.from_doctype:
self.check_consistency(obj.doc, d, to_docname)
self.check_ref_docstatus()
# Make list of fields whose value will be consistent with prevdoc
#-----------------------------------------------------------------
def get_checklist(self):
checklist = []
for f in getlist(self.doclist, 'field_mapper_details'):
# Check which field's value will be compared
if f.checking_operator:
checklist.append([f.from_field, f.to_field, f.checking_operator, f.match_id])
return checklist
def check_fld_type(self, tbl, fld, cur_val):
ft = sql("select fieldtype from tabDocField where fieldname = '%s' and parent = '%s'" % (fld,tbl))
ft = ft and ft[0][0] or ''
if ft == 'Currency' or ft == 'Float':
cur_val = '%.2f' % cur_val
return cur_val, ft
# Check consistency
#-------------------
def check_consistency(self, par_obj, child_obj, to_docname):
checklist = self.get_checklist()
self.ref_doc = ''
for t in getlist(self.doclist, 'table_mapper_details'):
if t.reference_key and child_obj.fields[t.reference_key]:
for cl in checklist:
if cl[3] == t.match_id:
if t.to_field:
cur_val = child_obj.fields[cl[1]]
else:
cur_val = par_obj.fields[cl[1]]
ft = self.check_fld_type(t.to_table, cl[1], cur_val)
cur_val = ft[0]

if cl[2] == '=' and (ft[1] == 'Currency' or ft[1] == 'Float'):
consistent = sql("select name, %s from `tab%s` where name = '%s' and '%s' - %s <= 0.5" % (cl[0], t.from_table, child_obj.fields[t.reference_key], flt(cur_val), cl[0]))
else:
#consistent = sql("select name, %s from `tab%s` where name = '%s' and '%s' %s %s" % (cl[0], t.from_table, child_obj.fields[t.reference_key], cur_val, cl[2], cl[0]))
consistent = sql("select name, %s from `tab%s` where name = '%s' and '%s' %s ifnull(%s, '')" % (cl[0], t.from_table, child_obj.fields[t.reference_key], ft[1] in ('Currency', 'Float', 'Int') and flt(cur_val) or cstr(cur_val), cl[2], cl[0]))

if not self.ref_doc:
det = sql("select name, parent from `tab%s` where name = '%s'" % (t.from_table, child_obj.fields[t.reference_key]))
self.ref_doc = det[0][1] and det[0][1] or det[0][0]

if not consistent:
self.give_message(t.from_table, t.to_table, cl[0], cl[1], child_obj.fields[t.reference_key], cl[2])
# Gives message and raise exception
#-----------------------------------
def give_message(self, from_table, to_table, from_field, to_field, ref_value, operator):
# Select label of the field
to_fld_label = sql("select label from tabDocField where parent = '%s' and fieldname = '%s'" % (to_table, to_field))
from_fld_label = sql("select label from tabDocField where parent = '%s' and fieldname = '%s'" % (from_table, from_field))
op_in_words = {'=':'equal to ', '>=':'greater than equal to ', '>':'greater than ', '<=':'less than equal to ', '<':'less than '}
msgprint(to_fld_label[0][0] + " should be " + op_in_words[operator] + from_fld_label[0][0] + " of " + self.doc.from_doctype + ": " + self.ref_doc)
raise Exception, "Validation Error."
def check_ref_docstatus(self):
if self.ref_doc:
det = sql("select name, docstatus from `tab%s` where name = '%s'" % (self.doc.from_doctype, self.ref_doc))
if not det:
msgprint(self.doc.from_doctype + ": " + self.ref_doc + " does not exists in the system")
raise Exception, "Validation Error."
elif self.doc.ref_doc_submitted and det[0][1] != 1:
msgprint(self.doc.from_doctype + ": " + self.ref_doc + " is not Submitted Document.")
raise Exception, "Validation Error."

def on_update(self):
import webnotes.defs
if hasattr(webnotes.defs, 'developer_mode') and webnotes.defs.developer_mode:
from webnotes.modules.export_module import export_to_files
export_to_files(record_list=[[self.doc.doctype, self.doc.name]])

+ 311
- 0
cgi-bin/core/doctype/doctype_mapper/doctype_mapper.txt Прегледај датотеку

@@ -0,0 +1,311 @@
[
{
'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': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2010-08-08 17:08:59',
'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': 0,
'istable': None,
'max_attachments': None,
'menu_index': 12,
'modified': '2010-12-16 18:13:25',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'DocType Mapper',
'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': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': 10
},
{
'amend': None,
'cancel': None,
'create': 1,
'creation': '2010-08-08 17:08:59',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2010-08-08 17:08:59',
'modified_by': 'Administrator',
'name': '_PERM00192',
'owner': 'Administrator',
'parent': 'DocType Mapper',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Administrator',
'submit': None,
'write': 1
},
{
'amend': None,
'cancel': None,
'create': None,
'creation': '2010-08-08 17:08:59',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 2,
'match': None,
'modified': '2010-08-08 17:08:59',
'modified_by': 'Administrator',
'name': '_PERM00193',
'owner': 'Administrator',
'parent': 'DocType Mapper',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 1,
'read': 1,
'role': 'Administrator',
'submit': None,
'write': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:59',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'module',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Module',
'modified': '2011-04-05 10:01:38',
'modified_by': 'Administrator',
'name': '_FL01049',
'no_copy': None,
'oldfieldname': 'module',
'oldfieldtype': 'Select',
'options': 'link:Module Def',
'owner': 'Administrator',
'parent': 'DocType Mapper',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:59',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'from_doctype',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'From DocType',
'modified': '2011-04-05 10:01:38',
'modified_by': 'Administrator',
'name': '_FL01050',
'no_copy': 1,
'oldfieldname': 'from_doctype',
'oldfieldtype': 'Select',
'options': 'link:DocType',
'owner': 'Administrator',
'parent': 'DocType Mapper',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:59',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'to_doctype',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'To DocType',
'modified': '2011-04-05 10:01:38',
'modified_by': 'Administrator',
'name': '_FL01051',
'no_copy': 1,
'oldfieldname': 'to_doctype',
'oldfieldtype': 'Select',
'options': 'link:DocType',
'owner': 'Administrator',
'parent': 'DocType Mapper',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:59',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'ref_doc_submitted',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Ref Doc should be submitted?',
'modified': '2011-04-05 10:01:38',
'modified_by': 'Administrator',
'name': '_FL01052',
'no_copy': None,
'oldfieldname': 'ref_doc_submitted',
'oldfieldtype': 'Check',
'options': None,
'owner': 'nabin@webnotestech.com',
'parent': 'DocType Mapper',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:59',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'field_mapper_details',
'fieldtype': 'Table',
'hidden': None,
'icon': None,
'idx': 5,
'in_filter': None,
'label': 'Field Mapper Details',
'modified': '2011-04-05 10:01:38',
'modified_by': 'Administrator',
'name': '_FL01053',
'no_copy': None,
'oldfieldname': 'field_mapper_details',
'oldfieldtype': 'Table',
'options': 'Field Mapper Detail',
'owner': 'Administrator',
'parent': 'DocType Mapper',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:59',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'table_mapper_details',
'fieldtype': 'Table',
'hidden': None,
'icon': None,
'idx': 6,
'in_filter': None,
'label': 'Table Mapper Details',
'modified': '2011-04-05 10:01:38',
'modified_by': 'Administrator',
'name': '_FL01054',
'no_copy': None,
'oldfieldname': 'table_mapper_details',
'oldfieldtype': 'Table',
'options': 'Table Mapper Detail',
'owner': 'Administrator',
'parent': 'DocType Mapper',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/event/__init__.py Прегледај датотеку


+ 603
- 0
cgi-bin/core/doctype/event/event.txt Прегледај датотеку

@@ -0,0 +1,603 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'EV.#####',
'change_log': None,
'client_script': "cur_frm.cscript.onload = function(doc, cdt, cdn) {\n var df = get_field('Event', 'Intro HTML', doc.name);\n if(doc.ref_type) {\n ref = repl(cur_frm.cstring.ref_html, {'dt': doc.ref_type, 'dn':doc.ref_name});\n } else var ref = '';\n \n df.options = repl(cur_frm.cstring.intro_html, {'ref': ref});\n refresh_fields('Intro HTML');\n}",
'client_script_core': None,
'client_string': '---intro_html---\n\n<div style="padding: 8px; background-color: #EEF; border: 1px solid #CCF; margin-bottom: 8px;">\n %(ref)s\n <a href="javascript:loadpage(\'_calendar\')">Go To Calendar</a>\n</div>\n\n---ref_html---\n\nReference : <a href="javascript:loaddoc(\'%(dt)s\', \'%(dn)s\')">%(dn)s</a><br><br>',
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:11',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': None,
'hide_toolbar': None,
'idx': None,
'in_create': 1,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': None,
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Event',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': 1,
'read_only_onload': None,
'search_fields': None,
'section_style': 'Tabbed',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': None
},
{
'amend': None,
'cancel': None,
'create': 1,
'creation': '2009-05-12 11:19:22',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': 'owner',
'modified': '2009-05-12 11:19:22',
'modified_by': 'Administrator',
'name': '_PERM00006',
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'All',
'submit': None,
'write': 1
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Section Break',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Details',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00117',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Section Break',
'options': None,
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'HTML',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Intro HTML',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00118',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'HTML',
'options': '',
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'event_date',
'fieldtype': 'Date',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Event Date',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00119',
'no_copy': None,
'oldfieldname': 'event_date',
'oldfieldtype': 'Date',
'options': None,
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'event_hour',
'fieldtype': 'Time',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Event Time',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00120',
'no_copy': None,
'oldfieldname': 'event_hour',
'oldfieldtype': 'Time',
'options': None,
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 22:44:59',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'event_name',
'fieldtype': 'Data',
'hidden': 0,
'icon': None,
'idx': 5,
'in_filter': None,
'label': 'Event',
'modified': '2010-11-30 22:44:59',
'modified_by': 'Administrator',
'name': '_FL03481',
'no_copy': None,
'oldfieldname': 'event_name',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 6,
'in_filter': None,
'label': 'Description',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00121',
'no_copy': None,
'oldfieldname': 'description',
'oldfieldtype': 'Text',
'options': None,
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'notes',
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 7,
'in_filter': None,
'label': 'Notes',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00122',
'no_copy': None,
'oldfieldname': 'notes',
'oldfieldtype': 'Text',
'options': None,
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'event_type',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 8,
'in_filter': None,
'label': 'Event Type',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00123',
'no_copy': None,
'oldfieldname': 'event_type',
'oldfieldtype': 'Select',
'options': 'Private\nPublic\nCancel',
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Section Break',
'hidden': None,
'icon': None,
'idx': 9,
'in_filter': None,
'label': 'Participants',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00124',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Section Break',
'options': None,
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 10,
'in_filter': None,
'label': 'Individuals',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00125',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Column Break',
'options': None,
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '50%'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'event_individuals',
'fieldtype': 'Table',
'hidden': None,
'icon': None,
'idx': 11,
'in_filter': None,
'label': 'Event Individuals',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00126',
'no_copy': None,
'oldfieldname': 'event_individuals',
'oldfieldtype': 'Table',
'options': 'Event User',
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 12,
'in_filter': None,
'label': 'Groups',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00127',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Column Break',
'options': None,
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '50%'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'event_roles',
'fieldtype': 'Table',
'hidden': None,
'icon': None,
'idx': 13,
'in_filter': None,
'label': 'Event Roles',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00128',
'no_copy': None,
'oldfieldname': 'event_roles',
'oldfieldtype': 'Table',
'options': 'Event Role',
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'ref_type',
'fieldtype': 'Data',
'hidden': 0,
'icon': None,
'idx': 14,
'in_filter': None,
'label': 'Ref Type',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00129',
'no_copy': None,
'oldfieldname': 'ref_type',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'ref_name',
'fieldtype': 'Data',
'hidden': 0,
'icon': None,
'idx': 15,
'in_filter': None,
'label': 'Ref Name',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00130',
'no_copy': None,
'oldfieldname': 'ref_name',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Event',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/event_role/__init__.py Прегледај датотеку


+ 90
- 0
cgi-bin/core/doctype/event_role/event_role.txt Прегледај датотеку

@@ -0,0 +1,90 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': '__EVR.#####',
'change_log': None,
'client_script': None,
'client_script_core': '',
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:11',
'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': None,
'istable': 1,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Event Role',
'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,
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': '',
'server_code_error': None,
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'role',
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Role',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00131',
'no_copy': None,
'oldfieldname': 'role',
'oldfieldtype': 'Link',
'options': 'Role',
'owner': 'Administrator',
'parent': 'Event Role',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/event_user/__init__.py Прегледај датотеку


+ 90
- 0
cgi-bin/core/doctype/event_user/event_user.txt Прегледај датотеку

@@ -0,0 +1,90 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'EVP.#####',
'change_log': None,
'client_script': None,
'client_script_core': '',
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:11',
'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': None,
'istable': 1,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Event User',
'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,
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': '',
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'person',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Person',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00132',
'no_copy': None,
'oldfieldname': 'person',
'oldfieldtype': 'Select',
'options': 'link:Profile',
'owner': 'Administrator',
'parent': 'Event User',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': 1,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/field_mapper_detail/__init__.py Прегледај датотеку


+ 230
- 0
cgi-bin/core/doctype/field_mapper_detail/field_mapper_detail.txt Прегледај датотеку

@@ -0,0 +1,230 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'FMD/.#####',
'change_log': None,
'client_script': '',
'client_script_core': '',
'client_string': None,
'colour': 'White:FFF',
'creation': '2010-11-30 17:30:01',
'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': None,
'istable': 1,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Field Mapper Detail',
'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,
'section_style': 'Tray',
'server_code': '',
'server_code_compiled': None,
'server_code_core': '',
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': '',
'use_template': None,
'version': 10
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'from_field',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'From Field',
'modified': '2010-11-30 17:30:01',
'modified_by': 'Administrator',
'name': '_FL00503',
'no_copy': None,
'oldfieldname': 'from_field',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Field Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '180px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'to_field',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'To Field',
'modified': '2010-11-30 17:30:01',
'modified_by': 'Administrator',
'name': '_FL00504',
'no_copy': None,
'oldfieldname': 'to_field',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Field Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '180px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:01',
'default': '0',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'match_id',
'fieldtype': 'Int',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Match Id',
'modified': '2010-11-30 17:30:01',
'modified_by': 'Administrator',
'name': '_FL00505',
'no_copy': None,
'oldfieldname': 'match_id',
'oldfieldtype': 'Int',
'options': None,
'owner': 'Administrator',
'parent': 'Field Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '50px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'map',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Map',
'modified': '2010-11-30 17:30:01',
'modified_by': 'Administrator',
'name': '_FL00506',
'no_copy': None,
'oldfieldname': 'map',
'oldfieldtype': 'Select',
'options': 'Yes\nNo',
'owner': 'nabin@webnotestech.com',
'parent': 'Field Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '50px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'checking_operator',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 5,
'in_filter': None,
'label': 'Checking Operator (To Fld, Operator, From Fld)',
'modified': '2010-11-30 17:30:01',
'modified_by': 'Administrator',
'name': '_FL00507',
'no_copy': None,
'oldfieldname': 'checking_operator',
'oldfieldtype': 'Select',
'options': '\n=\n>\n>=\n<\n<=',
'owner': 'nabin@webnotestech.com',
'parent': 'Field Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '180px'
}
]

+ 0
- 0
cgi-bin/core/doctype/file_data/__init__.py Прегледај датотеку


+ 125
- 0
cgi-bin/core/doctype/file_data/file_data.txt Прегледај датотеку

@@ -0,0 +1,125 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'FileData/.#####',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:11',
'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': None,
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2010-12-01 13:35:53',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'File Data',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': 0,
'read_only_onload': None,
'search_fields': 'file_name',
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': None,
'smallicon': None,
'use_template': None,
'version': 1
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'file_name',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'File Name',
'modified': '2010-12-01 13:35:53',
'modified_by': 'Administrator',
'name': '_FL00133',
'no_copy': None,
'oldfieldname': 'file_name',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'File Data',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-12-01 13:35:53',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'module',
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Module',
'modified': '2010-12-01 13:35:53',
'modified_by': 'Administrator',
'name': '_FL03754',
'no_copy': None,
'oldfieldname': 'module',
'oldfieldtype': 'Link',
'options': 'Module Def',
'owner': 'Administrator',
'parent': 'File Data',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/letter_head/__init__.py Прегледај датотеку


+ 26
- 0
cgi-bin/core/doctype/letter_head/letter_head.js Прегледај датотеку

@@ -0,0 +1,26 @@
cur_frm.cscript.validate = function(doc, dt, dn) {
return 1;
}

cur_frm.cscript['Set From Image'] = function(doc, dt, dn) {
if(!doc.file_list) {
msgprint('Please attach an image file first');
return;
}
if(doc.content) {
if(!confirm('Are you sure you want to overwrite the existing HTML?'))
return;
}

var file_name = doc.file_list.split(',')[0]

if(!in_list(['gif','jpg','jpeg','png'], file_name.split('.')[1].toLowerCase())) {
msgprint("Please upload a web friendly (GIF, JPG or PNG) image file for the letter head");
return;
}

img_link = '<div><img src="'+ wn.urllib.get_file_url(file_name) + '"/></div>'
doc.content = img_link;
refresh_field('content');
}

+ 31
- 0
cgi-bin/core/doctype/letter_head/letter_head.py Прегледај датотеку

@@ -0,0 +1,31 @@
# Please edit this list and import only required elements
import webnotes
from webnotes import msgprint

sql = webnotes.conn.sql

class DocType:
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclist
#
# on update
#
def on_update(self):
# clear the cache so that the new letter head is uploaded
sql("delete from __SessionCache")

self.set_as_default()
#
# this is default, un-set everyone else
#
def set_as_default(self):
from webnotes.utils import set_default
if self.doc.is_default:
sql("update `tabLetter Head` set is_default=0 where name != %s", self.doc.name)
set_default('letter_head', self.doc.name)

# update control panel - so it loads new letter directly
webnotes.conn.set_value('Control Panel', None, 'letter_head', self.doc.content)

+ 324
- 0
cgi-bin/core/doctype/letter_head/letter_head.txt Прегледај датотеку

@@ -0,0 +1,324 @@
[
{
'_last_update': None,
'allow_attach': 1,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'field:letter_head_name',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2010-12-14 10:32:59',
'description': 'Create a Letter Head for Print Formats. The letter head must be in HTML.\nYou can also set the letter head from an attachment.\nIf you click on "Set from Image" then, the HTML Content will be overwritten.',
'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': 3,
'menu_index': None,
'modified': '2011-04-14 10:25:09',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Letter Head',
'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': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': 11
},
{
'amend': None,
'cancel': None,
'create': 1,
'creation': '2010-12-14 10:32:59',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2010-12-14 10:32:59',
'modified_by': 'Administrator',
'name': '_PERM00735',
'owner': 'Administrator',
'parent': 'Letter Head',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'System Manager',
'submit': None,
'write': 1
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-12-14 10:32:59',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'letter_head_name',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': 0,
'label': 'Letter Head Name',
'modified': '2011-05-09 10:50:46',
'modified_by': 'Administrator',
'name': '_FL04150',
'no_copy': None,
'oldfieldname': 'letter_head_name',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Letter Head',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-12-14 10:32:59',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'disabled',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Disabled',
'modified': '2011-05-09 10:50:46',
'modified_by': 'Administrator',
'name': '_FL04151',
'no_copy': None,
'oldfieldname': 'disabled',
'oldfieldtype': 'Check',
'options': None,
'owner': 'Administrator',
'parent': 'Letter Head',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-12-21 18:32:42',
'default': None,
'depends_on': None,
'description': 'Check this to make this the default letter head in all prints',
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'is_default',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Is Default',
'modified': '2011-05-09 10:50:46',
'modified_by': 'Administrator',
'name': '_FL04428',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Letter Head',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 10:50:46',
'default': None,
'depends_on': None,
'description': 'To update your HTML from attachment, click here',
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'set_from_image',
'fieldtype': 'Button',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Set From Image',
'modified': '2011-05-09 10:50:46',
'modified_by': 'Administrator',
'name': '000000156',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Letter Head',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': 'Client',
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-12-14 10:32:59',
'default': None,
'depends_on': None,
'description': 'Your letter head content in HTML.',
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'content',
'fieldtype': 'Code',
'hidden': None,
'icon': None,
'idx': 5,
'in_filter': None,
'label': 'Content',
'modified': '2011-05-09 10:50:46',
'modified_by': 'Administrator',
'name': '_FL04152',
'no_copy': None,
'oldfieldname': 'content',
'oldfieldtype': 'Text Editor',
'options': None,
'owner': 'Administrator',
'parent': 'Letter Head',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 10:50:46',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'url',
'fieldtype': 'Data',
'hidden': 1,
'icon': None,
'idx': 6,
'in_filter': None,
'label': 'URL',
'modified': '2011-05-09 10:50:46',
'modified_by': 'Administrator',
'name': '000000157',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Letter Head',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-12-14 10:32:59',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'file_list',
'fieldtype': 'Text',
'hidden': 1,
'icon': None,
'idx': 7,
'in_filter': None,
'label': 'File LIst',
'modified': '2011-05-09 10:50:46',
'modified_by': 'Administrator',
'name': '_FL04153',
'no_copy': None,
'oldfieldname': 'file_list',
'oldfieldtype': 'Text',
'options': None,
'owner': 'Administrator',
'parent': 'Letter Head',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/module_def/__init__.py Прегледај датотеку


+ 50
- 0
cgi-bin/core/doctype/module_def/module_def.py Прегледај датотеку

@@ -0,0 +1,50 @@
# Please edit this list and import only required elements
import webnotes

from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
from webnotes.model import db_exists
from webnotes.model.doc import Document, addchild, removechild, getchildren, make_autoname, SuperDocType
from webnotes.model.doclist import getlist, copy_doclist
from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
from webnotes import session, form, is_testing, msgprint, errprint

set = webnotes.conn.set
sql = webnotes.conn.sql
get_value = webnotes.conn.get_value
in_transaction = webnotes.conn.in_transaction
convert_to_lists = webnotes.conn.convert_to_lists
# -----------------------------------------------------------------------------------------


class DocType:
def __init__(self,d,dl):
self.doc, self.doclist = d,dl
def on_update(self):
if not getlist(self.doclist,'items') and not self.doc.widget_code:
obj = Document(self.doc.doctype, self.doc.name)
doc_type = [['DocType','name','name','Forms',"(istable is null or istable=0) and (issingle is null or issingle=0)"],['Page','name','page_name','Pages','(show_in_menu=1 or show_in_menu=0)'],['Search Criteria','doc_type','criteria_name','Reports',"(disabled is null or disabled=0)"]]
for dt in doc_type:
dn = [[d[0] or '', d[1] or ''] for d in sql("select %s,%s from `tab%s` where module = '%s' and %s" % (dt[1],dt[2],dt[0],self.doc.name,dt[4]))]

if dn:
r = addchild(obj,'items','Module Def Item',1)
r.doc_type = 'Separator'
r.doc_name = dt[3]
r.save(1)

for d in dn:
r = addchild(obj,'items','Module Def Item',1)
r.doc_type = dt[3]
r.doc_name = d[0]
r.display_name = d[1]
r.save(1)

def on_update(self):
import webnotes.defs
if hasattr(webnotes.defs, 'developer_mode') and webnotes.defs.developer_mode:
from webnotes.modules.export_module import export_to_files
export_to_files(record_list=[[self.doc.doctype, self.doc.name]])

+ 708
- 0
cgi-bin/core/doctype/module_def/module_def.txt Прегледај датотеку

@@ -0,0 +1,708 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'field:module_name',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:11',
'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': None,
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-27 11:16:33',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Module Def',
'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': 'doctype_list',
'section_style': 'Tray',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': 2
},
{
'amend': None,
'cancel': None,
'create': 1,
'creation': '2009-05-12 11:19:22',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2010-08-08 17:16:13',
'modified_by': 'Administrator',
'name': '_PERM00007',
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Administrator',
'submit': None,
'write': 1
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'trash_reason',
'fieldtype': 'Small Text',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Trash Reason',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL01996',
'no_copy': None,
'oldfieldname': 'trash_reason',
'oldfieldtype': 'Small Text',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 1,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 10:01:47',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Section Break',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Module Details',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '000000462',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Section Break',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'disabled',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Disabled',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL01998',
'no_copy': None,
'oldfieldname': 'disabled',
'oldfieldtype': 'Select',
'options': 'No\nYes',
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'module_name',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Module Name',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL00135',
'no_copy': None,
'oldfieldname': 'module_name',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'module_label',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 5,
'in_filter': None,
'label': 'Module Label',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL01999',
'no_copy': None,
'oldfieldname': 'module_label',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'doctype_list',
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 6,
'in_filter': None,
'label': 'DocType List',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL00136',
'no_copy': None,
'oldfieldname': 'doctype_list',
'oldfieldtype': 'Text',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'module_page',
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 7,
'in_filter': None,
'label': 'Module Page',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL02000',
'no_copy': None,
'oldfieldname': 'module_page',
'oldfieldtype': 'Link',
'options': 'Page',
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'module_desc',
'fieldtype': 'Text Editor',
'hidden': None,
'icon': None,
'idx': 8,
'in_filter': None,
'label': 'Module Description',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL02001',
'no_copy': None,
'oldfieldname': 'module_desc',
'oldfieldtype': 'Text Editor',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'module_icon',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 9,
'in_filter': None,
'label': 'Module Icon',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL02002',
'no_copy': None,
'oldfieldname': 'module_icon',
'oldfieldtype': 'Select',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'module_seq',
'fieldtype': 'Int',
'hidden': None,
'icon': None,
'idx': 10,
'in_filter': 1,
'label': 'Module Sequence',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL02003',
'no_copy': None,
'oldfieldname': 'module_seq',
'oldfieldtype': 'Int',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 10:01:47',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Section Break',
'hidden': None,
'icon': None,
'idx': 11,
'in_filter': None,
'label': 'Item List',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '000000463',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Section Break',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'items',
'fieldtype': 'Table',
'hidden': None,
'icon': None,
'idx': 12,
'in_filter': None,
'label': 'Items',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL02005',
'no_copy': None,
'oldfieldname': 'items',
'oldfieldtype': 'Table',
'options': 'Module Def Item',
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 10:01:47',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Section Break',
'hidden': None,
'icon': None,
'idx': 13,
'in_filter': None,
'label': 'Role List',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '000000464',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Section Break',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'roles',
'fieldtype': 'Table',
'hidden': None,
'icon': None,
'idx': 14,
'in_filter': None,
'label': 'Roles',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL02007',
'no_copy': None,
'oldfieldname': 'roles',
'oldfieldtype': 'Table',
'options': 'Module Def Role',
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'file_list',
'fieldtype': 'Text',
'hidden': 1,
'icon': None,
'idx': 15,
'in_filter': None,
'label': 'File List',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL02008',
'no_copy': None,
'oldfieldname': 'file_list',
'oldfieldtype': 'Text',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': 1,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 10:01:47',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Section Break',
'hidden': None,
'icon': None,
'idx': 16,
'in_filter': None,
'label': 'Widget Script',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '000000465',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Section Break',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'widget_code',
'fieldtype': 'Code',
'hidden': None,
'icon': None,
'idx': 17,
'in_filter': None,
'label': 'Widget Code',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL02010',
'no_copy': None,
'oldfieldname': 'widget_code',
'oldfieldtype': 'Code',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-01 19:01:13',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'is_hidden',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 18,
'in_filter': None,
'label': 'Is Hidden',
'modified': '2011-04-05 10:01:47',
'modified_by': 'Administrator',
'name': '_FL03943',
'no_copy': None,
'oldfieldname': 'is_hidden',
'oldfieldtype': 'Select',
'options': 'No\nYes',
'owner': 'yogesh@webnotestech.com',
'parent': 'Module Def',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/module_def_item/__init__.py Прегледај датотеку


+ 335
- 0
cgi-bin/core/doctype/module_def_item/module_def_item.txt Прегледај датотеку

@@ -0,0 +1,335 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'MDI.#####',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2010-08-08 17:09:10',
'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': None,
'istable': 1,
'max_attachments': None,
'menu_index': None,
'modified': '2011-02-21 17:42:16',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Module Def Item',
'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': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': 21
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'doc_type',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Doc Type',
'modified': '2011-04-05 10:01:39',
'modified_by': 'Administrator',
'name': '_FL02011',
'no_copy': None,
'oldfieldname': 'doc_type',
'oldfieldtype': 'Select',
'options': 'Forms\nPages\nReports\nSeparator\nMore Reports\nSetup Forms\nSetup Pages\nSingle DocType',
'owner': 'Administrator',
'parent': 'Module Def Item',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'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-04-05 10:01:39',
'modified_by': 'Administrator',
'name': '_FL02012',
'no_copy': None,
'oldfieldname': 'doc_name',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def Item',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'display_name',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Display Name',
'modified': '2011-04-05 10:01:40',
'modified_by': 'Administrator',
'name': '_FL02013',
'no_copy': None,
'oldfieldname': 'display_name',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def Item',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'icon',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Icon',
'modified': '2011-04-05 10:01:40',
'modified_by': 'Administrator',
'name': '_FL02014',
'no_copy': None,
'oldfieldname': 'icon',
'oldfieldtype': 'Select',
'options': '\naccept.gif\nadd.gif\napplication.gif\narrow_down.gif\narrow_left.gif\narrow_right.gif\narrow_up.gif\ncalculator.gif\ncalendar.gif\ncancel.gif\nchart_bar.gif\nclose.gif\ncomments.gif\ndisk.gif\ndown-arrow.gif\nemail.gif\nerror.gif\nfolder.gif\ngroup.gif\nhelp.gif\nicon-recommend.gif\nlightbulb.gif\nmagnifier.gif\nminus.gif\nnote.gif\npage.gif\npage_add.gif\npage_copy.gif\npage_excel.gif\npage_refresh.gif\npaperclip.gif\nplus.gif\nprinter.gif\nresultset_first.gif\nresultset_last.gif\nresultset_next.gif\nresultset_previous.gif\nsort_asc.gif\nsort_desc.gif\nstar.gif\ntable.gif\ntable_row_delete.gif\ntable_row_insert.gif\nuser.gif\nwrench.gif',
'owner': 'Administrator',
'parent': 'Module Def Item',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 5,
'in_filter': None,
'label': 'Description',
'modified': '2011-04-05 10:01:40',
'modified_by': 'Administrator',
'name': '_FL02015',
'no_copy': None,
'oldfieldname': 'description',
'oldfieldtype': 'Text',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def Item',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'fields',
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 6,
'in_filter': None,
'label': 'Fields',
'modified': '2011-04-05 10:01:40',
'modified_by': 'Administrator',
'name': '_FL02016',
'no_copy': None,
'oldfieldname': 'fields',
'oldfieldtype': 'Text',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def Item',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-10-04 17:46:19',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'click_function',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 7,
'in_filter': None,
'label': 'Click Function',
'modified': '2011-04-05 10:01:40',
'modified_by': 'Administrator',
'name': '_FL03944',
'no_copy': None,
'oldfieldname': 'click_function',
'oldfieldtype': 'Data',
'options': None,
'owner': 'harshada@webnotestech.com',
'parent': 'Module Def Item',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-12-24 17:46:27',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'hide',
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 8,
'in_filter': None,
'label': 'Hide',
'modified': '2011-04-05 10:01:40',
'modified_by': 'Administrator',
'name': '_FL04430',
'no_copy': None,
'oldfieldname': 'hide',
'oldfieldtype': 'Check',
'options': None,
'owner': 'Administrator',
'parent': 'Module Def Item',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/module_def_role/__init__.py Прегледај датотеку


+ 90
- 0
cgi-bin/core/doctype/module_def_role/module_def_role.txt Прегледај датотеку

@@ -0,0 +1,90 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'MDR.#####',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2010-08-08 17:09:10',
'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': None,
'istable': 1,
'max_attachments': None,
'menu_index': None,
'modified': '2011-02-21 17:42:16',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Module Def Role',
'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': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': 1
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:09:10',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'role',
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Role',
'modified': '2011-04-05 10:01:40',
'modified_by': 'Administrator',
'name': '_FL02017',
'no_copy': None,
'oldfieldname': 'role',
'oldfieldtype': 'Link',
'options': 'Role',
'owner': 'Administrator',
'parent': 'Module Def Role',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/page/__init__.py Прегледај датотеку


+ 49
- 0
cgi-bin/core/doctype/page/page.py Прегледај датотеку

@@ -0,0 +1,49 @@
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d,dl

def autoname(self):
if (self.doc.name and self.doc.name.startswith('New Page')) or not self.doc.name:
self.doc.name = self.doc.page_name.lower().replace(' ', '-')

def onload(self):
import os
from webnotes.modules import get_module_path, scrub
# load content
try:
file = open(os.path.join(get_module_path(self.doc.module), 'page', scrub(self.doc.name) + '.html'), 'r')
self.doc.content = file.read() or ''
file.close()
except IOError, e: # no file / permission
if e.args[0]!=2:
raise e

# replace $image
# ------------------
def validate(self):
import re
p = re.compile('\$image\( (?P<name> [^)]*) \)', re.VERBOSE)
if self.doc.content:
self.doc.content = p.sub(self.replace_by_img, self.doc.content)
def replace_by_img(self, match):
import webnotes
name = match.group('name')
return '<img src="cgi-bin/getfile.cgi?ac=%s&name=%s">' % (webnotes.conn.get('Control Panel', None, 'account_id'), name)
# export
def on_update(self):
from webnotes.modules.export_module import export_to_files
from webnotes.modules import get_module_path, scrub
import os
from webnotes import defs
if getattr(defs,'developer_mode', 0):
export_to_files(record_list=[['Page', self.doc.name]])
if self.doc.write_content and self.doc.content:
file = open(os.path.join(get_module_path(self.doc.module), 'page', scrub(self.doc.name), scrub(self.doc.name) + '.html'), 'w')
file.write(self.doc.content)
file.close()

+ 1023
- 0
cgi-bin/core/doctype/page/page.txt
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 0
- 0
cgi-bin/core/doctype/page_role/__init__.py Прегледај датотеку


+ 90
- 0
cgi-bin/core/doctype/page_role/page_role.txt Прегледај датотеку

@@ -0,0 +1,90 @@
[
{
'allow_attach': None,
'allow_copy': 0,
'allow_email': 0,
'allow_print': 0,
'allow_rename': None,
'allow_trash': None,
'autoname': 'PR.######',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:11',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': 0,
'hide_toolbar': 0,
'idx': 0,
'in_create': None,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': 0,
'istable': 1,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Page Role',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': 0,
'read_only_onload': None,
'search_fields': None,
'section_style': None,
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': None,
'smallicon': None,
'use_template': None,
'version': None
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:12',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'role',
'fieldtype': 'Link',
'hidden': 0,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Role',
'modified': '2009-05-12 11:19:12',
'modified_by': 'Administrator',
'name': '_FL00151',
'no_copy': None,
'oldfieldname': 'role',
'oldfieldtype': 'Link',
'options': 'Role',
'owner': 'Administrator',
'parent': 'Page Role',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': ''
}
]

+ 0
- 0
cgi-bin/core/doctype/page_template/__init__.py Прегледај датотеку


+ 20
- 0
cgi-bin/core/doctype/page_template/page_template.py Прегледај датотеку

@@ -0,0 +1,20 @@
import webnotes

class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d,dl
# export
def on_update(self):
import webnotes.defs
from webnotes.modules.export_module import export_to_files
from webnotes.modules import get_module_path, scrub
import os
if hasattr(webnotes.defs, 'developer_mode') and webnotes.defs.developer_mode:
export_to_files(record_list=[['Page Template', self.doc.name]])

file = open(os.path.join(get_module_path(self.doc.module), 'Page Template', self.doc.name, self.doc.name + '.html'), 'w')
file.write(self.doc.content)
file.close()

+ 160
- 0
cgi-bin/core/doctype/page_template/page_template.txt Прегледај датотеку

@@ -0,0 +1,160 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'field:template_name',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2011-04-05 10:01:43',
'description': 'Page Template is used in the CMS. In Page, if you select a template, the page appears within the template.\n\n<b>Note:</b> The template must have a "%(content)s" for string replacement and all % must be %%!\n\nIn developer_mode, the template is saved to the file system. ',
'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-02-21 17:10:06',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Page Template',
'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': None,
'smallicon': None,
'use_template': None,
'version': 6
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 10:01:43',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'template_name',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Template Name',
'modified': '2011-04-05 10:01:43',
'modified_by': 'Administrator',
'name': '000000434',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Page Template',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 10:01:43',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'module',
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Module',
'modified': '2011-04-05 10:01:43',
'modified_by': 'Administrator',
'name': '000000435',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': 'Module Def',
'owner': 'Administrator',
'parent': 'Page Template',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 10:01:43',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'template',
'fieldtype': 'Code',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Template',
'modified': '2011-04-05 10:01:43',
'modified_by': 'Administrator',
'name': '000000436',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Page Template',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/print_format/__init__.py Прегледај датотеку


+ 183
- 0
cgi-bin/core/doctype/print_format/print_format.txt Прегледај датотеку

@@ -0,0 +1,183 @@
[
{
'allow_attach': None,
'allow_copy': 0,
'allow_email': 0,
'allow_print': 0,
'allow_rename': None,
'allow_trash': None,
'autoname': 'Prompt',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:11',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': 0,
'hide_toolbar': 0,
'idx': 0,
'in_create': None,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': 0,
'istable': 0,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Print Format',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': 0,
'read_only_onload': None,
'search_fields': None,
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': 3
},
{
'amend': None,
'cancel': 0,
'create': 1,
'creation': '2009-05-12 11:19:22',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': 0,
'idx': 1,
'match': '',
'modified': '2009-11-25 10:15:16',
'modified_by': 'Administrator',
'name': '_PERM00009',
'owner': 'Administrator',
'parent': 'Print Format',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Administrator',
'submit': 0,
'write': 1
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-06-30 16:22:31',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'module',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Module',
'modified': '2009-11-25 10:15:16',
'modified_by': 'Administrator',
'name': '_FL00293',
'no_copy': None,
'oldfieldname': 'module',
'oldfieldtype': 'Select',
'options': 'link:Module Def',
'owner': 'Administrator',
'parent': 'Print Format',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': ''
},
{
'allow_on_submit': None,
'colour': '',
'creation': '2009-05-12 11:19:12',
'default': '',
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'html',
'fieldtype': 'Text Editor',
'hidden': 0,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'HTML',
'modified': '2009-11-25 10:15:16',
'modified_by': 'Administrator',
'name': '_FL00152',
'no_copy': None,
'oldfieldname': 'html',
'oldfieldtype': 'Text Editor',
'options': '',
'owner': 'Administrator',
'parent': 'Print Format',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': '',
'width': ''
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-09-23 16:21:55',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'standard',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Standard',
'modified': '2009-11-25 10:15:16',
'modified_by': 'Administrator',
'name': '_FL00318',
'no_copy': None,
'oldfieldname': 'standard',
'oldfieldtype': 'Select',
'options': '\nYes\nNo',
'owner': 'Administrator',
'parent': 'Print Format',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': 1,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/profile/__init__.py Прегледај датотеку


+ 26
- 0
cgi-bin/core/doctype/profile/profile.js Прегледај датотеку

@@ -0,0 +1,26 @@
cur_frm.cscript['Change Password']= function(doc, cdt, cdn) {
var error = false;
if ((!doc.new_password)||(!doc.retype_new_password)){
alert("Both fields are required!");
error = true;
}
if (doc.new_password.length<4) {
alert("Password must be atleast 4 characters long");
error = true;
}
if(doc.new_password!=doc.retype_new_password) {
alert("Passwords must match");
error = true;
}
if(!error) {
cur_frm.runscript('update_password', '', function(r,t) {
doc.new_password = '';
doc.retype_new_password = '';
});
}
}

cur_frm.cscript.validate = function(doc, cdt, cdn) {
doc.new_password = '';
doc.retype_new_password = '';
}

+ 48
- 0
cgi-bin/core/doctype/profile/profile.py Прегледај датотеку

@@ -0,0 +1,48 @@
# Please edit this list and import only required elements
import webnotes

from webnotes import msgprint

sql = webnotes.conn.sql
# -----------------------------------------------------------------------------------------

class DocType:
def __init__(self, doc, doclist):
self.doc = doc
self.doclist = doclist
# Autoname is Email id
# --------------------

def autoname(self):
import re
from webnotes.utils import validate_email_add

self.doc.email = self.doc.email.strip()
if self.doc.name not in ('Guest','Administrator'):
if not validate_email_add(self.doc.email):
msgprint("%s is not a valid email id" % self.doc.email)
raise Exception
self.doc.name = self.doc.email
def on_update(self):
# owner is always name
if not self.doc.password:
webnotes.conn.set(self.doc, 'password' ,'password')
webnotes.conn.set(self.doc, 'owner' ,self.doc.name)


def update_password(self):
from webnotes.utils.email_lib import sendmail
s
sql("UPDATE `tabProfile` SET password=PASSWORD(%s) where name=%s", (self.doc.new_password, self.doc.name))
email_text = '''%s,
Your password has been changed.
- Administrator
''' % self.doc.name
sendmail([self.doc.email], subject='Change of Password Notification', parts = [('text/plain', email_text)])
msgprint("Your password has been changed")

+ 2003
- 0
cgi-bin/core/doctype/profile/profile.txt
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 0
- 0
cgi-bin/core/doctype/property_setter/__init__.py Прегледај датотеку


+ 8
- 0
cgi-bin/core/doctype/property_setter/property_setter.comp.js Прегледај датотеку

@@ -0,0 +1,8 @@

$.extend(cur_frm.cscript,{onload:function(doc,dt,dn){cur_frm.cscript.do_setup(doc);},doctype_or_field:function(doc,dt,dn){doc.doc_type=doc.select_item=doc.doc_name=doc.select_doctype='';refresh_many(['doc_type','select_item','doc_name','select_doctype'])},do_setup:function(doc){$c_obj([doc],'get_setup_data','',function(r,rt){var r=r.message;cur_frm.cscript.set_doctypes(r.doctypes);cur_frm.dt_properties={};cur_frm.df_properties={};for(var i=0;i<r.dt_properties.length;i++)
cur_frm.dt_properties[r.dt_properties[i].label]=r.dt_properties[i];for(var i=0;i<r.df_properties.length;i++)
cur_frm.df_properties[r.df_properties[i].label]=r.df_properties[i];if(doc.property){}});},set_doctypes:function(r){var dtl=[];for(var i=0;i<r.length;i++)
dtl.push(get_doctype_label(r[i]))
set_field_options('select_doctype','\n'+dtl.sort().join('\n'))},select_doctype:function(doc,dt,dn){doc.doc_type=get_label_doctype(doc.select_doctype);refresh_field('doc_type');if(doc.doctype_or_field=='DocField')
cur_frm.cscript.set_field_ids(doc);else{doc.doc_name=get_label_doctype(doc.select_doctype);refresh_field('doc_name');cur_frm.cscript.set_properties('DocType')}},set_field_ids:function(doc){$c_obj([doc],'get_field_ids','',function(r,rt){var fl=[];cur_frm.field_id_list=[];for(var i=0;i<r.message.length;i++){var f=r.message[i];fl.push(i+1+'-'+f.label+' ('+f.fieldtype+')');cur_frm.field_id_list.push(f);}
set_field_options('select_item','\n'+fl.join('\n'))});},select_item:function(doc,dt,dn){doc.doc_name=cur_frm.field_id_list[cint(doc.select_item.split('-')[0])-1].name;refresh_many(['doc_name']);cur_frm.cscript.set_properties('DocField');},set_properties:function(dt_or_df){var d=cur_frm[(dt_or_df=='DocType'?'dt_properties':'df_properties')];set_field_options('select_property','\n'+keys(d).sort().join('\n'));doc.property=doc.property_type=doc.default_value='';refresh_many(['property','property_type','default_value']);cur_frm.cscript.load_defaults();},load_defaults:function(){$c_obj([locals[cur_frm.doctype][cur_frm.docname]],'get_defaults','',function(r,rt){cur_frm.ps_doc=r.message;});},select_property:function(doc,dt,dn){var d=cur_frm[(doc.doctype_or_field=='DocType'?'dt_properties':'df_properties')];doc.property=d[doc.select_property].fieldname;doc.property_type=d[doc.select_property].fieldtype;doc.default_value=cstr(cur_frm.ps_doc[doc.property]);refresh_many(['property','property_type','default_value']);},validate:function(doc){if(doc.property_type=='Check'&&!in_list(['0','1'],doc.value)){msgprint('Value for a check field can be either 0 or 1');validated=false;}}})

+ 109
- 0
cgi-bin/core/doctype/property_setter/property_setter.js Прегледај датотеку

@@ -0,0 +1,109 @@
$.extend(cur_frm.cscript, {
onload: function(doc, dt, dn) {
cur_frm.cscript.do_setup(doc);
},
doctype_or_field: function(doc, dt, dn) {
doc.doc_type = doc.select_item = doc.doc_name = doc.select_doctype = '';
refresh_many(['doc_type', 'select_item', 'doc_name', 'select_doctype'])
},
// set doctypes with label
do_setup: function(doc) {
$c_obj([doc], 'get_setup_data', '', function(r,rt) {
var r = r.message;
cur_frm.cscript.set_doctypes(r.doctypes);

// load properties in dictionaries
cur_frm.dt_properties = {}; cur_frm.df_properties = {};
for(var i=0; i<r.dt_properties.length; i++)
cur_frm.dt_properties[r.dt_properties[i].label] = r.dt_properties[i];

for(var i=0; i<r.df_properties.length; i++)
cur_frm.df_properties[r.df_properties[i].label] = r.df_properties[i];

if(doc.property) {
}

});
},
set_doctypes: function(r) {
var dtl = [];
for(var i=0; i<r.length; i++)
dtl.push(get_doctype_label(r[i]))
set_field_options('select_doctype', '\n'+dtl.sort().join('\n'))
},
// doctype trigger
select_doctype: function(doc, dt, dn) {
doc.doc_type = get_label_doctype(doc.select_doctype);
refresh_field('doc_type');
if(doc.doctype_or_field=='DocField')
cur_frm.cscript.set_field_ids(doc);
else {
// for doctype - the docname = doctype
doc.doc_name = get_label_doctype(doc.select_doctype);
refresh_field('doc_name');
cur_frm.cscript.set_properties('DocType')
}
},
// load fields for this doctype
set_field_ids: function(doc) {
$c_obj([doc], 'get_field_ids', '', function(r,rt) {
var fl = [];
cur_frm.field_id_list = [];
for(var i=0; i<r.message.length; i++) {
var f = r.message[i];
fl.push(i + 1 + '-' + f.label + ' (' + f.fieldtype + ')');
cur_frm.field_id_list.push(f);
}
set_field_options('select_item', '\n'+fl.join('\n'))
});
},
// set field id
select_item: function(doc,dt,dn) {
doc.doc_name = cur_frm.field_id_list[cint(doc.select_item.split('-')[0])-1].name;
refresh_many(['doc_name']);
cur_frm.cscript.set_properties('DocField');
},
// set properties
set_properties: function(dt_or_df) {
var d = cur_frm[(dt_or_df=='DocType' ? 'dt_properties' : 'df_properties')];
set_field_options('select_property', '\n'+keys(d).sort().join('\n'));

// cleanup
doc.property = doc.property_type = doc.default_value = '';
refresh_many(['property', 'property_type', 'default_value']);
cur_frm.cscript.load_defaults();
},
load_defaults: function() {
$c_obj([locals[cur_frm.doctype][cur_frm.docname]], 'get_defaults', '', function(r,rt) {
cur_frm.ps_doc = r.message;
});
},
select_property: function(doc, dt, dn) {
var d = cur_frm[(doc.doctype_or_field=='DocType' ? 'dt_properties' : 'df_properties')];
doc.property = d[doc.select_property].fieldname;
doc.property_type = d[doc.select_property].fieldtype;
doc.default_value = cstr(cur_frm.ps_doc[doc.property]);
refresh_many(['property', 'property_type', 'default_value']);
},
validate: function(doc) {
if(doc.property_type=='Check' && !in_list(['0','1'], doc.value)) {
msgprint('Value for a check field can be either 0 or 1');
validated = false;
}
}
})

+ 29
- 0
cgi-bin/core/doctype/property_setter/property_setter.py Прегледај датотеку

@@ -0,0 +1,29 @@
import webnotes

class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
def get_property_list(self, dt):
return webnotes.conn.sql("""select fieldname, label, fieldtype
from tabDocField
where parent=%s
and fieldtype not in ('Section Break', 'Column Break', 'HTML', 'Read Only', 'Table')
and ifnull(fieldname, '') != ''
order by label asc""", dt, as_dict=1)
def get_setup_data(self):
return {
'doctypes': [d[0] for d in webnotes.conn.sql("select name from tabDocType")],
'dt_properties': self.get_property_list('DocType'),
'df_properties': self.get_property_list('DocField')
}
def get_field_ids(self):
return webnotes.conn.sql("select name, fieldtype, label, fieldname from tabDocField where parent=%s", self.doc.doc_type, as_dict = 1)
def get_defaults(self):
if self.doc.doc_type == self.doc.doc_name:
return webnotes.conn.sql("select * from `tabDocType` where name=%s", self.doc.doc_name, as_dict = 1)[0]
else:
return webnotes.conn.sql("select * from `tabDocField` where name=%s", self.doc.doc_name, as_dict = 1)[0]

+ 500
- 0
cgi-bin/core/doctype/property_setter/property_setter.txt Прегледај датотеку

@@ -0,0 +1,500 @@
[
{
'_last_update': '1304683399',
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': 0,
'allow_rename': None,
'allow_trash': 1,
'autoname': "eval:doc.select_doctype + '-' + (doc.select_item or doc.doc_name) + '-' + doc.property",
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2011-05-05 11:54:07',
'description': 'Property Setter overrides a standard DocType or Field property',
'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-05-18 15:36:45',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Property Setter',
'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': 'doc_name,property',
'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': '<b>%(property)s</b> property of %(doc_type)s %(doc_name)s',
'tag_fields': 'property',
'use_template': None,
'version': 33
},
{
'amend': None,
'cancel': 1,
'create': 1,
'creation': '2011-05-05 11:58:33',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000700',
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Administrator',
'submit': None,
'write': 1
},
{
'amend': None,
'cancel': 1,
'create': 1,
'creation': '2011-05-05 11:58:33',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 2,
'match': None,
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000701',
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'System Manager',
'submit': None,
'write': 1
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-05 13:25:40',
'default': None,
'depends_on': 'eval:doc.__islocal',
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'doctype_or_field',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'DocType or Field',
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000704',
'no_column': 0,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': '\nDocField\nDocType',
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-05 14:11:44',
'default': None,
'depends_on': 'eval:doc.doctype_or_field && doc.__islocal',
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'select_doctype',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Select DocType',
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000706',
'no_column': 0,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-05 13:09:45',
'default': None,
'depends_on': "eval:doc.doctype_or_field=='DocField' && doc.__islocal",
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'select_item',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Select Field',
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000703',
'no_column': 0,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': 0,
'colour': None,
'creation': '2011-05-06 17:22:25',
'default': None,
'depends_on': 'eval:doc.doctype_or_field && doc.__islocal',
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'select_property',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Select Property',
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000708',
'no_column': 0,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-05 11:54:08',
'default': None,
'depends_on': 'doc_name',
'description': 'New value to be set',
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'value',
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 5,
'in_filter': None,
'label': 'Set Value',
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000699',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-05 16:26:47',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 6,
'in_filter': None,
'label': None,
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000707',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': 0,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-05 11:54:08',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'doc_type',
'fieldtype': 'Read Only',
'hidden': None,
'icon': None,
'idx': 7,
'in_filter': 0,
'label': 'DocType',
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000695',
'no_column': 0,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-05 11:54:08',
'default': None,
'depends_on': "eval:doc.doctype_or_field=='DocField'",
'description': 'ID (name) of the entity whose property is to be set',
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'doc_name',
'fieldtype': 'Read Only',
'hidden': None,
'icon': None,
'idx': 8,
'in_filter': 0,
'label': 'Field ID',
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000696',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-05 11:54:08',
'default': None,
'depends_on': 'eval:doc.doc_name && doc.__islocal',
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'property',
'fieldtype': 'Read Only',
'hidden': None,
'icon': None,
'idx': 9,
'in_filter': 0,
'label': 'Property',
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000697',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': 1,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-05 12:38:01',
'default': None,
'depends_on': 'doc_name',
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'property_type',
'fieldtype': 'Read Only',
'hidden': None,
'icon': None,
'idx': 10,
'in_filter': None,
'label': 'Property Type',
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000702',
'no_column': 0,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-05 11:54:08',
'default': None,
'depends_on': 'doc_name',
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'default_value',
'fieldtype': 'Read Only',
'hidden': None,
'icon': None,
'idx': 11,
'in_filter': None,
'label': 'Default Value',
'modified': '2011-05-18 15:36:45',
'modified_by': 'Administrator',
'name': '000000698',
'no_column': 0,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Property Setter',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/role/__init__.py Прегледај датотеку


+ 183
- 0
cgi-bin/core/doctype/role/role.txt Прегледај датотеку

@@ -0,0 +1,183 @@
[
{
'allow_attach': None,
'allow_copy': 0,
'allow_email': 0,
'allow_print': 0,
'allow_rename': None,
'allow_trash': None,
'autoname': 'field:role_name',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2009-05-12 11:19:11',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': 0,
'hide_toolbar': 0,
'idx': 0,
'in_create': None,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': 0,
'istable': 0,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Role',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': 0,
'read_only_onload': None,
'search_fields': None,
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': 1
},
{
'amend': None,
'cancel': 0,
'create': 1,
'creation': '2009-05-12 11:19:22',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': 0,
'idx': 1,
'match': '',
'modified': '2009-06-30 16:20:34',
'modified_by': 'Administrator',
'name': '_PERM00014',
'owner': 'Administrator',
'parent': 'Role',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Administrator',
'submit': 0,
'write': 1
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-06-30 16:20:34',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'module',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Module',
'modified': '2011-04-05 10:01:46',
'modified_by': 'Administrator',
'name': '_FL00292',
'no_copy': None,
'oldfieldname': 'module',
'oldfieldtype': 'Select',
'options': 'link:Module Def',
'owner': 'Administrator',
'parent': 'Role',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'role_name',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Role Name',
'modified': '2011-04-05 10:01:46',
'modified_by': 'Administrator',
'name': '_FL00193',
'no_copy': None,
'oldfieldname': 'role_name',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Role',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2009-05-12 11:19:12',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'defaults',
'fieldtype': 'Table',
'hidden': 0,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Defaults',
'modified': '2011-04-05 10:01:46',
'modified_by': 'Administrator',
'name': '_FL00194',
'no_copy': None,
'oldfieldname': 'defaults',
'oldfieldtype': 'Table',
'options': 'DefaultValue',
'owner': 'Administrator',
'parent': 'Role',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': 0,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/search_criteria/__init__.py Прегледај датотеку


+ 71
- 0
cgi-bin/core/doctype/search_criteria/search_criteria.py Прегледај датотеку

@@ -0,0 +1,71 @@
# Please edit this list and import only required elements
import webnotes
from webnotes.utils import cint

sql = webnotes.conn.sql

# -----------------------------------------------------------------------------------------

class DocType:
def __init__(self,d,dl):
self.doc, self.doclist = d,dl

def autoname(self):
self.doc.name = self.doc.criteria_name.lower().replace('(','').replace(')', '')\
.replace('.','').replace(',','').replace('"', '').replace("'",'').replace(' ', '_')\
.replace('/', '-')
# for duplicates
if sql("select name from `tabSearch Criteria` where name = %s", self.doc.name):
m = sql("select name from `tabSearch Criteria` where name like '%s%%' order by name desc limit 1" % self.doc.name)[0][0]
self.doc.name = self.doc.name + str(cint(m[-1]) + 1)

def set_module(self):
if not self.doc.module:
doctype_module = sql("select module from tabDocType where name = '%s'" % (self.doc.doc_type))
webnotes.conn.set(self.doc,'module',doctype_module and doctype_module[0][0] or 'NULL')

def on_update(self):
self.set_module()
self.export_doc()
def export_doc(self):
# export
if self.doc.standard == 'Yes' and getattr(webnotes.defs, 'developer_mode', 0) == 1:
from webnotes.modules.export_module import export_to_files
export_to_files(record_list=[['Search Criteria', self.doc.name]])

# patch to rename search criteria from old style numerical to
# new style based on criteria name
def rename(self):
old_name = self.doc.name
if not self.doc.module:
self.set_module()
self.autoname()
sql("update `tabSearch Criteria` set name=%s where name=%s", (self.doc.name, old_name))
def rename_export(self, old_name):
# export the folders
self.export_doc()
import os, shutil
from webnotes.modules import get_module_path, scrub
path = os.path.join(get_module_path(self.doc.module), 'search_criteria', scrub(old_name))
# copy py/js files
self.copy_file(path, scrub(old_name), '.py')
self.copy_file(path, scrub(old_name), '.js')
self.copy_file(path, scrub(old_name), '.sql')
def copy_file(self, path, old_name, extn):
import os
from webnotes.modules import get_module_path, scrub

if os.path.exists(os.path.join(path, old_name + extn)):
os.system('cp %s %s' % (os.path.join(path, old_name + extn), \
os.path.join(get_module_path(self.doc.module), 'search_criteria', scrub(self.doc.name), scrub(self.doc.name) + extn)))

+ 1092
- 0
cgi-bin/core/doctype/search_criteria/search_criteria.txt
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 0
- 0
cgi-bin/core/doctype/stylesheet/__init__.py Прегледај датотеку


+ 18
- 0
cgi-bin/core/doctype/stylesheet/stylesheet.py Прегледај датотеку

@@ -0,0 +1,18 @@
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d,dl

# export
def on_update(self):
import webnotes.defs
if hasattr(webnotes.defs, 'developer_mode') and webnotes.defs.developer_mode:
from webnotes.modules.export_module import export_to_files
from webnotes.modules import get_module_path, scurb
import os
export_to_files(record_list=[['Stylesheet', self.doc.name]])

file = open(os.path.join(get_module_path(self.doc.module), 'Stylesheet', scrub(self.doc.name), scrub(self.doc.name) + '.html'), 'w')
file.write(self.doc.content)
file.close()

+ 160
- 0
cgi-bin/core/doctype/stylesheet/stylesheet.txt Прегледај датотеку

@@ -0,0 +1,160 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'field:stylesheet_name',
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2011-04-05 10:01:46',
'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': None,
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2011-02-21 17:10:05',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Stylesheet',
'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': None,
'smallicon': None,
'use_template': None,
'version': 4
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 10:01:46',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'stylesheet_name',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Stylesheet Name',
'modified': '2011-04-05 10:01:46',
'modified_by': 'Administrator',
'name': '000000459',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Stylesheet',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 10:01:46',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'module',
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Module',
'modified': '2011-04-05 10:01:46',
'modified_by': 'Administrator',
'name': '000000460',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': 'Module Def',
'owner': 'Administrator',
'parent': 'Stylesheet',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 10:01:46',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'stylesheet',
'fieldtype': 'Code',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Stylesheet',
'modified': '2011-04-05 10:01:46',
'modified_by': 'Administrator',
'name': '000000461',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Stylesheet',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/system_console/__init__.py Прегледај датотеку


+ 8
- 0
cgi-bin/core/doctype/system_console/system_console.comp.js Прегледај датотеку

@@ -0,0 +1,8 @@

cur_frm.cscript['Server (Python)']=function(doc,dt,dn){$c_obj([doc],'execute_server','',function(r,rt){doc=locals[doc.doctype][doc.name];if(r.exc){doc.response=r.exc;}else{doc.response='Worked!'}
refresh_field('response');})}
cur_frm.cscript['Client (JS)']=function(doc,dt,dn){try{doc.response=eval(doc.script);}catch(e){doc.response=e.toString()
+'\nMessage:'+e.message
+'\nLine Number:'+e.lineNumber
+'\nStack:'+e.stack;}
refresh_field('response');}

+ 23
- 0
cgi-bin/core/doctype/system_console/system_console.js Прегледај датотеку

@@ -0,0 +1,23 @@
cur_frm.cscript['Server (Python)'] = function(doc, dt, dn) {
$c_obj([doc], 'execute_server', '', function(r, rt) {
doc = locals[doc.doctype][doc.name];
if(r.exc) {
doc.response = r.exc;
} else {
doc.response = 'Worked!'
}
refresh_field('response');
})
}

cur_frm.cscript['Client (JS)'] = function(doc, dt, dn) {
try {
doc.response = eval(doc.script);
} catch(e) {
doc.response = e.toString()
+ '\nMessage:' + e.message
+ '\nLine Number:' + e.lineNumber
+ '\nStack:' + e.stack;
}
refresh_field('response');
}

+ 17
- 0
cgi-bin/core/doctype/system_console/system_console.py Прегледај датотеку

@@ -0,0 +1,17 @@
import webnotes

from webnotes.utils import cint, flt
from webnotes.model.doc import Document
from webnotes.model.code import get_obj
from webnotes import session, msgprint, errprint

sql = webnotes.conn.sql

class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl

def execute_server(self, arg=''):
if webnotes.user.name=='Guest':
raise Exception, 'Guest cannot call execute test!'
exec(self.doc.script)

+ 242
- 0
cgi-bin/core/doctype/system_console/system_console.txt Прегледај датотеку

@@ -0,0 +1,242 @@
[
{
'_last_update': '1303450387',
'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': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2011-05-09 10:50:36',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': 'System',
'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-04-22 13:12:21',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'System Console',
'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': 1,
'smallicon': None,
'use_template': None,
'version': 6
},
{
'amend': None,
'cancel': None,
'create': 1,
'creation': '2011-05-09 10:50:36',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2011-05-09 10:50:36',
'modified_by': 'Administrator',
'name': '000000145',
'owner': 'Administrator',
'parent': 'System Console',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Administrator',
'submit': None,
'write': 1
},
{
'amend': None,
'cancel': None,
'create': None,
'creation': '2011-05-09 10:50:36',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 2,
'match': None,
'modified': '2011-05-09 10:50:36',
'modified_by': 'Administrator',
'name': '000000146',
'owner': 'Administrator',
'parent': 'System Console',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 1,
'read': 1,
'role': 'Administrator',
'submit': None,
'write': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 10:50:36',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'script',
'fieldtype': 'Code',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Script',
'modified': '2011-05-09 10:50:36',
'modified_by': 'Administrator',
'name': '000000147',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'System Console',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-09 10:50:36',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Button',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Server (Python)',
'modified': '2011-05-09 10:50:36',
'modified_by': 'Administrator',
'name': '000000148',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'System Console',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': 'Client',
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-09 10:50:36',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Button',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'Client (JS)',
'modified': '2011-05-09 10:50:36',
'modified_by': 'Administrator',
'name': '000000149',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'System Console',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': 'Client',
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 10:50:36',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'response',
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Error',
'modified': '2011-05-09 10:50:36',
'modified_by': 'Administrator',
'name': '000000150',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'System Console',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 1,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/table_mapper_detail/__init__.py Прегледај датотеку


+ 335
- 0
cgi-bin/core/doctype/table_mapper_detail/table_mapper_detail.txt Прегледај датотеку

@@ -0,0 +1,335 @@
[
{
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
'allow_print': None,
'allow_rename': None,
'allow_trash': None,
'autoname': 'TMD/.#######',
'change_log': None,
'client_script': '',
'client_script_core': '',
'client_string': None,
'colour': 'White:FFF',
'creation': '2010-11-30 17:30:05',
'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': None,
'istable': 1,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Table Mapper Detail',
'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,
'section_style': 'Tray',
'server_code': '',
'server_code_compiled': None,
'server_code_core': '',
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': '',
'use_template': None,
'version': 5
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:05',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'from_table',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'From Table',
'modified': '2010-11-30 17:30:05',
'modified_by': 'Administrator',
'name': '_FL00587',
'no_copy': None,
'oldfieldname': 'from_table',
'oldfieldtype': 'Select',
'options': 'link:DocType',
'owner': 'Administrator',
'parent': 'Table Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': '140px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:05',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'to_table',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'To Table',
'modified': '2010-11-30 17:30:05',
'modified_by': 'Administrator',
'name': '_FL00588',
'no_copy': None,
'oldfieldname': 'to_table',
'oldfieldtype': 'Select',
'options': 'link:DocType',
'owner': 'Administrator',
'parent': 'Table Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': '140px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:05',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'from_field',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'From Field',
'modified': '2010-11-30 17:30:05',
'modified_by': 'Administrator',
'name': '_FL00589',
'no_copy': None,
'oldfieldname': 'from_field',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Table Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '140px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:05',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'to_field',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'To Field',
'modified': '2010-11-30 17:30:05',
'modified_by': 'Administrator',
'name': '_FL00590',
'no_copy': None,
'oldfieldname': 'to_field',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Table Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': '140px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:05',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'match_id',
'fieldtype': 'Int',
'hidden': None,
'icon': None,
'idx': 5,
'in_filter': None,
'label': 'Match Id',
'modified': '2010-11-30 17:30:05',
'modified_by': 'Administrator',
'name': '_FL00591',
'no_copy': None,
'oldfieldname': 'match_id',
'oldfieldtype': 'Int',
'options': None,
'owner': 'Administrator',
'parent': 'Table Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 0,
'search_index': None,
'trigger': None,
'width': '60px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:05',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'validation_logic',
'fieldtype': 'Small Text',
'hidden': None,
'icon': None,
'idx': 6,
'in_filter': None,
'label': 'Validation Logic',
'modified': '2010-11-30 17:30:05',
'modified_by': 'Administrator',
'name': '_FL00592',
'no_copy': None,
'oldfieldname': 'validation_logic',
'oldfieldtype': 'Small Text',
'options': None,
'owner': 'Administrator',
'parent': 'Table Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': '150px'
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:06',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'reference_doctype_key',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 7,
'in_filter': None,
'label': 'Reference DocType Key',
'modified': '2010-11-30 17:30:06',
'modified_by': 'Administrator',
'name': '_FL00593',
'no_copy': None,
'oldfieldname': 'reference_doctype_key',
'oldfieldtype': 'Data',
'options': None,
'owner': 'nabin@webnotestech.com',
'parent': 'Table Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': ''
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-11-30 17:30:06',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'reference_key',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 8,
'in_filter': None,
'label': 'Reference Docname Key',
'modified': '2010-11-30 17:30:06',
'modified_by': 'Administrator',
'name': '_FL00594',
'no_copy': None,
'oldfieldname': 'reference_key',
'oldfieldtype': 'Data',
'options': None,
'owner': 'nabin@webnotestech.com',
'parent': 'Table Mapper Detail',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

+ 0
- 0
cgi-bin/core/doctype/tag/__init__.py Прегледај датотеку


+ 90
- 0
cgi-bin/core/doctype/tag/tag.txt Прегледај датотеку

@@ -0,0 +1,90 @@
[
{
'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': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2010-08-08 17:09:26',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': None,
'hide_toolbar': None,
'idx': None,
'in_create': 1,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': None,
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2011-04-06 10:36:05',
'modified_by': 'Administrator',
'module': 'Core',
'name': 'Tag',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': 1,
'read_only_onload': None,
'search_fields': None,
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'use_template': None,
'version': 7
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-06 10:35:22',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'tag_color',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Tag Color',
'modified': '2011-04-06 10:36:05',
'modified_by': 'Administrator',
'name': '000000467',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Tag',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

Неке датотеке нису приказане због велике количине промена

Loading…
Откажи
Сачувај