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

Report: IndexError: list index out of range [Odoo 12]

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
accountingreportingreportodoo12Odoo12.0
2 Odpowiedzi
9000 Widoki
Awatar
ovuvuvuvwe


I have a custom report (like Partner Ledger/General Ledger under Reporting menu) which inherits the template below: templates['line_template'] = 'account_reports.line_template'

My columns in the custom report:

def _get_columns_name(self, options):
        columns = [
            {},
            {'name': _('A_Total'), 'class': 'number'},
            {'name': _('B_Total'), 'class': 'number'},
            {'name': _('C_Total'), 'class': 'number'},
            {'name': _('D_Total'), 'class': 'number'},
            {'name': _('E_Total'), 'class': 'number'},
            {'name': _('F_Total'), 'class': 'number'},
            {'name': _('G_Total'), 'class': 'number'},
            {'name': _('H_Total'), 'class': 'number'},
            {'name': _('Rate')},
            {'name': _('I_Total'), 'class': 'number'}]

        return columns

Here's how I define my columns after getting the totals:

columns = [{'name': v} for v in [self.format_value(a_total), self.format_value(b_total), self.format_value(c_total), self.format_value(d_total), self.format_value(e_total), self.format_value(f_total), self.format_value(g_total), self.format_value(h_total), 'Sample' ,self.format_value(i_total)]]

partner_lines.append({
                    'id': 'partner_' + str(partner_id.id),
                    'name': partner_id.name,
                    'columns': columns,
                    'level': 2,
                    'unfoldable': True,
                     'unfolded': 'partner_' + str(partner_id.id) in options.get('unfolded_lines') or unfold_all,
                     'colspan': 4,
                        })

I expected the output would be the total computations but I get the error:


Traceback (most recent call last):
  File "/home/developer/EclipseWorkspace/odoo12/odoo/addons/base/models/qweb.py", line 344, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_account_reports_line_template_73
  File "<template>", line 2, in foreach_72
  File "<template>", line 52, in foreach_71
IndexError: list index out of range

Error to render compiling AST
IndexError: list index out of range
Template: account_reports.line_template
Path: /templates/t/t/tr/t[2]/td
Node: <td t-att-class="'o_account_report_line ' + (column.get('class', lines.get('columns_header')[-1][column_index+line.get('colspan', 1)].get('class', '')) + (line.get('unfoldable') and ' o_foldable_total' or '')) + ('' if hierarchies_enabled else ' o_account_report_line_indent')" t-att-style="column.get('style', lines.get('columns_header')[-1][column_index+line.get('colspan', 1)].get('style', ''))">
                    <span class="o_account_report_column_value" t-att-title="column.get('title')">
                        <t t-esc="column.get('name')"/>
                    </span>
                </td>
0
Awatar
Odrzuć
Awatar
ovuvuvuvwe
Autor Najlepsza odpowiedź

I removed it but there's still an error.

0
Awatar
Odrzuć
Awatar
Rakesh Vadeghar
Najlepsza odpowiedź

remove the empty dict

  • columns = [ {'name': _('A_Total'), 'class': 'number'},
                {'name': _('B_Total'), 'class': 'number'},
                {'name': _('C_Total'), 'class': 'number'},
                {'name': _('D_Total'), 'class': 'number'},
                {'name': _('E_Total'), 'class': 'number'},
                {'name': _('F_Total'), 'class': 'number'},
                {'name': _('G_Total'), 'class': 'number'},
                {'name': _('H_Total'), 'class': 'number'},
                {'name': _('Rate')},
                {'name': _('I_Total'), 'class': 'number'}]


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ść
Odoo Custom Report - External ID not found Rozwiązane
python reporting report odoo12 Odoo12.0
Awatar
Awatar
Awatar
2
lis 20
9744
How to create Applicable Filters for Account Report (f.e. PnL) to get values for departments in columns? Rozwiązane
accounting reporting odoo12
Awatar
Awatar
6
gru 20
9619
How to call a py3o report using a button? Rozwiązane
reporting report odoo12
Awatar
Awatar
1
cze 20
3455
Error: "Template not found" when trying to print custom report
reporting report odoo12
Awatar
Awatar
1
lip 19
8711
Generate PDF Report From Wizard
accounting wizard reporting report
Awatar
Awatar
Awatar
2
lip 23
8001
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