Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_workflow
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenjie.zheng
erp5_workflow
Commits
7ef91299
Commit
7ef91299
authored
Oct 30, 2015
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: ERP5Site_checkNamingConventions, last version's code with compatibility modification.
parent
6740ff0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.xml
...ortal_skins/erp5_core/ERP5Site_checkNamingConventions.xml
+17
-9
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.xml
View file @
7ef91299
...
...
@@ -64,12 +64,11 @@
# - Check script names (from skin folders and workflows).\n
import re\n
ABBREVIATION_WORD_SET = ((\n
"BBAN", "BIC", "BOM", "CAD", "CRM", "CSV", "CTX", "DMS", "EAN", "ERP5",\n
"FAX", "GAP", "HTML", "IBAN", "ID", "KM", "MIME", "NVP", "ODT", "PDF",\n
"PDM", "PO", "RAM", "RSS", "SMS", "SQL", "SVN", "TALES", "TSV", "UBM",\n
"UID", "UOM", "URI", "URL", "VADS", "VAT", "VCS", "VPN", "ZODB",\n
"DNS", "IP", "CSS", "IMAP", "XML", "GPG", "GID", "TCP", "SOAP", "MRP",\n
"UNG", "BT", "BT5",\n
"BBAN", "BIC", "BOM", "BT", "BT5", "CAD", "CRM", "CSS","CSV", "CTX", "DMS", "DNS", \n
"EAN", "ERP5", "FAX", "GAP","GID", "GPG", "HTML", "HTTP", "IBAN", "ID",\n
"IMAP", "IP", "KM", "MIME", "MRP", "NVP", "ODT", "PDF", "PDM", "PO",\n
"RAM", "RSS", "SMS", "SOAP", "SQL", "SVN", "TALES", "TCP", "TSV", "UBM",\n
"UID", "UNG", "UOM", "URI", "URL", "VADS", "VAT", "VCS", "VPN", "XML", "ZODB",\n
))\n
\n
# List of words that do not need to be titlecased\n
...
...
@@ -125,13 +124,17 @@ def checkField(folder, form, field):\n
path = folder.id + \'/\' + form.id\n
error_message = checkTitle(path, field.id, field.title(), field)\n
template_field = getFieldFromProxyField(field)\n
if path.endswith("FieldLibrary"):\n
if not(template_field is field):\n
if not(1 in [field.id.startswith(x) for x in (\'my_view_mode\',\n
\'my_core_mode_\', \'my_report_mode_\', \'my_list_mode_\', \'my_dialog_mode_\')]):\n
error_message += "%s: %s : Bad ID for a Field Library Field" %(path, field.id)\n
if template_field is None:\n
if field.get_value(\'enabled\'):\n
error_message += "Could not get a field from a proxy field %s" % field.id\n
else:\n
if template_field.meta_type == \'ListBox\':\n
a = template_field.getListMethodName()\n
if isListBox(field):\n
a = template_field.getListMethodName()\n
path += \'/listbox\'\n
for x in \'columns\', \'all_columns\':\n
for id, title in field.get_value(x):\n
...
...
@@ -212,6 +215,9 @@ for folder in context.portal_skins.objectValues(spec=(\'Folder\',)):\n
message = checkTitle(\'/\'.join([folder.id, form.id]), \'Title of the Form itself\', form.title)\n
if message:\n
message_list.append(message)\n
if form.id.endswith("FieldLibrary"):\n
if not(form.id.startswith("Base_")):\n
message_list.append("%s/%s : Bad Form ID for a Field Library Form" % (folder.id, form.id))\n
for group in form.get_groups():\n
if group == \'hidden\':\n
continue\n
...
...
@@ -265,6 +271,8 @@ for ptype in context.portal_types.objectValues():\n
if message:\n
message_list.append(message)\n
\n
if batch_mode:\n
return message_list\n
if message_list:\n
return ("%d problems found:\\n\\n" % len(message_list)) + \'\\n\'.join(message_list)\n
return "OK"\n
...
...
@@ -274,7 +282,7 @@ return "OK"\n
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
batch_mode=False
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment