Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Translating a Studio report into the contact's language

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
reportstudioquickstart
2 Respuestas
5624 Vistas
Avatar
Lukas Van Cauter (cvl)

  1. Translating a Studio report into the contact's language
3
Avatar
Descartar
George Mountanos

Hi Lukas, 

Everything great!

Thanks so much for the answer, it seems like I have a few more things to take care of before I can actually translate it, but that's ok. 

Thanks so much again!

Have a great day, 

George

Avatar
Lukas Van Cauter (cvl)
Autor Mejor respuesta

Problem: A custom made report (with Studio) is printed (or the pdf is generated) with all the fields translated into the language of the user in Odoo, instead of the language of the contact for whom the report is intended.

Use case: A newsletter is sent to the contacts of a company. Of course, this should be in the language of the contact that will receive the letter. The goal is that fields like for example the title of a contact (mister, miss) are translated into the language of the receiving person.

Cause: In reports such as an invoice (translated into the contact’s language by default), a context is added in the XML code to indicate this. This XML code is missing if you create a report in Studio from scratch.

Solution: Add this piece of code in the XML code:

<t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)" />

What it means in human language: we’re adding a context to this report, which sets the language of the report to the language of the partner that’s present in the document from which we’re generating the report.

How to get the language?

If you are generating a report from the contacts app (as in the example above), you just need the value of the language field -> doc.lang

If you are generating a report from an app like accounting, there is an extra step to go through the contact itself -> doc.partner_id.lang

 

Step by step guide

1) Go to the report you created in Studio

2) Go to Report -> XML (the developer mode has to be activated)

3) In the dropdown, select the one that starts by studio_customization. and ends with _document.

 

4) Copy the entire thing: “studio_customization.studio_report_docume_c8a3a442-df5c-4463-96cd-c90eb64439cb_document”

5) Go (in debug mode) to the views in the technical settings

6) Search for the line you copied in step 4

7) Open the one where the ‘key’ is the same as the line you copied

8) Add the piece of code

3
Avatar
Descartar
Julian Sautter (jus)

Great article, thank you Lukas, unblocked me with a report I had this issue with!

George Mountanos

Hi Lukas,

Hope all is good!
Your post seems to be exactly what I have been looking for.
Unfortunately, I get stuck at step 3.
If you could help, I would be grateful!
What should I chose?
https://drive.google.com/file/d/17iWtKPasTfv7lpuOj3RsjoFUE12Y-jB1/view?usp=sharing

Thanks in advance!

Kind regards,
George

Lukas Van Cauter (cvl)
Autor

Hi George! All fine here, hope the same for you.

This should be the one: https://tinyurl.com/2mp86ah6
Let me know if it works!

Kind regards,
Lukas

Avatar
Ellen Wouters
Mejor respuesta

Hi Lukas,


I am trying to translate my delivery slip (created in Odoo Studio) into the customers language.

However, it keeps generating it in Dutch.

I have added the formula:

t t-name="studio_report_document">

 

                 

 

               


Seems like I am doing something incorrect.


Thanks, Ellen


0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
odoo studio V16- how to sort a table in an odoo studio report
report studio
Avatar
Avatar
1
mar 24
3531
How to edit the size of a field on pdf report with studio Resuelto
studio quickstart
Avatar
Avatar
1
oct 21
5852
Customize Reports in Studio- Odoo V13
report studio
Avatar
0
nov 19
8
How to make a report invisible depending on the company Resuelto
report studio v18
Avatar
Avatar
Avatar
2
sept 25
1180
How to set up a dynamic date filter with studio ?
filtering studio quickstart
Avatar
Avatar
Avatar
Avatar
Avatar
5
oct 24
13612
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now