Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

Export Python variable translations not working

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
translationpoexport-translation13.0
3428 Visualizzazioni
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
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
Translation file changed, but the interface did not update.
translation po
Avatar
0
ago 24
2397
Odoo 13 EE eLearning Inappropriate Chinese Translation
translation chinese 13.0
Avatar
0
ott 19
3566
Change Arabic months names in all reports, odoo 11
translation po v11
Avatar
0
set 19
83
Why translation not working for ZIP, State and City in openerp7? Risolto
v7 translation po
Avatar
Avatar
Avatar
2
nov 18
8158
How to translate openerp applications?
translations translation po
Avatar
Avatar
1
mar 15
5908
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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