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

Product Name in two languages simultaneously

Suscribirse

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

Se marcó esta pregunta
productinventorytranslationProducts
3 Respuestas
5448 Vistas
Avatar
isteq1@isteq.nl

How can I display Product Name in two languages that we use simultaneously in the Product Card of the Inventory App?

For the default language I placed Related Field - product_variant_id.name.

Now I want to place next to the Product Name translated into the second language.


0
Avatar
Descartar
Avatar
Jainesh Shah(Aktiv Software)
Mejor respuesta

Hi isteq1,

Step 1)Install the package googletrans(Alpha version) using the following command:
pip install googletrans==3.1.0a0

Below is the output :- 



Note: You can set the source and destination language per your requirement.
Check googletrans package for all language codes.

Please find code in comment.

I hope this will be helpful. 

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

1
Avatar
Descartar
Jainesh Shah(Aktiv Software)

Find code here :-

Step 2)
Create an XML File for your new field to be placed in the product view-Below is the code:

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="product_inherit_view" model="ir.ui.view">
<field name="name">product.inherit.view</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='name']" position="after">
<field name="translated_product"/>
</xpath>
</data>
</field>
</record>
</data>
</odoo>

Step 3)
Create Python File for the logic-Below is the code:

from googletrans import Translator
from odoo import fields, models,api

class Product(models.Model):
_inherit = "product.template"

translated_product = fields.Char(string="",compute="_compute_product_name")

@api.depends('name')
def _compute_product_name(self):
source_language = 'en'
destination_language = 'ar'
main_product_name = self.name
translator = Translator()
result = translator.translate(main_product_name, src=source_language, dest=destination_language)
if main_product_name:
self.translated_product = result.text
else:
self.translated_product=""

Avatar
Sebastian Lachowicz
Mejor respuesta

Hi! I want to join this discussion. I produce plants, and for production purposes, I need to display two names: one in my language and one in Latin. My customers use both types of names, so I need the ability to display, sort, and filter in both language variants. Can You help me?

0
Avatar
Descartar
Avatar
isteq1@isteq.nl
Autor Mejor respuesta

Thank you for the detailed response. I would like to clarify some details.
1) I don't need an automatic translation. The bilingual product names are already in the base.
2) I just need to include an additional field with the translated name in the General Information tab of the Product Card.
3) After that, I want to add the Translated Product Name field in the Products list, instead of the Product Name field. This will allow me to sort the products by this field.
4) I would like to see a search by Translated Product Name work as well.
5) Unfortunately I only have a basic knowledge of database editing, so I don't want to put an additional apps and edit the HTML code. I planned to make changes only with the help of Odoo Studio.

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
Issue with Return Location in Transfer
product inventory
Avatar
Avatar
1
mar 25
2726
How to cancel a completed receipt and delete related products Resuelto
product inventory
Avatar
Avatar
1
feb 25
4140
product name not changed for all users Resuelto
product inventory
Avatar
Avatar
2
feb 25
2668
Create products from take apart a purchased product
product inventory
Avatar
Avatar
1
mar 24
2098
group by location is missing in products
product inventory
Avatar
Avatar
1
abr 22
3024
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