Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Width of the POS reciept is increased in Browser view but not in actual print, why?

By
Ibrar Ahmad
on 3/14/15, 8:01 AM 536 views

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)

Ibrar Ahmad
on 3/14/15, 8:39 AM

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

Yenthe
on 3/14/15, 8:51 AM

But the problem is not being solved :p

Ibrar Ahmad
on 3/14/15, 9:06 AM

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

Yenthe
on 3/14/15, 9:18 AM

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 :) }

Ibrar Ahmad
on 3/14/15, 9:36 AM

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?
Ibrar Ahmad
on 3/14/15, 9:40 AM
1

Yenthe

--Yenthe--
6716
| 7 7 8
Turnhout, Belgium
--Yenthe--

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

Yenthe
On 3/14/15, 8:24 AM

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!
 

0
Ibrar Ahmad
On 3/14/15, 9:26 AM

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 :)
    }

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/14/15, 8:01 AM
Seen: 536 times
Last updated: 3/16/15, 8:10 AM