Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

Export Python variable translations not working

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
translationpoexport-translation13.0
3413 Widoki
Awatar
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
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Translation file changed, but the interface did not update.
translation po
Awatar
0
sie 24
2394
Odoo 13 EE eLearning Inappropriate Chinese Translation
translation chinese 13.0
Awatar
0
paź 19
3562
Change Arabic months names in all reports, odoo 11
translation po v11
Awatar
0
wrz 19
83
Why translation not working for ZIP, State and City in openerp7? Rozwiązane
v7 translation po
Awatar
Awatar
Awatar
2
lis 18
8155
How to translate openerp applications?
translations translation po
Awatar
Awatar
1
mar 15
5902
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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