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

Export Python variable translations not working

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
translationpoexport-translation13.0
3434 Tampilan
Avatar
Jeffrey Castro

Hello, I'm developing a custom module in Odoo 13 to generate a personalized XMLS report, and  for this I'm using Base Report XLSX from OCA. The issue is that when generating the PO document for the translations, it doesn't recognize the variables that I explicitly marked to export whit "_()", even though I followed all the indications in the official documentation (I think).

 

The custom module code:

# -*- coding: utf-8 -*-

from odoo import models, _

class PayrollBatchReportXLSX(models.AbstractModel):

    _name = 'report.company_payroll.payroll_batch_report'

    _inherit = 'report.report_xlsx.abstract'

    def generate_xlsx_report(self, workbook, data, lines):

        sheet = workbook.add_worksheet('Payroll Batch XLSX Report')

        sheet.write(0, 0, _("ACCOUNT"))

        sheet.write(0, 1, _("DEBIT"))

        sheet.write(0, 2, _("CREDIT"))

        sheet.write(0, 3, _("NAME"))

        line_index = 0

        for line_item in lines.slip_ids.line_ids:

            if line_item.salary_rule_id.category_id.code in ['L10N_HN_NET']:

                sheet.write(line_index+1, 2, line_item.total)

                line_index += 1

        for index, employee in enumerate(lines.slip_ids.employee_id):

            sheet.write(index+1, 3, employee.name.upper())

            if employee.bank_account_id.acc_number:

                sheet.write(index+1, 0, employee.bank_account_id.acc_number)

 

And this is the generated PO file:

# Translation of Odoo Server.

# This file contains the translation of the following modules:

#  * company_payroll

#

msgid ""

msgstr ""

"Project-Id-Version: Odoo Server 13.0+e\n"

"Report-Msgid-Bugs-To: \n"

"POT-Creation-Date: 2022-05-04 16:17+0000\n"

"PO-Revision-Date: 2022-05-04 16:17+0000\n"

"Last-Translator: \n"

"Language-Team: \n"

"MIME-Version: 1.0\n"

"Content-Type: text/plain; charset=UTF-8\n"

"Content-Transfer-Encoding: \n"

"Plural-Forms: \n"

#. module: company_payroll

#: model:ir.actions.report,print_report_name:company_payroll.payroll_batch_xlsx_report

msgid "'Payroll batch - %s' % (object.name)"

msgstr "'Nómina en lote - %s' % (object.name)"

#. module: company_payroll

#: model:ir.model.fields,field_description:company_payroll.field_report_company_payroll_payroll_batch_report__display_name

msgid "Display Name"

msgstr "Mostrar nombre"

#. module: company_payroll

#: model:ir.model.fields,field_description:company_payroll.field_report_company_payroll_payroll_batch_report__id

msgid "ID"

msgstr ""

#. module: company_payroll

#: model:ir.model.fields,field_description:company_payroll.field_report_company_payroll_payroll_batch_report____last_update

msgid "Last Modified on"

msgstr "Última modificación en"

#. module: company_payroll

#: model:ir.actions.report,name:company_payroll.payroll_batch_xlsx_report

msgid "Payroll Batch XLSX Report"

msgstr "Reporte de nómina por lote"

#. module: company_payroll

#: model:ir.model,name:company_payroll.model_report_company_payroll_payroll_batch_report

msgid "report.company_payroll.payroll_batch_report"

msgstr ""

 

As you can see, the variables to be translated ("_("ACCOUNT")", "_("DEBIT")", etc.) aren't shown anywhere. I hope you can help me, thanks in advance.


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
Translation file changed, but the interface did not update.
translation po
Avatar
0
Agu 24
2399
Odoo 13 EE eLearning Inappropriate Chinese Translation
translation chinese 13.0
Avatar
0
Okt 19
3566
Change Arabic months names in all reports, odoo 11
translation po v11
Avatar
0
Sep 19
83
Why translation not working for ZIP, State and City in openerp7? Diselesaikan
v7 translation po
Avatar
Avatar
Avatar
2
Nov 18
8164
How to translate openerp applications?
translations translation po
Avatar
Avatar
1
Mar 15
5914
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