summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss/report.scss
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/web/static/src/scss/report.scss
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/web/static/src/scss/report.scss')
-rw-r--r--addons/web/static/src/scss/report.scss106
1 files changed, 106 insertions, 0 deletions
diff --git a/addons/web/static/src/scss/report.scss b/addons/web/static/src/scss/report.scss
new file mode 100644
index 00000000..8e29f0ce
--- /dev/null
+++ b/addons/web/static/src/scss/report.scss
@@ -0,0 +1,106 @@
+$o-default-report-font: 'Lato' !default;
+$o-default-report-primary-color: rgb(0, 0, 0) !default;
+$o-default-report-secondary-color: rgb(0, 0, 0) !default;
+
+html, body {
+ height: 100%;
+ direction: ltr;
+}
+
+body {
+ color: #000 !important;
+ word-wrap: break-word;
+ font-family: $o-default-report-font;
+}
+
+span.o_force_ltr {
+ display: inline-block;
+}
+.o_force_ltr, .o_field_phone {
+ unicode-bidi: embed; // ensure element has level of embedding for direction
+ /*rtl:ignore*/
+ direction: ltr;
+}
+
+.border-black td, .border-black th {
+ border-top: 1px solid black !important;
+}
+
+/* See https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1524 */
+.table-sm {
+ > 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) */
+.d-print-none{
+ display: none;
+}
+
+.o_bold {
+ font-weight: bolder;
+}
+.o_italic {
+ font-style: italic;
+}
+.o_underline {
+ text-decoration: underline;
+}
+
+/*Total table*/
+div#total {
+ page-break-inside: avoid;
+ table {
+ tr {
+ &.o_subtotal,
+ &.o_total {
+ td {
+ border-top: 1px solid black !important;
+ }
+ &.o_border_bottom {
+ td {
+ border-bottom: 1px solid black !important;
+ }
+ }
+ }
+ }
+ }
+}
+
+table {
+ thead {
+ &.o_black_border {
+ tr {
+ th {
+ border-bottom: 2px solid black !important;
+ }
+ }
+ }
+ }
+}
+
+// Wkhtmltopdf doesn't handle flexbox properly, both the content
+// of columns and columns themselves does not wrap over new lines
+// when needed: the font of the pdf will reduce to make the content
+// fit the page format.
+// A (weak) solution is to force the content on one line and
+// impose the width, so to have evenly size columns.
+// This should work fine in most cases, but will yield ugly results
+// when 6+ columns are rendered
+.col-auto{
+ -webkit-box-flex: 1 !important;
+ width: 100% !important;
+}