Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Artificial Intelligence
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Property Management
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Unknown report type: xlsx: - Odoo 10

Odoberať

Get notified when there's activity on this post

This question has been flagged
reportexcelxlsxodoo10
1 Odpoveď
7889 Zobrazenia
Avatar
kbytez, Kabeer KB

I am trying to create an xlsx report. I tried below code but getting an error:

Traceback (most recent call last): File "/home/shar/Projects/git/odoo/addons/web/controllers/main.py", line 72, in wrap return f(*args, **kwargs) File "/home/shar/Projects/git/odoo/addons/web/controllers/main.py", line 1485, in index request.session.db, request.session.uid, request.session.password, report_id]) File "/home/shar/Projects/git/odoo/odoo/http.py", line 118, in dispatch_rpc result = dispatch(method, params) File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 35, in dispatch res = fn(db, uid, *params) File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 142, in exp_report_get return _check_report(report_id) File "/home/shar/Projects/git/odoo/odoo/service/report.py", line 120, in _check_report raise UserError('%s: %s' % (exc.message, exc.traceback)) UserError: (u"Unknown report type: xlsx: (, NotImplementedError(u'Unknown report type: xlsx',), )", '')

Here is my code:

*.py

# -*- coding: utf-8 -*-
from odoo.addons.report_xlsx.report.report_xlsx import ReportXlsx

class PartnerXlsx(ReportXlsx):

    def generate_xlsx_report(self, workbook, data, partners):
        for obj in partners:
            report_name = obj.name
            # One sheet by partner
            sheet = workbook.add_worksheet(report_name[:31])
            bold = workbook.add_format({'bold': True})
            sheet.write(0, 0, obj.name, bold)


   PartnerXlsx('report.module_name.res.partner.xlsx',
        'res.partner')

*.xml

  <report
      id="partner_xlsx"
      model="res.partner"
      string="Print to XLSX"
      report_type="xlsx"
      name="res.partner.xlsx"
      file="res.partner.xlsx"
      attachment_use="False"
  />
0
Avatar
Zrušiť
Avatar
Akshay
Best Answer

1.Make sure you added "report_xlsx" in the dependency

2. Check the indentation 

        PartnerXlsx('report.module_name.res.partner.xlsx',

        'res.partner')

        should be outside the class.

3. <report

      id="partner_xlsx"

      model="res.partner"

      string="Print to XLSX"

      report_type="xlsx"

      name="your_module_name.res.partner.xlsx"

      file="your_module_name.res.partner.xlsx"

      attachment_use="False"

1
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
Print Excel Report, the use of partner_xlsx('report.res.partner.xlsx', 'res.partner')
report excel xlsx odoo
Avatar
0
dec 22
6399
Odoo 14 to Odoo 18 Migration Issue – Aged Partner Balance Report
report excel
Avatar
Avatar
Avatar
2
máj 26
789
How to add a total row at the end of Excel report in Odoo ?
report excel
Avatar
Avatar
Avatar
Avatar
3
apr 26
1235
How to get the data inorder to generate an excel report? Solved
python report excel table odoo10
Avatar
Avatar
Avatar
2
dec 24
8671
how to check existence of excel file in root directory in odoo V11
report excel xlsx xlrd odoo11
Avatar
0
jan 19
6206
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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