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
78a30a14
Commit
78a30a14
authored
Aug 01, 2018
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: add start/stop date and source on reports
parent
894296a8
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
72 additions
and
16 deletions
+72
-16
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_exportAsReport.py
...rtal_skins/erp5_corporate_identity/Base_exportAsReport.py
+7
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_exportAsReport.xml
...tal_skins/erp5_corporate_identity/Base_exportAsReport.xml
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_printAsReport.py
...ortal_skins/erp5_corporate_identity/Base_printAsReport.py
+7
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_printAsReport.xml
...rtal_skins/erp5_corporate_identity/Base_printAsReport.xml
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_updateReportDialog.py
..._skins/erp5_corporate_identity/Base_updateReportDialog.py
+7
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_updateReportDialog.xml
...skins/erp5_corporate_identity/Base_updateReportDialog.xml
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsReport.py
...portal_skins/erp5_corporate_identity/Base_viewAsReport.py
+25
-9
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_embedReportDocumentList.py
...rp5_corporate_identity/WebPage_embedReportDocumentList.py
+2
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsLeaflet.py
...al_skins/erp5_corporate_identity/WebPage_viewAsLeaflet.py
+8
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsRelease.py
...al_skins/erp5_corporate_identity/WebPage_viewAsRelease.py
+7
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity_book/WebPage_viewAsWeb.py
...l_skins/erp5_corporate_identity_book/WebPage_viewAsWeb.py
+5
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity_book/WebPage_viewAsWeb.xml
..._skins/erp5_corporate_identity_book/WebPage_viewAsWeb.xml
+1
-1
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_exportAsReport.py
View file @
78a30a14
...
...
@@ -15,6 +15,7 @@ Export WebPage as Report
# document_language: use as document version
# document_reference: use as document reference
# document_title use as document title
# override_source_organisation_title organisation for report header/footer
# override_batch_mode used for tests
#
# document_download: download file directly
...
...
@@ -27,6 +28,9 @@ Export WebPage as Report
# display_depth level of depth to display
# display_milestone show milestones where applicable
#
# start_date start date of the report
# stop_date stop_date of the report
#
# report_name report to generate
# report_title report title
...
...
@@ -44,8 +48,11 @@ return context.Base_viewAsReport(
display_orphan
=
display_orphan
,
display_header
=
display_header
,
display_milestone
=
display_milestone
,
start_date
=
start_date
,
stop_date
=
stop_date
,
report_name
=
report_name
,
report_title
=
report_title
,
batch_mode
=
batch_mode
,
override_source_organisation_title
=
override_source_organisation_title
,
**
kw
)
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_exportAsReport.xml
View file @
78a30a14
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
format=None, batch_mode=None,
display_orphan=None, display_milestone=None, document_save=None, document_download=None, document_language=None, document_reference=None, document_version=None, display_detail=None, display_depth=None, display_comment=None, display_header=None, report_title=None, document_title=None, report_nam
e=None, *args,**kw
</string>
</value>
<value>
<string>
format=None, batch_mode=None,
override_source_organisation_title=None, display_orphan=None, display_milestone=None, document_save=None, document_download=None, document_language=None, document_reference=None, document_version=None, display_detail=None, display_depth=None, display_comment=None, display_header=None, report_title=None, document_title=None, report_name=None, start_date=None, stop_dat
e=None, *args,**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_printAsReport.py
View file @
78a30a14
...
...
@@ -16,6 +16,7 @@ Export WebPage as Report
# document_reference: use as document reference
# document_title use as document title
# override_batch_mode used for tests
# override_source_organisation_title organisation for report header/footer
#
# document_download: download file directly
# document_save: save file in document module
...
...
@@ -27,6 +28,9 @@ Export WebPage as Report
# display_depth level of depth to display
# display_milestone show milestones where applicable
#
# start_date start_date of report
# stop_date stop_date of report
#
# report_name report to generate
# report_title report title
...
...
@@ -46,6 +50,9 @@ return context.Base_viewAsReport(
display_milestone
=
display_milestone
,
report_name
=
report_name
,
report_title
=
report_title
,
start_date
=
start_date
,
stop_date
=
stop_date
,
batch_mode
=
batch_mode
,
override_source_organisation_title
=
override_source_organisation_title
,
**
kw
)
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_printAsReport.xml
View file @
78a30a14
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
format=\'pdf\', batch_mode=None,
document_save=None, display_milestone=None, document_download=None, document_language=None, document_reference=None, document_version=None, display_header=None, display_detail=None, display_comment=None, document_title=None, display_depth=None, report_title=None, display_orphan=None, report_nam
e=None, *args,**kw
</string>
</value>
<value>
<string>
format=\'pdf\', batch_mode=None,
override_source_organisation_title=None, document_save=None, display_milestone=None, document_download=None, document_language=None, document_reference=None, document_version=None, display_header=None, display_detail=None, display_comment=None, document_title=None, display_depth=None, report_title=None, display_orphan=None, report_name=None, start_date=None, stop_dat
e=None, *args,**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_updateReportDialog.py
View file @
78a30a14
...
...
@@ -18,6 +18,7 @@ Update a book report dialog with parameters manually entered
# document_reference: use as document reference
# document_title use as document title
# override_batch_mode used for tests
# override_source_organisation_title organisation for report header/footer
#
# document_download: download file directly
# document_save: save file in document module
...
...
@@ -29,6 +30,9 @@ Update a book report dialog with parameters manually entered
# display_milestone show milestones if applicable
# display_orphan show requirements not covered by task
#
# start_date the start date of a report
# stop_date the stop date of a report
#
# report_name report to generate
# report_title report title
# requirement_relative_url XXX sale order has no direct relation to requirement
...
...
@@ -54,8 +58,11 @@ if dialog_id is not None:
display_comment
=
display_comment
,
display_header
=
display_header
,
display_orphan
=
display_orphan
,
start_date
=
start_date
,
stop_date
=
stop_date
,
report_name
=
report_name
,
report_title
=
report_title
,
override_source_organisation_title
=
override_source_organisation_title
,
requirement_relative_url
=
requirement_relative_url
,
**
kw
)
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_updateReportDialog.xml
View file @
78a30a14
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
dialog_id=None, cancel_url=None,
requirement_relative_url=None, report_name=None, report_title=None, portal_skin=None, display_milestone=None, format=None, display_comment=None, document_title=None, document_save=None, document_download=None, document_language=None, document_version=None, document_reference=None, display_orphan=None, display_detail=None, display_depth=None, display_header=None ,
*args,**kw
</string>
</value>
<value>
<string>
dialog_id=None, cancel_url=None,
override_source_organisation_title=None, requirement_relative_url=None, report_name=None, report_title=None, portal_skin=None, display_milestone=None, format=None, display_comment=None, document_title=None, document_save=None, document_download=None, document_language=None, document_version=None, document_reference=None, display_orphan=None, display_detail=None, display_depth=None, display_header=None, start_date=None, stop_date=None,
*args,**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsReport.py
View file @
78a30a14
...
...
@@ -14,6 +14,8 @@ MAIN FILE: generate report (book header/footer and report content)
# document_language: use as document version
# document_reference: use as document reference
# document_title use as document title
# override_source_organisation organisation for report header/footer
# override_batch_mode used for tests
# ------
# document_download: download file directly (default None)
...
...
@@ -27,6 +29,9 @@ MAIN FILE: generate report (book header/footer and report content)
# display_milestone show associated milestones
# display_orphan show requirements not covered by task/item
# --------
# start_date the start date of the report
# stop_date the stop date of the report
# --------
# report_name report to generate
# report_title report title
...
...
@@ -55,8 +60,12 @@ override_document_title = kw.get('document_title')
override_document_version
=
kw
.
get
(
'document_version'
)
override_document_reference
=
kw
.
get
(
'document_reference'
)
override_document_language
=
kw
.
get
(
'document_language'
)
override_source_organisation_title
=
kw
.
get
(
'override_source_organisation'
,
None
)
override_batch_mode
=
kw
.
get
(
'batch_mode'
)
doc_report_start_date
=
DateTime
(
kw
.
get
(
'start_date'
,
None
)
or
getattr
(
context
.
REQUEST
.
form
,
'start_date'
,
None
)
or
DateTime
(
DateTime
().
year
(),
DateTime
().
month
(),
1
))
doc_report_stop_date
=
DateTime
(
kw
.
get
(
'stop_date'
,
None
)
or
getattr
(
context
.
REQUEST
.
form
,
'stop_date'
,
None
)
or
DateTime
())
doc_report_name
=
kw
.
get
(
'report_name'
)
doc_report_title
=
kw
.
get
(
'report_title'
)
doc_format
=
kw
.
get
(
'format'
)
or
'html'
...
...
@@ -70,15 +79,13 @@ doc_aggregate_list = []
doc_revision
=
"1"
doc_modification_date
=
DateTime
()
doc_language
=
doc
.
getLanguage
()
if
getattr
(
doc
,
'getLanguage'
,
None
)
else
None
doc_reference
=
html_quote
(
override_document_reference
)
if
override_document_reference
else
doc
.
getReference
()
or
blank
doc_short_title
=
html_quote
(
doc_report_title
)
if
doc_report_title
else
doc
.
getShortTitle
()
or
blank
doc_version
=
html_quote
(
override_document_version
)
if
override_document_version
else
getattr
(
doc
,
"version"
,
None
)
or
"001"
doc_title
=
html_quote
(
override_document_title
)
if
override_document_title
else
doc
.
getTitle
()
or
blank
doc_language
=
html_quote
(
override_document_language
)
if
override_document_language
else
doc_language
doc_translated_title
=
translateText
(
doc_report_title
)
if
doc_report_title
else
blank
doc_content
=
doc_report
(
# fallback in case language is still None
if
doc_language
is
None
or
doc_language
==
""
:
doc_language
=
doc_localiser
.
get_selected_language
()
or
doc_localiser
.
get_default_language
()
or
"en"
doc_content
,
report_override_doc_title
,
report_override_doc_subtitle
=
doc_report
(
display_report
=
None
if
doc_embed
else
True
,
format
=
doc_format
,
display_depth
=
doc_display_depth
,
...
...
@@ -89,9 +96,18 @@ doc_content = doc_report(
display_embedded
=
doc_display_embedded
,
display_milestone
=
doc_display_milestone
,
display_orphan
=
doc_display_orphan
,
report_title
=
doc_translated_title
start_date
=
doc_report_start_date
,
stop_date
=
doc_report_stop_date
,
report_title
=
doc_translated_title
,
override_batch_mode
=
override_batch_mode
)
doc_reference
=
html_quote
(
override_document_reference
)
if
override_document_reference
else
doc
.
getReference
()
or
blank
doc_short_title
=
translateText
(
report_override_doc_subtitle
if
report_override_doc_subtitle
else
html_quote
(
doc_report_title
)
if
doc_report_title
else
doc
.
getShortTitle
()
or
blank
)
doc_version
=
html_quote
(
override_document_version
)
if
override_document_version
else
getattr
(
doc
,
"version"
,
None
)
or
"001"
doc_title
=
translateText
(
html_quote
(
override_document_title
)
if
override_document_title
else
report_override_doc_title
if
report_override_doc_title
else
doc
.
getTitle
()
or
blank
)
doc_language
=
html_quote
(
override_document_language
)
if
override_document_language
else
doc_language
# test overrides
if
override_batch_mode
:
doc_modification_date
=
DateTime
(
"1976-11-04"
)
...
...
@@ -111,7 +127,7 @@ doc_theme = doc.Base_getThemeDict(doc_format=doc_format, css_path="template_css/
# --------------------------- Source/Destination -------------------------------
doc_source
=
doc
.
Base_getSourceDict
(
override_source_person_title
=
None
,
override_source_organisation_title
=
Non
e
,
override_source_organisation_title
=
override_source_organisation_titl
e
,
theme_logo_url
=
doc_theme
.
get
(
"theme_logo_url"
,
None
)
)
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_embedReportDocumentList.py
View file @
78a30a14
...
...
@@ -90,6 +90,7 @@ for link in re.findall('([^[]<a.*?</a>[^]])', doc_content):
target_caller
=
getattr
(
target_context
,
report_name
,
None
)
if
target_caller
is
not
None
:
substitution_content
=
target_caller
(
**
link_param_dict
)
doc_content
=
doc_content
.
replace
(
link
,
substitution_content
.
encode
(
"utf-8"
).
strip
())
# Note: switched to report returning a tuple with (content, header-title, header-subtitle)
doc_content
=
doc_content
.
replace
(
link
,
substitution_content
[
0
].
encode
(
"utf-8"
).
strip
())
return
doc_content
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsLeaflet.py
View file @
78a30a14
...
...
@@ -140,7 +140,14 @@ if leaflet_display_side:
leaflet_year
=
leaflet_year
,
leaflet_recycle_url
=
leaflet_recycle_url
)
leaflet_content
=
leaflet_legalese
.
decode
()
+
leaflet_content
.
decode
()
#leaflet_content = leaflet_legalese.decode() + leaflet_content.decode()
if
isinstance
(
leaflet_legalese
,
unicode
):
leaflet_legalese
=
leaflet_legalese
.
encode
(
"UTF-8"
)
if
isinstance
(
leaflet_content
,
unicode
):
leaflet_content
=
leaflet_content
.
encode
(
"UTF-8"
)
leaflet_content
=
leaflet_legalese
+
leaflet_content
# ========================= TRANSFORMATION: book ===============================
# XXX still dirty
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsRelease.py
View file @
78a30a14
...
...
@@ -133,7 +133,13 @@ if release_display_about:
release_contributor_list
=
release
.
Base_getTemplateProxyParameter
(
parameter
=
"author"
),
release_relative_url
=
release_relative_url
,
)
release_content
=
release_content
.
decode
()
+
release_about
.
decode
()
#release_content = release_content.decode() + release_about.decode()
if
isinstance
(
release_content
,
unicode
):
release_content
=
release_content
.
encode
(
"UTF-8"
)
if
isinstance
(
release_about
,
unicode
):
release_about
=
release_about
.
encode
(
"UTF-8"
)
release_content
=
release_content
+
release_about
# ============================= Format: html ===================================
if
release_format
==
"html"
:
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity_book/WebPage_viewAsWeb.py
View file @
78a30a14
...
...
@@ -36,6 +36,9 @@ View WebPage as Book or Report
#
# requirement_relative_url XXX relate sale order to requirement
#
# start_date start date of the report
# stop_date stop date of the report
#
# report_name name of report to call
# report_title title of report
#
...
...
@@ -66,6 +69,8 @@ if context.REQUEST["portal_skin"] == "Report":
display_embedded
=
display_embedded
,
display_milestone
=
display_milestone
,
display_orphan
=
display_orphan
,
start_date
=
start_date
,
stop_date
=
stop_date
,
report_name
=
report_name
,
report_title
=
report_title
,
requirement_relative_url
=
requirement_relative_url
,
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity_book/WebPage_viewAsWeb.xml
View file @
78a30a14
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
format="html", include_content_table=None, display_orphan=None, display_milestone=None, display_embedded=None, requirement_relative_url=None, display_depth=None, include_history_table= None, include_reference_table=None, include_linked_content=None, include_report_content=None, display_svg=None, display_detail=None, display_comment=None, display_header=None, document_download=None, override_document_reference=None, batch_mode=False, document_save=None, document_language=None, document_reference=None, document_version=None, transformation=None, report_title=None, document_title=None, report_name=None, override_document_description=None, override_document_short_title=None, override_document_title=None, override_document_version=None, override_logo_reference=None, override_source_organisation_title=None, override_source_person_title=None, display_sandbox=None, **kw
</string>
</value>
<value>
<string>
format="html", include_content_table=None, display_orphan=None, display_milestone=None, display_embedded=None, requirement_relative_url=None, display_depth=None, include_history_table= None, include_reference_table=None, include_linked_content=None, include_report_content=None, display_svg=None, display_detail=None, display_comment=None, display_header=None, document_download=None, override_document_reference=None, batch_mode=False, document_save=None, document_language=None, document_reference=None, document_version=None, transformation=None, report_title=None, document_title=None, report_name=None, override_document_description=None, override_document_short_title=None, override_document_title=None, override_document_version=None, override_logo_reference=None, override_source_organisation_title=None, override_source_person_title=None, display_sandbox=None,
start_date=None, stop_date=None,
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</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