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

How to display the real « name » field of the pos_order model on the receipt?

By
Pascal Tremblay
on 10/31/15, 4:37 PM 535 views

Hello guys,

Look at this please...


In the pos_order model, they are these two fields :

- « name » that contains a string like this CF-2015-PV000001 (for us, our own sequence);

- « pos_reference » that contains a string like this Commande 00015-001-0001.


In the file odoo-8/openerp/addons/point_of_sale/static/src/xml/pos.xml  :

In the template <t t-name="PosTicket">

even if <t t-esc="order.get('name')"/> is used, the value of the pos_reference is returned on the printed pos ticket. Not the value of the real name field (CF-2015-PV000001).

How to change this please? An idea?

Goal : we want a pos printed ticket with the real name (CF-2015-PV000001) on it. Not the pos_reference (Commande 00015-001-0001).



UPDATE #1

I'm not still sure. I think that the pos_reference is created in the client browser, with javascript (generateUniqueId method). once the order is validated in the pos, it is sent to the server and THEN it is stored in the pos_order model. At this moment, the name and the pos_reference are filled. 

I think that the name field value can not be printed on the pos receipt because the receipt is created on the client side before the order is created on the server side. The client side can not get the value of the name field on the server.

Is it clear? Is it true?

0
Jerome Guerriat
On 10/31/15, 5:59 PM

My guess is that either this isn't the report being used, or it us inherited and modified elsewhere.

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: 10/31/15, 4:37 PM
Seen: 535 times
Last updated: 10/31/15, 7:25 PM