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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aurélien Vermylen
erp5
Commits
a391c104
Commit
a391c104
authored
Dec 08, 2017
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: add basic letter support in event module
parent
d2441a3d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
93 additions
and
3 deletions
+93
-3
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getDestinationDict.py
..._skins/erp5_corporate_identity/Base_getDestinationDict.py
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getSourceDict.py
...ortal_skins/erp5_corporate_identity/Base_getSourceDict.py
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Letter_send.py
...eItem/portal_skins/erp5_corporate_identity/Letter_send.py
+26
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Letter_send.xml
...Item/portal_skins/erp5_corporate_identity/Letter_send.xml
+62
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_finishPdfCreation.py
...kins/erp5_corporate_identity/WebPage_finishPdfCreation.py
+2
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity_letter/Letter_viewAsLetter.py
...ins/erp5_corporate_identity_letter/Letter_viewAsLetter.py
+1
-0
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getDestinationDict.py
View file @
a391c104
...
...
@@ -64,6 +64,6 @@ if destination is None:
# destination => event
else
:
destination_uid
=
context
.
restrictedTraverse
(
destination
).
getUid
()
destination
=
getCommonProxyParameter
(
"destination"
,
destination_uid
)
destination
=
getCommonProxyParameter
(
"destination"
,
destination_uid
)
[
0
]
return
destination
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getSourceDict.py
View file @
a391c104
...
...
@@ -31,9 +31,9 @@ def getCommonProxyParameter(my_parameter, my_override_data):
return
commonProxyHandler
(
parameter
=
my_parameter
,
source_data
=
source_data
)
# ------------------------------- Set Source ----------------------------------
source_logo_url
=
None
if
source
is
None
:
contributor_title_string
=
blank
source_logo_url
=
None
source_person
=
None
source_person_list
=
[]
source_organisation
=
None
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Letter_send.py
0 → 100644
View file @
a391c104
"""
================================================================================
Print letter in any of the supported formats
================================================================================
"""
new_skin_name
=
"Letter"
context
.
getPortalObject
().
portal_skins
.
changeSkin
(
new_skin_name
)
if
REQUEST
is
None
:
REQUEST
=
context
.
REQUEST
REQUEST
.
set
(
'portal_skin'
,
new_skin_name
)
return
context
.
Letter_viewAsLetter
(
format
=
format
,
display_head
=
display_head
,
display_svg
=
display_svg
,
display_source_address
=
display_source_address
,
override_source_organisation_title
=
override_source_organisation_title
,
override_source_person_title
=
override_source_person_title
,
override_destination_organisation_title
=
override_destination_organisation_title
,
override_destination_person_title
=
override_destination_person_title
,
override_date
=
override_date
,
document_save
=
document_save
,
document_download
=
document_download
,
batch_mode
=
batch_mode
,
**
kw
)
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Letter_send.xml
0 → 100644
View file @
a391c104
<?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>
REQUEST=None, format="pdf", portal_skin=None, batch_mode=False, display_source_address=None, display_svg=None, display_head=1 ,document_download=None, document_save=1, override_source_organisation_title=None,override_source_person_title=None,override_destination_organisation_title=None,override_destination_person_title=None,override_date=None,**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Letter_send
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_finishPdfCreation.py
View file @
a391c104
...
...
@@ -19,7 +19,8 @@ if doc_save == 1:
source_reference
=
''
.
join
([
doc_reference
,
'.pdf'
]),
file
=
doc_pdf_file
)
#context.setAggregateList((doc_aggregate_list or []) + [doc_relative_url])
context
.
setAggregate
(
document
.
getRelativeUrl
())
message
=
context
.
Base_translateString
(
'%(portal_type)s created successfully as PDF Document.'
%
{
'portal_type'
:
document
.
getTranslatedPortalType
()
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity_letter/Letter_viewAsLetter.py
View file @
a391c104
...
...
@@ -105,6 +105,7 @@ if letter_portal_type == "Web Page":
letter_reference
=
letter
.
getReference
()
letter_version
=
letter
.
getVersion
()
or
"001"
else
:
letter_format
=
'pdf'
letter_save
=
letter_save
or
True
letter_dialog_id
=
None
letter_modification_date
=
letter_form
[
'start_date'
]
or
None
or
letter
.
getCreationDate
()
...
...
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