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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
4b789b3d
Commit
4b789b3d
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
e79d31a3
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 @
4b789b3d
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
post
=
state_change
[
'object'
]
portal
=
context
.
getPortalObject
()
portal
=
post
.
getPortalObject
()
module
=
context
.
getParentValue
()
module
=
post
.
getParentValue
()
exportable_post_list
=
portal
.
portal_catalog
(
exportable_post_list
=
portal
.
portal_catalog
(
portal_type
=
pos
t
.
getPortalType
(),
portal_type
=
contex
t
.
getPortalType
(),
parent_uid
=
module
.
getUid
(),
parent_uid
=
module
.
getUid
(),
reference
=
pos
t
.
getReference
(),
reference
=
contex
t
.
getReference
(),
simulation_state
=
[
'exportable'
,
'export_failed'
],
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
:
for
exportable_post
in
exportable_post_list
:
...
...
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/InterfacePost_disallowExportOfSameInterfacePostList.xml
0 → 100644
View file @
4b789b3d
<?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 @
4b789b3d
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 @
4b789b3d
<?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 @
4b789b3d
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 @
4b789b3d
<?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 @
4b789b3d
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 @
4b789b3d
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
unexportExportableLis
t
</string>
</value>
<value>
<string>
afterAllowExpor
t
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_interface_post/WorkflowTemplateItem/portal_workflow/interface_post_workflow/transitions/allow_export.xml
View file @
4b789b3d
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<key>
<string>
after_script_name
</string>
</key>
<value>
<string>
unexportExportableLis
t
</string>
</value>
<value>
<string>
afterAllowExpor
t
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
description
</string>
</key>
<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