Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
6d1515d3
Commit
6d1515d3
authored
Dec 22, 2017
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_interface_post: export automatically posts after set exportable
parent
57d30194
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
208 additions
and
8 deletions
+208
-8
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/InterfacePost_disallowExportOfSameInterfacePostList.py
...st/InterfacePost_disallowExportOfSameInterfacePostList.py
+5
-6
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/InterfacePost_disallowExportOfSameInterfacePostList.xml
...t/InterfacePost_disallowExportOfSameInterfacePostList.xml
+62
-0
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/InterfacePost_exportAfterAllowExport.py
...p5_interface_post/InterfacePost_exportAfterAllowExport.py
+4
-0
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/InterfacePost_exportAfterAllowExport.xml
...5_interface_post/InterfacePost_exportAfterAllowExport.xml
+62
-0
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/InternetMessagePost_export.py
...l_skins/erp5_interface_post/InternetMessagePost_export.py
+4
-0
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/InternetMessagePost_export.xml
..._skins/erp5_interface_post/InternetMessagePost_export.xml
+62
-0
bt5/erp5_interface_post/WorkflowTemplateItem/portal_workflow/interface_post_workflow/scripts/afterAllowExport.py
...kflow/interface_post_workflow/scripts/afterAllowExport.py
+7
-0
bt5/erp5_interface_post/WorkflowTemplateItem/portal_workflow/interface_post_workflow/scripts/afterAllowExport.xml
...flow/interface_post_workflow/scripts/afterAllowExport.xml
+1
-1
bt5/erp5_interface_post/WorkflowTemplateItem/portal_workflow/interface_post_workflow/transitions/allow_export.xml
...flow/interface_post_workflow/transitions/allow_export.xml
+1
-1
No files found.
bt5/erp5_interface_post/
WorkflowTemplateItem/portal_workflow/interface_post_workflow/scripts/unexportExportable
List.py
→
bt5/erp5_interface_post/
SkinTemplateItem/portal_skins/erp5_interface_post/InterfacePost_disallowExportOfSameInterfacePost
List.py
View file @
6d1515d3
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
post
=
state_change
[
'object'
]
portal
=
post
.
getPortalObject
()
module
=
post
.
getParentValue
()
portal
=
context
.
getPortalObject
()
module
=
context
.
getParentValue
()
exportable_post_list
=
portal
.
portal_catalog
(
portal_type
=
pos
t
.
getPortalType
(),
portal_type
=
contex
t
.
getPortalType
(),
parent_uid
=
module
.
getUid
(),
reference
=
pos
t
.
getReference
(),
reference
=
contex
t
.
getReference
(),
simulation_state
=
[
'exportable'
,
'export_failed'
],
query
=
SimpleQuery
(
uid
=
pos
t
.
getUid
(),
comparison_operator
=
"!="
)
query
=
SimpleQuery
(
uid
=
contex
t
.
getUid
(),
comparison_operator
=
"!="
)
)
for
exportable_post
in
exportable_post_list
:
...
...
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/InterfacePost_disallowExportOfSameInterfacePostList.xml
0 → 100644
View file @
6d1515d3
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
InterfacePost_disallowExportOfSameInterfacePostList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/InterfacePost_exportAfterAllowExport.py
0 → 100644
View file @
6d1515d3
post_export_method
=
context
.
getTypeBasedMethod
(
'export'
)
if
post_export_method
is
not
None
:
return
post_export_method
()
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/InterfacePost_exportAfterAllowExport.xml
0 → 100644
View file @
6d1515d3
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
InterfacePost_exportAfterAllowExport
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/InternetMessagePost_export.py
0 → 100644
View file @
6d1515d3
context
.
getPortalObject
().
MailHost
.
send
(
context
.
getData
())
if
context
.
getSimulationState
()
==
'exportable'
:
context
.
export
()
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/InternetMessagePost_export.xml
0 → 100644
View file @
6d1515d3
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
InternetMessagePost_export
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_post/WorkflowTemplateItem/portal_workflow/interface_post_workflow/scripts/afterAllowExport.py
0 → 100644
View file @
6d1515d3
post
=
state_change
[
'object'
]
post
.
activate
(
tag
=
'interface_post_disallow_export'
)
\
.
InterfacePost_disallowExportOfSameInterfacePostList
()
post
.
activate
(
after_tag
=
'interface_post_disallow_export'
)
\
.
InterfacePost_exportAfterAllowExport
()
bt5/erp5_interface_post/WorkflowTemplateItem/portal_workflow/interface_post_workflow/scripts/
unexportExportableLis
t.xml
→
bt5/erp5_interface_post/WorkflowTemplateItem/portal_workflow/interface_post_workflow/scripts/
afterAllowExpor
t.xml
View file @
6d1515d3
...
...
@@ -54,7 +54,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
unexportExportableLis
t
</string>
</value>
<value>
<string>
afterAllowExpor
t
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_interface_post/WorkflowTemplateItem/portal_workflow/interface_post_workflow/transitions/allow_export.xml
View file @
6d1515d3
...
...
@@ -24,7 +24,7 @@
</item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<string>
unexportExportableLis
t
</string>
</value>
<value>
<string>
afterAllowExpor
t
</string>
</value>
</item>
<item>
<key>
<string>
description
</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