Odoo Help


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.


How to insert company infos in pos receipt?

Pascal Tremblay
on 3/17/15, 6:53 PM 933 views

Hello guys,

I have seen other post on the subject. But I don't understand.

How to insert company address in the pos receipt?

In the file /home/odoo-test/odoo-test/addons/point_of_sale/static/src/xml/pos.xml :

  • I can display the id of the partner associated with the company;

  • <t t-esc="widget.pos.company.partner_id"/>

But this one doesn't work to get the street of this related partner (for example) :

  • <t t-esc="widget.pos.company.partner_id.street"/>


Ref :


It is almost perfect. I will try to delete this « 53, » just in front of the state_id (it is the id of Quebec).


Hey, I don't want address of the customer. I want address of the company who makes the receipt. :)

Pascal Tremblay
on 3/17/15, 6:54 PM

Jérémy Kersten (jke)

--Jérémy Kersten (jke)--
| 3 2 5
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013. He developed several projects for OpenERP version 8 including the eCommerce, the Google Calendar synchronization and the new product variants/configurator. Now, he manages Odoo website and themes for saas.

Jérémy Kersten (jke)
On 3/21/15, 3:16 PM


Have you read all the "ref (question 73484)" ? 

Because, the solution is there ! 

pos.company is not a browse record from the company, it's just a var created by pos.

So if you want street, street2, zip, ... you need to had these fields when the var company is instancied in model.js 

model: 'res.company',
fields: [ 'currency_id', 'email', 'website', 'company_registry', 'vat', 'name', 'phone', 'partner_id' , 'country_id', 'street'],
ids: function(self){ return [self.user.company_id[0]] },
loaded: function(self,companies){ self.company = companies[0]; },

Next, you can add your modification in xml  ...

Address: <t t-esc="widget.pos.company.street || 'street undefined'"/><br /> 


Need to add state_id[1] in the xml (state_id is an array with [0] = id and [1] = display_name)

State: <t t-esc="widget.pos.company.state_id[1] || '' "/> 

It works great. Thanks! The only problem is with state_id. I get « 53,Quebec » and not « Quebec ».

Pascal Tremblay
on 3/21/15, 4:23 PM

I have updated the response... State_id is a many2one so you receive an array...

Jérémy Kersten (jke)
on 3/21/15, 5:14 PM

Thanks 10 times! It works.

Pascal Tremblay
on 3/21/15, 6:18 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

3 follower(s)


Asked: 3/17/15, 6:53 PM
Seen: 933 times
Last updated: 3/21/15, 5:12 PM