[REF] point_of_sale: simplify media print
The old implementation manually sets 'display' to 'none' to the elements we don't want to see in the print. This is tedious because we need to identify every element to be hidden when in fact we know the only element that we want to print -- the receipt. So in this commit, we set the 'visibility' of all elements to 'hidden' and only the element tree of the receipt is set to visible.
This commit is contained in:
@@ -1690,67 +1690,20 @@ td {
|
||||
}
|
||||
|
||||
@media print {
|
||||
* {
|
||||
body * {
|
||||
visibility: hidden;
|
||||
}
|
||||
.pos .receipt-screen .pos-receipt-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.pos .receipt-screen .pos-receipt-container * {
|
||||
visibility: visible;
|
||||
background: white !important;
|
||||
color: black !important;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
color: white !important;
|
||||
/* avoid black background if backgrounds are printed */
|
||||
background: initial;
|
||||
}
|
||||
.o_notification_manager,
|
||||
.oe_leftbar,
|
||||
.oe_loading,
|
||||
.pos .pos-topheader,
|
||||
.pos .pos-leftpane,
|
||||
.pos .keyboard_frame,
|
||||
.pos .receipt-screen header,
|
||||
.pos .receipt-screen .top-content,
|
||||
.pos .receipt-screen .centered-content .button,
|
||||
.pos .receipt-screen .centered-content .print_invoice {
|
||||
display: none !important;
|
||||
}
|
||||
.pos,
|
||||
.pos .pos-content,
|
||||
.pos .rightpane,
|
||||
.pos .screen,
|
||||
.pos .window,
|
||||
.pos .window .subwindow,
|
||||
.pos .subwindow .subwindow-container{
|
||||
display: block;
|
||||
position: static;
|
||||
height: auto;
|
||||
}
|
||||
.pos{
|
||||
background: white !important;
|
||||
}
|
||||
.pos .rightpane {
|
||||
left: 0px !important;
|
||||
background-color: white;
|
||||
}
|
||||
.pos .receipt-screen {
|
||||
text-align: left;
|
||||
}
|
||||
.pos .receipt-screen .centered-content{
|
||||
position: static;
|
||||
border: none;
|
||||
}
|
||||
.pos .pos-receipt-container {
|
||||
text-align: left;
|
||||
}
|
||||
.pos-actionbar {
|
||||
display: none !important;
|
||||
}
|
||||
.debug-widget{
|
||||
display: none !important;
|
||||
}
|
||||
.pos *{
|
||||
text-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
.pos .pos-receipt{
|
||||
.pos .pos-receipt {
|
||||
margin: 0;
|
||||
margin-left: auto !important;
|
||||
margin-right: auto !important;
|
||||
@@ -1758,15 +1711,6 @@ td {
|
||||
font-size: 13px !important;
|
||||
width: 266px !important;
|
||||
}
|
||||
.o_debug_manager {
|
||||
display: none !important;
|
||||
}
|
||||
.o_chat_window {
|
||||
display: none !important;
|
||||
}
|
||||
.blockUI {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* d) The Scale screen */
|
||||
|
||||
Reference in New Issue
Block a user