summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss/report.scss
blob: 8e29f0ceacb3831475c960d6cbba0911e495dfe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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;
}