PDF Style Sheet Should Also Follow Form And Method Conventions
Style Sheets are used for PDF Template and OOo Template. They should follow the
same kind of convention as for forms or python scripts. The underlying idea is
that a style sheet may either be a file or a dynamic content generated either
by a script or by a page template. This can be useful for example to dynamically
change the rendering style of a PDF invoice based on the company which is issuing
the invoice (source_section). As a result, style sheets are named after method
conventions.
Good Example:
Invoice_getODTStyleSheet
Base_getODTStyleSheet
Folder_getODSStyleSheet
Bad Example:
default_ooo_template
Base_DefaultOOoStyleSheet
UseCaseModule_UseCaseReportStyleSheet
Also, when using OOo Template, styles (defined in open office) inside the OOo
file used as template have to be named correctly. Note that if you use space or
underscores (eg. report_title) in the style name, the XML definition created by
openoffice will contain style:name (report_5f_title) and style:display-name
(report_title), hyphens (-) are not escapted, that's why it's probably better
to name them in hyphens. Styles should have meaningfull name, for example:
Good Example:
report-title
report-section-title-level1
report-column-title
report-column-content-monetary
report-column-content-text