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

Select paper format according to company for the point of sale receipt?

By
Pascal Tremblay
on 2/5/15, 6:49 AM 938 views

Hello guys,

My Odoo 8 is in multi-companies setup.

I can create differents paper formats easily. For example, I have « Point of sale receipt - AA » and « Point of sale receipt - BB ».

Now, what is the best way to attrib the AA paper format to the point of sale receipt of the company AAAAA and attrib paper BB to the company BBBBB point of sale receipts????

Idea or tip?

THANKKKKKKKKKK!

0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 2/5/15, 9:36 AM

In the definition of the company, you can choose the paper format for the company. In Settings/Printing/Reports you can also select the paper format for report. Or... you add the field POS_paper_format in company and override get_pdf() in report.py (if format other only for POS).

THANKS. I will analyze it soon.

Pascal Tremblay
on 2/5/15, 9:50 AM

COuld you rephrase « you add filed POS_paper_format in company » please

Pascal Tremblay
on 2/5/15, 10:07 AM

Sorry, typo ..... you add field ....

zbik
on 2/5/15, 10:08 AM

Ok. my override of get_pdf() works great. But now.... When I see the receipt in the point of sale, it doesn't call this method get_pdf()... Oups!

Pascal Tremblay
on 2/5/15, 2:15 PM

depends?

zbik
on 2/5/15, 2:17 PM

In my point of sale, the receipt is in HTML/CSS. His code is defined in addons/point_of_sale/static/src/xml/pos.xml. So it is not a PDF.

Pascal Tremblay
on 2/5/15, 2:34 PM

hmmmm, paper_format for html???

zbik
on 2/5/15, 2:43 PM

I see that in Point of sale-> Daily Operations -> orders, we can print an invoice. This one is the place you were talking about. This report use my override of get_pdf().

Pascal Tremblay
on 2/5/15, 2:44 PM

It now means that we have to define TWO times the receipt paperformat? One paperformat for the HTML receipt via the point of sale session and one paperformat for the PDF receipt via Point of sale-> Daily Operations -> orders.... bad

Pascal Tremblay
on 2/5/15, 2:50 PM

pos.xml is qweb but.... it format is from css (paper_format is probably only useful for pdf)

zbik
on 2/5/15, 3:13 PM

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: 2/5/15, 6:49 AM
Seen: 938 times
Last updated: 3/16/15, 8:10 AM