Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Product Name in two languages simultaneously

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
productinventorytranslationProducts
3 Replies
5449 Tampilan
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
Buang
Avatar
Jainesh Shah(Aktiv Software)
Jawaban Terbai

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
Buang
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
Jawaban Terbai

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
Buang
Avatar
isteq1@isteq.nl
Penulis Jawaban Terbai

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
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
Issue with Return Location in Transfer
product inventory
Avatar
Avatar
1
Mar 25
2726
How to cancel a completed receipt and delete related products Diselesaikan
product inventory
Avatar
Avatar
1
Feb 25
4140
product name not changed for all users Diselesaikan
product inventory
Avatar
Avatar
2
Feb 25
2669
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
Apr 22
3025
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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