diff options
| author | Laurent Smet <las@openerp.com> | 2017-04-26 09:31:55 +0200 |
|---|---|---|
| committer | Laurent Smet <las@openerp.com> | 2017-05-08 09:23:12 +0200 |
| commit | e80238042c9d93d492ea8b06b0041aced0d81dcd (patch) | |
| tree | 70ed26eb99cf62ff7d5418a0748d1aa166136067 /addons/web/static/src/less | |
| parent | 3425752eaca236c1e4b4d616aa49b3faa6cfd957 (diff) | |
[REF] report: remove the report module
The content of the report module is now dispatched in
the 'base' and the 'web' modules.
Diffstat (limited to 'addons/web/static/src/less')
| -rw-r--r-- | addons/web/static/src/less/layout_background.less | 68 | ||||
| -rw-r--r-- | addons/web/static/src/less/layout_boxed.less | 72 | ||||
| -rw-r--r-- | addons/web/static/src/less/layout_clean.less | 84 | ||||
| -rw-r--r-- | addons/web/static/src/less/report.editor.less | 26 | ||||
| -rw-r--r-- | addons/web/static/src/less/report.less | 35 | ||||
| -rw-r--r-- | addons/web/static/src/less/report_backend.less | 14 |
6 files changed, 299 insertions, 0 deletions
diff --git a/addons/web/static/src/less/layout_background.less b/addons/web/static/src/less/layout_background.less new file mode 100644 index 00000000000..f00fec6b33e --- /dev/null +++ b/addons/web/static/src/less/layout_background.less @@ -0,0 +1,68 @@ +.o_background_footer, .o_background_header, .o_report_layout_background { + font-family: 'Lato'; + color: @gray; +} +.o_background_header { + border-bottom: 1px solid @gray-lighter; + .company_address { + min-width: 300px; + } + img { + max-height: 96px; + max-width: 300px; + margin-right: 16px; + } + h3 { + color: @odoo-brand-primary; + font-weight: 700; + max-width: 300px; + } +} +.o_background_footer { + ul { + border-top: 1px solid @odoo-brand-primary; + border-bottom: 1px solid @odoo-brand-primary; + padding: 4px 0; + margin: 0 0 4px 0; + li { + color: @odoo-brand-primary; + } + } +} +.o_report_layout_background { + background-image: url(/report/static/src/img/bg_background_template.jpg); + background-size: cover; + background-position: bottom center; + background-repeat: no-repeat; + min-height: 920px; + thead tr th, h2 { + color: @odoo-brand-primary; + } + tbody { + color: @gray; + tr:nth-child(odd) { + background-color: rgba(184, 171, 180, 0.2); + } + tr td { + border-top: none; + } + } + /*Total table*/ + .row > .col-xs-4 > table { + tr:nth-child(odd) { + background-color: transparent !important; + } + tr:first-child td { + /*we could get rid of this rule if .border-black td would be terminated in report.less*/ + border-top: none !important; + } + tr:last-child td { + color: @odoo-brand-primary; + } + } + #total { + table tr:last-child td { + border-bottom: 1px solid black; + } + } +} diff --git a/addons/web/static/src/less/layout_boxed.less b/addons/web/static/src/less/layout_boxed.less new file mode 100644 index 00000000000..a81e09f347b --- /dev/null +++ b/addons/web/static/src/less/layout_boxed.less @@ -0,0 +1,72 @@ +.o_boxed_footer, .o_boxed_header, .o_report_layout_boxed { + font-family: 'Lato'; + color: @gray; + font-size: 12px; +} +.o_boxed_header { + border-bottom: 1px solid @gray-lighter; + img { + max-height: 100px; + } + h4 { + color: @o-we-color-text-normal; + font-weight: 700; + text-transform: uppercase; + } +} +.o_boxed_footer { + border-top: 3px solid @gray; + ul { + margin: 4px 0; + } +} +.o_report_layout_boxed { + // This is not a general rule since the id is not used in all the reports, + // we should make a general structure for report body to use it everywhere + #informations { + border: 1px solid @gray; + padding-top: 10px; + margin: 0; + } + > h2 { + text-transform: uppercase; + } + table { + border: 1px solid @gray; + thead { + tr th { + border-bottom: 3px solid @gray !important; + text-transform: uppercase; + } + } + tbody { + color: @gray; + tr { + td { + border-top: none; + border-right: 1px solid @gray; + } + td:last-child { + background-color: @gray-lighter; + } + } + } + } + /*Total table*/ + .row > .col-xs-4 > table { + td { + border-right: none; + } + tr:last-child td, tr:first-child td { + /*we could get rid of this rule if .border-black td would be terminated in report.less*/ + border-top: none !important; + } + tr:first-child td { + background-color: transparent; + } + tr:last-child td { + background-color: @gray; + color: #fff; + } + } +} diff --git a/addons/web/static/src/less/layout_clean.less b/addons/web/static/src/less/layout_clean.less new file mode 100644 index 00000000000..85e9c2d8491 --- /dev/null +++ b/addons/web/static/src/less/layout_clean.less @@ -0,0 +1,84 @@ +.o_clean_footer, .o_clean_header, .o_report_layout_clean { + font-family: 'Lato'; + color: #000; +} +.o_clean_header { + img { + max-height: 90px; + max-width: 300px; + } +} +.o_clean_footer { + margin: 0 3px; + border-top: 3px solid @odoo-brand-primary; + h4 { + color: @odoo-brand-primary; + font-weight: bolder; + } + .pagenumber { + width: 35px; + height: 35px; + border: 3px solid @odoo-brand-primary; + background-color: @odoo-brand-optional; + color: white; + padding-top: 6px; + text-align: center; + } +} +.o_report_layout_clean { + h1, h2, h3 { + color: @odoo-brand-optional; + font-weight: bolder; + } + strong { + color: @odoo-brand-primary; + } + table { + thead { + color: @odoo-brand-primary; + tr th { + text-align: left !important; + border-top: 3px solid @odoo-brand-primary !important; + text-transform: uppercase; + } + tr th:last-child { + text-align: right !important; + } + tr th:first-child { + width: 48%; + } + } + tbody { + color: #000; + tr:first-child td { + border-top: none; + } + tr:last-child td { + border-bottom: 3px solid @odoo-brand-primary; + } + tr { + td { + padding: 15px 5px; + text-align: left !important; + } + td:last-child { + text-align: right !important; + } + } + } + } + /*Total table*/ + .row > .col-xs-4 { + width: 43%; + margin-top: -20px; + > table { + tr:last-child td { + border-top: 1px solid @gray-lighter !important; + } + tr:first-child td { + /*we could get rid of this rule if .border-black td would be terminated in report.less*/ + border-top: none !important; + } + } + } +} diff --git a/addons/web/static/src/less/report.editor.less b/addons/web/static/src/less/report.editor.less new file mode 100644 index 00000000000..206ddb87037 --- /dev/null +++ b/addons/web/static/src/less/report.editor.less @@ -0,0 +1,26 @@ +.o_editable { + &:not(:empty), &[data-oe-type] { + &[date-oe-model="ir.ui.view"] { + &, th, td { + &:hover { + -moz-box-shadow: #DDCC33 0 0 5px 2px inset; + -webkit-box-shadow: #DDCC33 0 0 5px 2px inset; + box-shadow: #DDCC33 0 0 5px 2px inset; + } + } + } + } +} + +body.o_in_iframe { + margin-top: 40px!important; + div.o_css_editor { + > form { + display: none; + } + } + + .header, .footer { + display: none; + } +} diff --git a/addons/web/static/src/less/report.less b/addons/web/static/src/less/report.less new file mode 100644 index 00000000000..f34a2393fbe --- /dev/null +++ b/addons/web/static/src/less/report.less @@ -0,0 +1,35 @@ +html, body { + height: 100%; +} + +body { + color: #000 !important; + word-wrap: break-word; +} +.border-black td { + border-top: 1px solid black !important; +} + +/* See https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1524 */ +.table-condensed { + > thead > tr > th { + border-bottom: none !important; + } + > tbody > tr { + page-break-inside: avoid !important; + border-top: none !important; + } +} +.zero_min_height { + min-height: 0px !important; +} + +/* To avoid broken snippets in report rendering */ +.jumbotron, .panel, .carousel, section{ + page-break-inside: avoid; +} + +/* Wkhtmltopdf doesn't support very well the media-print CSS (depends on the version) */ +.hidden-print{ + display: none; +} diff --git a/addons/web/static/src/less/report_backend.less b/addons/web/static/src/less/report_backend.less new file mode 100644 index 00000000000..62252c2d9f7 --- /dev/null +++ b/addons/web/static/src/less/report_backend.less @@ -0,0 +1,14 @@ +.o_report_iframe { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: none; +} + +.o_report_no_edit_mode, .o_edit_mode_available, .o_report_edit_mode { + display: inline-block; +} |
