Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
5220 Представления

I tried to change the width of POS reciept from pos.css file:

.pos .pos-sale-ticket {
    text-align: right; 
    width: 700px; /* <------ Old 300px */
    background-color: white;
    margin: 10px;
    padding: 15px;
    font-size: 10px; 
    padding-bottom:30px;
   display: inline-block; 
    font-family: "Inconsolata";
    border: solid 1px rgb(220,220,220);
    clear: both;
   overflow: hidden; 
}

Th

Аватар
Отменить

Thank you so much @Yenthe. M just going to do it. ;) (y)

No problem! If it has helped you or solved your problem please consider upvoting/accepting the answer :) Best of luck!

But the problem is not being solved :p

Alright what is or is not happening? The ticket (from the ticketprinter) is not getting wider than it originally was or?

Автор

Actually the ticket size was shown in browser according to what i set in posticket in pos.css but not in actual print. But now i changed the print size from pos.css file by commenting the width in the following CSS: .pos .pos-sale-ticket{ margin: 0; margin-left: auto !important; margin-right: auto !important; border: none !important; font-size: 13px !important; /* width: 266px !important; */ Now print is set to the 100 % size of what is shown on browser window, means the browser display and print are same :) }

Автор

Please help me for one more thing.: i want to display the pos line Quantity and its Unit separately. but the variable available in pos.xml is :

means both Quantity and Units are shown combined. how to separate them?
Лучший ответ

Hi Ibrar

This is because there are two different reports for the POS.
The one you're editing the CSS for is the ticket that is shown in your browser, but this is not the ticket that is printed from your ticket printer. If you go to point_of_sale/static/src/xml/pos.xml you will see two different reports inside this XML file. One is named XmlReceipt and one is named PosTicket. The report XmlReceipt is printed through your ticketprinter and the report PosTicket is the ticket shown in your browser and on the PDF. You will need to modify the XmlReceipt one and you should be able to change ticket formats on the ticket printer itself I believe.

Best of luck!
 

Аватар
Отменить

hello Yenthe
how can i do this in odoo 14 ?
i can't find those file on odoo 15
regards

Автор Лучший ответ

Actually the ticket size was shown in browser according to what i set in posticket in pos.css but not in actual print.

But now i changed the print size from pos.css file by commenting the width in the following CSS:

   .pos .pos-sale-ticket{
        margin: 0;
        margin-left: auto !important;
        margin-right: auto !important;
        border: none !important;
        font-size: 13px !important;
  /*   width: 266px !important; */ Now print is set to the 100 % size of what is shown on browser window, means the browser display and print are same :)
    }

Аватар
Отменить