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
Binh
erp5
Commits
a3ae0d6b
Commit
a3ae0d6b
authored
Sep 20, 2018
by
Sven Franck
Committed by
Xiaowu Zhang
Oct 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: update test files and move to preferences
parent
bd7e8339
Changes
44
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
2125 additions
and
90 deletions
+2125
-90
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference.xml
...l_property_sheets/CorporateIdentityTemplatePreference.xml
+66
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_book_document_prefix_property.xml
...orate_identity_template_book_document_prefix_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_css_color_swatch_property.xml
...corporate_identity_template_css_color_swatch_property.xml
+46
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_bank_account_relative_url_property.xml
...y_template_default_bank_account_relative_url_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_currency_relative_url_property.xml
...ntity_template_default_currency_relative_url_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_logo_prefix_property.xml
...porate_identity_template_default_logo_prefix_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_organisation_registered_court_property.xml
...mplate_default_organisation_registered_court_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_organisation_relative_url_property.xml
...y_template_default_organisation_relative_url_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_theme_font_property.xml
...rporate_identity_template_default_theme_font_property.xml
+46
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_theme_property.xml
...ed_corporate_identity_template_default_theme_property.xml
+40
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_fallback_logo_relative_url_property.xml
...identity_template_fallback_logo_relative_url_property.xml
+40
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_leaflet_document_prefix_property.xml
...te_identity_template_leaflet_document_prefix_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_letter_document_prefix_property.xml
...ate_identity_template_letter_document_prefix_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_release_document_prefix_property.xml
...te_identity_template_release_document_prefix_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_report_css_property.xml
...erred_corporate_identity_template_report_css_property.xml
+46
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_report_document_prefix_property.xml
...ate_identity_template_report_document_prefix_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_report_js_property.xml
...ferred_corporate_identity_template_report_js_property.xml
+46
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_site_registration_miibeian_id_property.xml
...ntity_template_site_registration_miibeian_id_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_site_registration_miibeian_url_property.xml
...tity_template_site_registration_miibeian_url_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_slide_document_prefix_property.xml
...rate_identity_template_slide_document_prefix_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_social_media_handle_facebook_property.xml
...entity_template_social_media_handle_facebook_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_social_media_handle_google_property.xml
...identity_template_social_media_handle_google_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_social_media_handle_twitter_property.xml
...dentity_template_social_media_handle_twitter_property.xml
+42
-0
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_theme_css_relative_url_property.xml
...ate_identity_template_theme_css_relative_url_property.xml
+40
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getSourceDict.py
...ortal_skins/erp5_corporate_identity/Base_getSourceDict.py
+12
-13
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getTemplateParameter.py
...kins/erp5_corporate_identity/Base_getTemplateParameter.py
+10
-59
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getTemplateProxyParameter.py
...erp5_corporate_identity/Base_getTemplateProxyParameter.py
+7
-11
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getThemeDict.py
...portal_skins/erp5_corporate_identity/Base_getThemeDict.py
+1
-4
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsReport.py
...portal_skins/erp5_corporate_identity/Base_viewAsReport.py
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_getDefaultFallbackLogoAbsoluteUrl.py
..._identity/Preference_getDefaultFallbackLogoAbsoluteUrl.py
+21
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_getDefaultFallbackLogoAbsoluteUrl.xml
...identity/Preference_getDefaultFallbackLogoAbsoluteUrl.xml
+62
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_getDefaultOrganisationBankAccountList.py
...ntity/Preference_getDefaultOrganisationBankAccountList.py
+21
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_getDefaultOrganisationBankAccountList.xml
...tity/Preference_getDefaultOrganisationBankAccountList.xml
+62
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_viewCorporateIdentityStyle.xml
...porate_identity/Preference_viewCorporateIdentityStyle.xml
+156
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_viewCorporateIdentityStyle/my_preferred_corporate_identity_template_default_organisation_relative_url.xml
...e_identity_template_default_organisation_relative_url.xml
+123
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_viewCorporateIdentityStyle/my_preferred_corporate_identity_template_default_theme.xml
...y_preferred_corporate_identity_template_default_theme.xml
+108
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_viewCorporateIdentityStyle/my_preferred_corporate_identity_template_fallback_logo_absolute_url.xml
...orporate_identity_template_fallback_logo_absolute_url.xml
+151
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_viewCorporateIdentityStyle/my_preferred_corporate_identity_template_fallback_logo_relative_url.xml
...orporate_identity_template_fallback_logo_relative_url.xml
+112
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_viewCorporateIdentityStyle/my_preferred_corporate_identity_template_theme_css_relative_url.xml
...ed_corporate_identity_template_theme_css_relative_url.xml
+106
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_getPdfOutputRenderingFix.py
...p5_corporate_identity/WebPage_getPdfOutputRenderingFix.py
+65
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_getPdfOutputRenderingFix.xml
...5_corporate_identity/WebPage_getPdfOutputRenderingFix.xml
+62
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_validateImage.py
...al_skins/erp5_corporate_identity/WebPage_validateImage.py
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
...ortal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
+1
-1
bt5/erp5_corporate_identity/bt/template_property_sheet_id_list
...rp5_corporate_identity/bt/template_property_sheet_id_list
+1
-0
No files found.
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Property Sheet"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
CorporateIdentityTemplatePreference
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Sheet
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_book_document_prefix_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Document prefix to use when generating new Book documents.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_book_document_prefix_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_css_color_swatch_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
List of 3 color swatches to be used in (Gantt) report generation.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_css_color_swatch_property
</string>
</value>
</item>
<item>
<key>
<string>
multivalued
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_bank_account_relative_url_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The default bank account of the default organisation used in corporate identity templates.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_default_bank_account_relative_url_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_currency_relative_url_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Default currency symbol to be used on letter footers et al.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_default_currency_relative_url_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_logo_prefix_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Logo prefix to use when loading theme based logos.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_default_logo_prefix_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_organisation_registered_court_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Registered Court of the default organisation for letter footer.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_default_organisation_registered_court_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_organisation_relative_url_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The default organisation to use on corporate identity templates.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_default_organisation_relative_url_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_theme_font_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/lines
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Fonts to be used for all templates
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_default_theme_font_property
</string>
</value>
</item>
<item>
<key>
<string>
multivalued
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_default_theme_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The default theme to use when for styling templates. Will be used if no other override is found.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_default_theme_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python: "default"
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_fallback_logo_relative_url_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The relative path to a portal skin folder containing a fallback image to be used as logo.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_fallback_logo_relative_url_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python: "image_module/template_test_image_logo_png"
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_leaflet_document_prefix_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Document prefix to use when generating new Leaflet documents.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_leaflet_document_prefix_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_letter_document_prefix_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Document prefix to use when generating new Letter documents.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_letter_document_prefix_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_release_document_prefix_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Document prefix to use when generating new Release documents.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_release_document_prefix_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_report_css_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/lines
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
List of additional css files located in portal-skins that should be used in report generation.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_report_css_property
</string>
</value>
</item>
<item>
<key>
<string>
multivalued
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_report_document_prefix_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Document prefix to use when generating new Report documents.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_report_document_prefix_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_report_js_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
List of additional JS files located in portal skins that should be used during report generation.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_report_js_property
</string>
</value>
</item>
<item>
<key>
<string>
multivalued
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_site_registration_miibeian_id_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The company registration id issued by Miibeian (required to offer services in China).
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_site_registration_miibeian_id_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_site_registration_miibeian_url_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The company registration provider url issued by Miibeian (required to offer services in China).
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_site_registration_miibeian_url_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_slide_document_prefix_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Document prefix to use when generating new Slideshow documents.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_slide_document_prefix_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_social_media_handle_facebook_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Url to profile on Facebook.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_social_media_handle_facebook_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_social_media_handle_google_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Url to profile on Google.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_social_media_handle_google_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_social_media_handle_twitter_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Url to profile on Twitter.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_social_media_handle_twitter_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/PropertySheetTemplateItem/portal_property_sheets/CorporateIdentityTemplatePreference/preferred_corporate_identity_template_theme_css_relative_url_property.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/string
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The relative path to a portal skin folder containing the theme css.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_corporate_identity_template_theme_css_relative_url_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python: "template_themes/themes.css"
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getSourceDict.py
View file @
a3ae0d6b
...
...
@@ -16,16 +16,15 @@ from Products.PythonScripts.standard import html_quote
# ------------------------------- Set Source ----------------------------------
source_logo_url
=
None
default_bank_account_
uid
=
context
.
Base_getTemplateParameter
(
"default_bank_account_uid
"
)
default_bank_account_
relative_url
=
context
.
Base_getTemplateParameter
(
"default_bank_account_relative_url
"
)
source_organisation
=
None
if
source
is
None
:
default_company_
title
=
context
.
Base_getTemplateParameter
(
"default_company_title
"
)
default_company_
relative_url
=
context
.
Base_getTemplateParameter
(
"default_company_relative_url
"
)
contributor_title_string
=
blank
source_person
=
None
source_person_list
=
[]
source_organisation_list
=
[]
source_organisation_uid
=
None
source_set
=
None
# source person => override => contributor => source_decision
...
...
@@ -42,17 +41,13 @@ if source is None:
contributor_title_string
=
', '
.
join
(
x
.
get
(
"name"
,
blank
)
for
x
in
source_person_list
)
# source organisation
# order: override => follow-up => default_organisation_uid => default_company_
title
=> source_person career subordinate => source decision
# order: override => follow-up => default_organisation_uid => default_company_
relative_url
=> source_person career subordinate => source decision
if
override_source_organisation_title
is
not
None
or
override_source_organisation_title
==
blank
:
source_organisation_list
=
context
.
Base_getTemplateProxyParameter
(
parameter
=
"override_organisation"
,
source_data
=
override_source_organisation_title
)
if
len
(
source_organisation_list
)
==
0
:
source_organisation_list
=
context
.
Base_getTemplateProxyParameter
(
parameter
=
"organisation"
,
source_data
=
None
)
or
[]
if
len
(
source_organisation_list
)
==
0
:
source_organisation_uid
=
context
.
Base_getTemplateParameter
(
"default_source_organisation_uid"
)
if
source_organisation_uid
:
source_organisation_list
=
context
.
Base_getTemplateProxyParameter
(
parameter
=
"sender"
,
source_data
=
source_organisation_uid
)
or
[]
if
len
(
source_organisation_list
)
==
0
and
default_company_title
:
source_organisation_list
=
context
.
Base_getTemplateProxyParameter
(
parameter
=
"override_organisation"
,
source_data
=
default_company_title
)
or
[]
if
len
(
source_organisation_list
)
==
0
and
default_company_relative_url
:
source_organisation_list
=
context
.
Base_getTemplateProxyParameter
(
parameter
=
"override_organisation_relative_url"
,
source_data
=
default_company_relative_url
)
or
[]
if
len
(
source_organisation_list
)
==
0
and
source_person
is
not
None
:
for
organisation_candidate
in
source_person_list
:
organisation_candidate_list
=
context
.
Base_getTemplateProxyParameter
(
parameter
=
"source"
,
source_data
=
organisation_candidate
.
get
(
"uid"
))
or
[]
...
...
@@ -77,8 +72,8 @@ else:
source
=
context
.
Base_getTemplateProxyParameter
(
parameter
=
"source"
,
source_data
=
source_uid
)[
0
]
# override specific bank account (no default to pick correct one if multiple exist)
if
default_bank_account_
uid
is
not
None
:
override_bank_account_list
=
context
.
Base_getTemplateProxyParameter
(
parameter
=
"bank"
,
source_data
=
default_bank_account_
uid
)
or
[]
if
default_bank_account_
relative_url
is
not
None
:
override_bank_account_list
=
context
.
Base_getTemplateProxyParameter
(
parameter
=
"bank"
,
source_data
=
default_bank_account_
relative_url
)
or
[]
if
len
(
override_bank_account_list
)
>
0
:
override_bank_account
=
override_bank_account_list
[
0
]
source
[
"bank"
]
=
override_bank_account
.
get
(
"bank"
)
...
...
@@ -93,7 +88,11 @@ if source_organisation is not None:
# social capital currency and registered court fallbacks
if
source
.
get
(
"social_capital_currency"
)
is
blank
:
source
[
"social_capital_currency"
]
=
context
.
Base_getTemplateParameter
(
"default_source_company_capital_currency"
)
currency_short_title
=
None
currency_relative_url
=
context
.
Base_getTemplateParameter
(
"default_source_company_capital_currency_relative_url"
)
if
currency_relative_url
:
currency_short_title
=
context
.
restrictedTraverse
(
currency_relative_url
).
getShortTitle
()
source
[
"social_capital_currency"
]
=
currency_short_title
or
""
if
source
.
get
(
"corporate_registration_code"
)
is
blank
:
source
[
"corporate_registration_code"
]
=
context
.
Base_getTemplateParameter
(
"default_source_registered_court"
)
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getTemplateParameter.py
View file @
a3ae0d6b
"""
================================================================================
Return
custom hardcoded parameters
Return
template parameters from portal-preferences (all calls go through here)
================================================================================
"""
# parameters:
# ------------------------------------------------------------------------------
# parameter Parameter to lookup
if
parameter
==
"fallback_image"
:
return
"template_images/fallback.png"
if
parameter
==
"default_theme_css_url"
:
return
"template_themes/themes.css"
if
parameter
==
"wkhtmltopdf_rendering_fix"
:
return
"""
<script>
(function () {
var table_list = document.body.querySelectorAll("table"),
blockquote_list = document.body.querySelectorAll("table"),
sheet_width_in_px,
div;
// always measure what is the px equivalent for 210mm (A4 210x297mm)
div = document.createElement("div")
div.style.width = "200mm"; // XXX HARDCODED
document.body.appendChild(div);
sheet_width_in_px = div.clientWidth;
document.body.removeChild(div);
if (table_list.length > 0) {
pref
=
context
.
getPortalObject
().
portal_preferences
.
getActivePreference
()
// Resize a table by reducing th and td font-size,
// to avoid the table to be larger than the sheet width,
// to avoid global fonts to be reduced.
[].forEach.call(table_list, function (table) {
if (sheet_width_in_px > table.clientWidth) return;
var ratio_percent = Math.floor((sheet_width_in_px / table.clientWidth) * 100);
table.style.width = "100%";
// Select th and td and affect the font-size in percent.
// The CSS should not set the font-size on the table instead of th and td
[].forEach.call(table.querySelectorAll("td"), function (e) {
e.setAttribute("style", "font-size: " + ratio_percent + "%");
});
[].forEach.call(table.querySelectorAll("th"), function (e) {
e.setAttribute("style", "font-size: " + ratio_percent + "%");
});
});
}
// same for other elements
if (blockquote_list.length > 0) {
[].forEach.call(blockquote_list, function (blockquote) {
if (sheet_width_in_px > blockquote.clientWidth) return;
var ratio_percent = Math.floor((sheet_width_in_px / blockquote.clientWidth) * 100);
blockquote.style.width = "100%";
// Select all children and affect the font-size in percent.
// The CSS should not set the font-size on the table instead of th and td
[].forEach.call(blockquote.children, function (e) {
e.setAttribute("style", "font-size: " + ratio_percent + "%");
});
});
}
}());
</script>
"""
if
parameter
==
"default_company_relative_url"
:
return
pref
.
getPreferredCorporateIdentityTemplateDefaultOrganisationRelativeUrl
()
if
parameter
==
"default_theme"
:
return
pref
.
getPreferredCorporateIdentityTemplateDefaultTheme
()
if
parameter
==
"default_theme_css_url"
:
return
pref
.
getPreferredCorporateIdentityTemplateThemeCssRelativeUrl
()
if
parameter
==
"fallback_image"
:
return
pref
.
getPreferredCorporateIdentityTemplateFallbackLogoRelativeUrl
()
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getTemplateProxyParameter.py
View file @
a3ae0d6b
...
...
@@ -228,7 +228,8 @@ if pass_parameter is not None and pass_source_data is not None:
return
populatePersonDict
(
context
.
getContributorValueList
(
*
args
,
**
kw
))
return
[]
# ------------- Override Sender/Recipient Organisation -----------------------
# --------- Override Sender/Recipient Organisation (TITLE) ---------------------
# XXX remove, too much ambiguity if multiple results
# returns [{organisation_dict}]
if
pass_parameter
==
"override_organisation"
:
return
populateOrganisationDict
(
portal_object
.
portal_catalog
(
...
...
@@ -237,13 +238,10 @@ if pass_parameter is not None and pass_source_data is not None:
title
=
pass_source_data
))
# ------------
----------- Sender (Override) --------------
--------------------
# ------------
Override Sender/Recipient Organisation (URL)
--------------------
# returns [{organisation_dict}]
if
pass_parameter
==
"sender"
:
return
populateOrganisationDict
(
portal_object
.
portal_catalog
(
portal_type
=
"Organisation"
,
uid
=
pass_source_data
))
if
pass_parameter
==
"override_organisation_relative_url"
:
return
populateOrganisationDict
([
context
.
restrictedTraverse
(
pass_source_data
)])
# -------------- Source/Destination (Person => Organisation) -----------------
# returns [{organisation_dict}]
...
...
@@ -289,16 +287,14 @@ if pass_parameter is not None and pass_source_data is not None:
# --------------------- Bank (Default Bank Account) --------------------------
# returns [{bank_account_dict}] used in letter
if
pass_parameter
==
"bank"
:
return
populateBankDict
(
portal_object
.
portal_catalog
(
portal_type
=
"Bank Account"
,
uid
=
pass_source_data
))
return
populateBankDict
([
context
.
restrictedTraverse
(
pass_source_data
)])
# ------------------ Theme Logo (Prefix + Theme) -----------------------------
# returns [{logo_dict}] used in themes
if
pass_parameter
==
"logo"
:
return
populateImageDict
(
portal_object
.
portal_catalog
(
portal_type
=
"Image"
,
language
=
context
.
getLanguage
()
or
'en'
,
validation_state
=
validation_state
,
reference
=
pass_source_data
))
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getThemeDict.py
View file @
a3ae0d6b
...
...
@@ -28,8 +28,7 @@ theme_logo_dict = {}
theme_reference
=
None
theme
=
(
context
.
Base_getTemplateProxyParameter
(
parameter
=
"theme"
,
source_data
=
None
)
or
context
.
Base_getTemplateParameter
(
"theme"
)
or
context
.
Base_getTemplateParameter
(
"default_company_title"
)
context
.
Base_getTemplateParameter
(
"default_theme"
)
)
if
theme
is
not
None
:
theme
=
theme
.
lower
()
...
...
@@ -39,8 +38,6 @@ if theme is not None:
theme_logo_list
=
context
.
Base_getTemplateProxyParameter
(
parameter
=
"logo"
,
source_data
=
theme_reference
)
or
[]
if
len
(
theme_logo_list
)
>
0
:
theme_logo_dict
=
theme_logo_list
[
0
]
if
theme
is
None
:
theme
=
"default"
theme_dict
=
{}
theme_dict
[
"theme"
]
=
theme
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsReport.py
View file @
a3ae0d6b
...
...
@@ -80,7 +80,7 @@ doc_embed = doc_format == 'html' and (doc_display_embedded or doc_display_sandbo
# -------------------------- Document Parameters ------------------------------
doc_localiser
=
doc
.
getPortalObject
().
Localizer
doc_rendering_fix
=
doc
.
Base_getTemplateParameter
(
'wkhtmltopdf_rendering_fix'
)
or
blank
doc_rendering_fix
=
doc
.
WebPage_getPdfOutputRenderingFix
(
)
or
blank
doc_report
=
getattr
(
doc
,
doc_report_name
)
doc_aggregate_list
=
[]
doc_revision
=
"1"
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_getDefaultFallbackLogoAbsoluteUrl.py
0 → 100644
View file @
a3ae0d6b
"""
================================================================================
Return list of bank accounts for default organisation defined in preferences
================================================================================
"""
# parameters:
# ------------------------------------------------------------------------------
# parameter Parameter to lookup
from
zExceptions
import
Unauthorized
preference
=
context
.
getPortalObject
().
portal_preferences
fallback_logo_relative_url
=
preference
.
getPreferredCorporateIdentityTemplateFallbackLogoRelativeUrl
()
if
fallback_logo_relative_url
:
try
:
return
context
.
restrictedTraverse
(
fallback_logo_relative_url
).
absolute_url
()
except
Unauthorized
:
return
None
return
None
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_getDefaultFallbackLogoAbsoluteUrl.xml
0 → 100644
View file @
a3ae0d6b
<?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>
Preference_getDefaultFallbackLogoAbsoluteUrl
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_getDefaultOrganisationBankAccountList.py
0 → 100644
View file @
a3ae0d6b
"""
================================================================================
Return list of bank accounts for default organisation defined in preferences
================================================================================
"""
# parameters:
# ------------------------------------------------------------------------------
# parameter Parameter to lookup
from
zExceptions
import
Unauthorized
preference
=
context
.
getPortalObject
().
portal_preferences
organisation_relative_url
=
preference
.
getPreferredCorporateIdentityTemplateDefaultOrganisationRelativeUrl
()
if
organisation_relative_url
:
try
:
organisation
=
context
.
restrictedTraverse
(
organisation_relative_url
)
return
[(
''
,
''
)]
+
[(
account
.
getTitle
(),
account
.
getRelativeUrl
())
for
account
in
organisation
.
searchFolder
(
portal_type
=
'Bank Account'
,
sort_on
=
'title'
)]
except
Unauthorized
:
return
None
return
None
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_getDefaultOrganisationBankAccountList.xml
0 → 100644
View file @
a3ae0d6b
<?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>
Preference_getDefaultOrganisationBankAccountList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_viewCorporateIdentityStyle.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Base_edit
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
bottom
</string>
<string>
listbox
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
my_preferred_corporate_identity_template_default_organisation_relative_url
</string>
<string>
my_preferred_corporate_identity_template_default_theme
</string>
<string>
my_preferred_corporate_identity_template_theme_css_relative_url
</string>
<string>
my_preferred_corporate_identity_template_fallback_logo_absolute_url
</string>
<string>
my_preferred_corporate_identity_template_fallback_logo_relative_url
</string>
</list>
</value>
</item>
<item>
<key>
<string>
listbox
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Preference_viewCorporateIdentityStyle
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
Preference_viewCorporateIdentityStyle
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_view
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Corporate Identity Template Preferences
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_viewCorporateIdentityStyle/my_preferred_corporate_identity_template_default_organisation_relative_url.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
description
</string>
<string>
items
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_preferred_corporate_identity_template_default_organisation_relative_url
</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>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Default organisation that should be used on templates.
</string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_list_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Default Organisation Title
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(\'\', \'\')] + [(organisation.getTitle(), organisation.getRelativeUrl()) for organisation in here.getPortalObject().portal_catalog(portal_type=\'Organisation\', group_relative_url=\'group/%\', sort_on=\'title\')]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_viewCorporateIdentityStyle/my_preferred_corporate_identity_template_default_theme.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
description
</string>
<string>
items
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_preferred_corporate_identity_template_default_theme
</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>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The default theme used to style templates if no other override applies.
</string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Default Theme
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_viewCorporateIdentityStyle/my_preferred_corporate_identity_template_fallback_logo_absolute_url.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
description
</string>
<string>
enabled
</string>
<string>
image_display
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_preferred_corporate_identity_template_fallback_logo_absolute_url
</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>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
image_display
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
(no value specified/image not found in Fallback Logo Relative Url)
</string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_thumbnail
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
File_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
image_display
</string>
</key>
<value>
<string>
thumbnail
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Logo
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: here.Preference_getDefaultFallbackLogoAbsoluteUrl()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_viewCorporateIdentityStyle/my_preferred_corporate_identity_template_fallback_logo_relative_url.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
description
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_preferred_corporate_identity_template_fallback_logo_relative_url
</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>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Relative url of logo to be used if no theme logo can be found.
</string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Fallback Logo Relative Url
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Preference_viewCorporateIdentityStyle/my_preferred_corporate_identity_template_theme_css_relative_url.xml
0 → 100644
View file @
a3ae0d6b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
description
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_preferred_corporate_identity_template_theme_css_relative_url
</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>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<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>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
relative Url pointing to a portal skin folder containing themes css
</string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Theme CSS (relative url)
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_getPdfOutputRenderingFix.py
0 → 100644
View file @
a3ae0d6b
"""
================================================================================
Scripts correcting wrong behaviors in WkHTMLtoPDF rendering
================================================================================
"""
# parameters:
# ------------------------------------------------------------------------------
# parameter Parameter to lookup
# included:
# - prevent resizing of document and font-size based on width of widest element
return
"""
<script>
(function () {
var table_list = document.body.querySelectorAll("table"),
blockquote_list = document.body.querySelectorAll("table"),
sheet_width_in_px,
div;
// always measure what is the px equivalent for 210mm (A4 210x297mm)
div = document.createElement("div")
div.style.width = "200mm"; // XXX HARDCODED
document.body.appendChild(div);
sheet_width_in_px = div.clientWidth;
document.body.removeChild(div);
if (table_list.length > 0) {
// Resize a table by reducing th and td font-size,
// to avoid the table to be larger than the sheet width,
// to avoid global fonts to be reduced.
[].forEach.call(table_list, function (table) {
if (sheet_width_in_px > table.clientWidth) return;
var ratio_percent = Math.floor((sheet_width_in_px / table.clientWidth) * 100);
table.style.width = "100%";
// Select th and td and affect the font-size in percent.
// The CSS should not set the font-size on the table instead of th and td
[].forEach.call(table.querySelectorAll("td"), function (e) {
e.setAttribute("style", "font-size: " + ratio_percent + "%");
});
[].forEach.call(table.querySelectorAll("th"), function (e) {
e.setAttribute("style", "font-size: " + ratio_percent + "%");
});
});
}
// same for other elements
if (blockquote_list.length > 0) {
[].forEach.call(blockquote_list, function (blockquote) {
if (sheet_width_in_px > blockquote.clientWidth) return;
var ratio_percent = Math.floor((sheet_width_in_px / blockquote.clientWidth) * 100);
blockquote.style.width = "100%";
// Select all children and affect the font-size in percent.
// The CSS should not set the font-size on the table instead of th and td
[].forEach.call(blockquote.children, function (e) {
e.setAttribute("style", "font-size: " + ratio_percent + "%");
});
});
}
}());
</script>
"""
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_getPdfOutputRenderingFix.xml
0 → 100644
View file @
a3ae0d6b
<?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>
WebPage_getPdfOutputRenderingFix
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_validateImage.py
View file @
a3ae0d6b
...
...
@@ -50,7 +50,7 @@ if validation_freebie is None:
# flag broken link until further notice
if
img_obj
is
None
:
raise
NotFound
(
'The following image could not be found in erp5: %s'
%
(
img_src
.
split
(
"?"
)[
0
]))
raise
NotFound
(
'The following image could not be found in erp5
OR is not following guidelines for links (eg no ./ prefix)
: %s'
%
(
img_src
.
split
(
"?"
)[
0
]))
img_type
=
img_obj
.
getContentType
()
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
View file @
a3ae0d6b
...
...
@@ -70,7 +70,7 @@ override_batch_mode = kw.get('batch_mode')
book_localiser
=
book
.
getPortalObject
().
Localizer
book_relative_url
=
book
.
getRelativeUrl
()
book_prefix
=
"Book."
book_rendering_fix
=
book
.
Base_getTemplateParameter
(
'wkhtmltopdf_rendering_fix'
)
or
blank
book_rendering_fix
=
book
.
WebPage_getPdfOutputRenderingFix
(
)
or
blank
book_content
=
book
.
getTextContent
()
book_aggregate_list
=
[]
book_revision
=
book
.
getRevision
()
...
...
bt5/erp5_corporate_identity/bt/template_property_sheet_id_list
0 → 100644
View file @
a3ae0d6b
CorporateIdentityTemplatePreference
\ No newline at end of file
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