Receipt in POS vs backend

Asked by Francisco Martinez on 2012-08-22

when I do a sale from the POS and I try to print the receipt generated, it overlaps the ticket margins. I try to configure the printer from all the ways, but the same results.
In another hand, if I print the receipt from the POS backend, its print successfully, with correct margins, nice font and good justify.
It's possible to print the POS backend receipt directly from the POS?
I attach the both receipts generated from each...


Question information

English Edit question
Odoo Addons (MOVED TO GITHUB) Edit question
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #1040315.

Francisco Martinez (pxntium) said : #1


Yes, its surely possible to print a receipt of backend from frontend.

You just have to call the report action from js.


Francisco Martinez (pxntium) said : #3

I try to find what action is called to make the report, by two ways:

1. I read the html code related to the Print receipt from the Backend, but the button has no action associated:

<button class="oe_button" type="button" style="">
        <img height="16" width="16" src="">
        <span>Imprimir recibo</span>

2. I try to catch the http request and I have found that the pdf with the receipt is generated with the request: http://domain:8069/web/report/ and some headers embedded. How can I build the request with this information?


You should call the action directly from the js.

The action should be an xmlrpc call.


Francisco Martinez (pxntium) said : #5

Finally, I solve this by modify the CSS for the receipt, in 3 steps:

1. The font color for the receipt its gray, this cause distortion in thermal printers. Change the color in the CSS class:
.point-of-sale {
    padding: 0;
    margin: 0;
    background-color: #f0eeee;
    font-family: Helvetica, Verdana, Arial;
    color: black; /* Fran */
    font-size: 12px;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;

2. The receipt prints out of margins. Change the margins in the CSS class:
.point-of-sale .pos-sale-ticket {
    text-align: left;
    width: 250px;
    background-color: white;
    margin: 0px; /* Fran */
    padding: 0px; /* Fran */
    display: inline-block;

3. Format as you like. You can customize your ticket by modify both files involved on the receipt appearance:

I have included a logo, changed the font family to a condensed type (for large title products) and included a columns title bar.

I hope this helps others.


Great Solution! Works just fine.


ryebread (ryebread) said : #7

Thanks, works fine.

Can you help with this problem?

Provide an answer of your own, or ask Francisco Martinez for more information if necessary.

To post a message you must log in.