0

Hello I'd like to display only the ID of the country on the PoS customer edit/create screen. I added this field to the pos.xml file:

<div class='client-detail'>
     <span class='label'>Country_id</span>
     <t t-esc='partner.country_id'/>
</div>

I expected this to return just a number (ID of the country), but it gave the id,name

for example for Antartica I didn't get 10 as result,but 10,Antartica

I also tried using 'partner.country_id.id', but this didn't returned anything.

Any help please.

Jesse
  • 727
  • 13
  • 44

1 Answers1

1

To get the id you should use country_id.id (country_id is a many2one field).

<t t-esc='partner.country_id.id'/>
Kenly
  • 24,317
  • 7
  • 44
  • 60