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
Léo-Paul Géneau
erp5
Commits
ff7ac46e
Commit
ff7ac46e
authored
Aug 19, 2020
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: let user to define header position against to top in pdf
parent
716b8171
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
273 additions
and
5 deletions
+273
-5
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsLetter.py
...portal_skins/erp5_corporate_identity/Base_viewAsLetter.py
+2
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_exportAsLetter.py
...l_skins/erp5_corporate_identity/WebPage_exportAsLetter.py
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_exportAsLetter.xml
..._skins/erp5_corporate_identity/WebPage_exportAsLetter.xml
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_updateLetterDialog.py
...ins/erp5_corporate_identity/WebPage_updateLetterDialog.py
+1
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_updateLetterDialog.xml
...ns/erp5_corporate_identity/WebPage_updateLetterDialog.xml
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsLetter.py
...tal_skins/erp5_corporate_identity/WebPage_viewAsLetter.py
+1
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsLetter.xml
...al_skins/erp5_corporate_identity/WebPage_viewAsLetter.xml
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewExportAsLetterDialog.xml
...5_corporate_identity/WebPage_viewExportAsLetterDialog.xml
+1
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewExportAsLetterDialog/letter_header_margin_to_top.xml
..._viewExportAsLetterDialog/letter_header_margin_to_top.xml
+264
-0
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsLetter.py
View file @
ff7ac46e
...
...
@@ -51,6 +51,7 @@ override_batch_mode = kw.get('batch_mode', None)
destination_position_in_letter
=
kw
.
get
(
'destination_position_in_letter'
,
'right'
)
display_sender_company_above_recipient
=
kw
.
get
(
'display_sender_company_above_recipient'
,
0
)
destination_position_padding_left
=
kw
.
get
(
'destination_position_padding_left'
,
'100px'
)
letter_header_margin_to_top
=
kw
.
get
(
'letter_header_margin_to_top'
)
or
26
# -------------------------- Document Parameters ------------------------------
letter_portal_type
=
letter
.
getPortalType
()
letter_relative_url
=
letter
.
getRelativeUrl
()
...
...
@@ -258,7 +259,7 @@ if letter_format == "pdf":
footer_embedded_html_data
=
letter
.
Base_convertHtmlToSingleFile
(
letter_foot
,
allow_script
=
True
)
pdf_file
=
letter
.
Base_cloudoooDocumentConvert
(
embedded_html_data
,
"html"
,
"pdf"
,
conversion_kw
=
dict
(
encoding
=
"utf8"
,
margin_top
=
26
,
margin_top
=
letter_header_margin_to_top
,
margin_bottom
=
30
,
margin_left
=
0
,
margin_right
=
0
,
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_exportAsLetter.py
View file @
ff7ac46e
...
...
@@ -24,7 +24,6 @@ Export this web page as letter in specified format
# override_destination_organisation_title: override event recipient subordinate
# override_destination_person_title: overide event recipient
# override_date to use instead of current date
return
context
.
WebPage_viewAsLetter
(
format
=
format
,
display_head
=
display_head
,
...
...
@@ -41,5 +40,6 @@ return context.WebPage_viewAsLetter(
destination_position_in_letter
=
destination_position_in_letter
,
display_sender_company_above_recipient
=
display_sender_company_above_recipient
,
destination_position_padding_left
=
destination_position_padding_left
,
letter_header_margin_to_top
=
letter_header_margin_to_top
,
**
kw
)
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_exportAsLetter.xml
View file @
ff7ac46e
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
format="html", display_source_address=None, display_head=1, display_svg=None, batch_mode=False, document_download=None, document_save=None, override_source_organisation_title=None,override_source_person_title=None,override_destination_organisation_title=None,override_destination_person_title=None,override_date=None, destination_position_in_letter = \'right\', display_sender_company_above_recipient=0, destination_position_padding_left=\'100px\',**kw
</string>
</value>
<value>
<string>
format="html", display_source_address=None, display_head=1, display_svg=None, batch_mode=False, document_download=None, document_save=None, override_source_organisation_title=None,override_source_person_title=None,override_destination_organisation_title=None,override_destination_person_title=None,override_date=None, destination_position_in_letter = \'right\', display_sender_company_above_recipient=0, destination_position_padding_left=\'100px\',
letter_header_margin_to_top=26,
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_updateLetterDialog.py
View file @
ff7ac46e
...
...
@@ -48,6 +48,7 @@ if dialog_id is not None:
destination_position_in_letter
=
destination_position_in_letter
,
display_sender_company_above_recipient
=
display_sender_company_above_recipient
,
destination_position_padding_left
=
destination_position_padding_left
,
letter_header_margin_to_top
=
letter_header_margin_to_top
,
**
kw
)
)
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_updateLetterDialog.xml
View file @
ff7ac46e
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
override_source_organisation_title=None, display_source_address=None, display_svg=None,document_download=None, document_save=None, dialog_id=None, cancel_url=None, portal_skin=None,display_head=None, format=None, override_date=None, override_destination_person_title=None, override_source_person_title=None,override_destination_organisation_title=None, destination_position_in_letter = \'right\', display_sender_company_above_recipient=None,destination_position_padding_left=\'100px\',*args,**kw
</string>
</value>
<value>
<string>
override_source_organisation_title=None, display_source_address=None, display_svg=None,document_download=None, document_save=None, dialog_id=None, cancel_url=None, portal_skin=None,display_head=None, format=None, override_date=None, override_destination_person_title=None, override_source_person_title=None,override_destination_organisation_title=None, destination_position_in_letter = \'right\', display_sender_company_above_recipient=None,destination_position_padding_left=\'100px\',
letter_header_margin_to_top=26,
*args,**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsLetter.py
View file @
ff7ac46e
...
...
@@ -40,5 +40,6 @@ return context.Base_viewAsLetter(
destination_position_in_letter
=
destination_position_in_letter
,
display_sender_company_above_recipient
=
display_sender_company_above_recipient
,
destination_position_padding_left
=
destination_position_padding_left
,
letter_header_margin_to_top
=
letter_header_margin_to_top
,
**
kw
)
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsLetter.xml
View file @
ff7ac46e
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
format=None, display_source_address=None, display_head=None, display_svg=None, batch_mode=False, document_download=None, document_save=None, override_source_organisation_title=None,override_source_person_title=None,override_destination_organisation_title=None,override_destination_person_title=None,override_date=None,destination_position_in_letter = \'right\',display_sender_company_above_recipient=0,destination_position_padding_left=\'100px\',**kw
</string>
</value>
<value>
<string>
format=None, display_source_address=None, display_head=None, display_svg=None, batch_mode=False, document_download=None, document_save=None, override_source_organisation_title=None,override_source_person_title=None,override_destination_organisation_title=None,override_destination_person_title=None,override_date=None,destination_position_in_letter = \'right\',display_sender_company_above_recipient=0,destination_position_padding_left=\'100px\',
letter_header_margin_to_top=26,
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewExportAsLetterDialog.xml
View file @
ff7ac46e
...
...
@@ -77,6 +77,7 @@
<string>
format
</string>
<string>
portal_skin
</string>
<string>
display_head
</string>
<string>
letter_header_margin_to_top
</string>
<string>
display_source_address
</string>
<string>
display_sender_company_above_recipient
</string>
<string>
display_svg
</string>
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewExportAsLetterDialog/letter_header_margin_to_top.xml
0 → 100644
View file @
ff7ac46e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"IntegerField"
module=
"Products.Formulator.StandardFields"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
letter_header_margin_to_top
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
<item>
<key>
<string>
integer_out_of_range
</string>
</key>
<value>
<string>
The integer you entered was out of range.
</string>
</value>
</item>
<item>
<key>
<string>
not_integer
</string>
</key>
<value>
<string>
You did not enter an integer.
</string>
</value>
</item>
<item>
<key>
<string>
required_not_found
</string>
</key>
<value>
<string>
Input is required but no input given.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_maxwidth
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
end
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
input_type
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
start
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_maxwidth
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
end
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
input_type
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
start
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string>
26
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_maxwidth
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<int>
20
</int>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
end
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
input_type
</string>
</key>
<value>
<string>
text
</string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
start
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Letter Header Against To Top(only for pdf)
</string>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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