Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laurent S
erp5
Commits
27e969d3
Commit
27e969d3
authored
Sep 20, 2013
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement consistency checks using dfault script API.
Allow to close a draft position.
parent
5ae77b41
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
17 deletions
+5
-17
bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/scripts/checkConsistency.xml
...l_workflow/position_workflow/scripts/checkConsistency.xml
+2
-16
bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/states/draft.xml
...teItem/portal_workflow/position_workflow/states/draft.xml
+2
-0
bt5/erp5_hr/bt/revision
bt5/erp5_hr/bt/revision
+1
-1
No files found.
bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/scripts/checkConsistency.xml
View file @
27e969d3
...
...
@@ -50,22 +50,8 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
object = state_change[\'object\']\n
N_ = object.Base_translateString\n
\n
check_result = object.checkConsistency()\n
\n
if len(check_result) >
0:\n
check_type = N_(check_result[0][-1])\n
# TODO: use nice url encoding method there instead of replace()\n
check_details = check_result[0][-2].replace(\'
<
\', \'
<
\').replace(\'>\', \'
>
\')\n
raise ValidationFailed, "%s : %s" % (check_type, check_details)\n
]]>
</string>
</value>
<value>
<string>
state_change[\'object\'].Base_checkConsistency()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
...
...
bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/states/draft.xml
View file @
27e969d3
...
...
@@ -28,6 +28,8 @@
<key>
<string>
transitions
</string>
</key>
<value>
<tuple>
<string>
close
</string>
<string>
close_action
</string>
<string>
delete
</string>
<string>
delete_action
</string>
<string>
open
</string>
...
...
bt5/erp5_hr/bt/revision
View file @
27e969d3
18
\ No newline at end of file
19
\ No newline at end of file
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