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
Ludovic Kiefer
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
Expand all
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
This diff is collapsed.
Click to expand it.
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