Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Consulting
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

Creating a custom report

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
developmentmodulesreport
1 Atsakyti
2895 Rodiniai
Portretas
Christopher Piggott

I need to make a report that includes the lead_properties in a crm.lead but with the lead properties properly exported - names for the fields from the crm.team record, and value names if it's a selection.  I figured this would also be a good way to try making my first custom report in a module.

I was able to create the module, get it to add itself to the CRM/Reporting menu, and invoke it, but I'm not getting any data.  The template is being invoked, just no rows.

The report itself looks like


          model="crm.lead"
        string="Custom CRM Lead Report"
        report_type="qweb-pdf"
        file="custom_crm_lead_report.report_template"
        name="custom_crm_lead_report.report_template"    />

I have tried a bunch of different ways to get sample data in, but my generate_report() method doesn't ever get called. That's in addition to the fact that I'm probably not returning the correct thing.

Do I need to do something in the report description xml to tell it "and this is the method you call to get the rows of data" ?


class CRMLeadReport(models.Model):
    _name = 'crm.lead.report'
    _description = 'Custom CRM Lead Report'
   @api.model
  def generate_report(self):
        _logger.error("OH NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO")
sample_data = [
            {'lead_name': 'Lead 1', 'team_name': 'Sales Team A', 'custom_data': 'Sample Data 1'},
            {'lead_name': 'Lead 2', 'team_name': 'Sales Team B', 'custom_data': 'Sample Data 2'},
            {'lead_name': 'Lead 3', 'team_name': 'Sales Team C', 'custom_data': 'Sample Data 3'}
        ]   return  {            'docs': [sample_data]        }

0
Portretas
Atmesti
Christopher Piggott
Autorius

I think I did everything in that video. Also I followed github.com/vyngt
/odoo-sample-app which shows a couple of reports. I'm quite certain these line up:

<field name="model">crm.lead.coe_report</field>
class COELeadReport(models.Model):
_name = 'crm.lead.coe_report'

This model definitely gets loaded (I can see it in settings / technical / database / model).

so everything seems to be linked together, but my get_report_values never gets called:
@api.model
def _get_report_values(self, docids, data=None)

Yahoo Baba Innovations Pvt.Ltd

I need to check your code first, and then I'll provide the correct answer. Can you please share the code?

Yahoo Baba Innovations Pvt.Ltd

if you need more help feel free to contact i'll guide you.

Christopher Piggott
Autorius

https://github.com/wz2b/odoo-report-example

Christopher Piggott
Autorius

I think I figured it out. The rules for how these pieces have to be named are a little complicated.

Portretas
Yahoo Baba Innovations Pvt.Ltd
Best Answer

Hello Christopher Piggott ,


Please refer the video: https://youtu.be/H7cGI23BHNs?si=F095OmTe2rewo7rR

I have shared video please checked and try after if you have any doubt let me know.


Hope this helps!

Thanks & Regards,

Name : Yahoo Baba

Email: yahoobaba077@gmail.com

0
Portretas
Atmesti
Enjoying the discussion? Don't just read, join in!

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

Registracija
Related Posts Replies Rodiniai Veikla
Odoo 18 - Custom Module - Error on nested class view Solved
development modules
Portretas
Portretas
Portretas
2
liep. 25
3569
How to upgrade modules in a specific file?
development modules
Portretas
0
kov. 24
2419
Trying to add fields to sale order form view give "AssertionError: Element openerp has extra content" Solved
development modules
Portretas
Portretas
2
lapkr. 16
6538
Error: External ID not found in the system Solved
development modules
Portretas
Portretas
Portretas
3
vas. 16
17402
How to prevent some modules from loading
development modules
Portretas
Portretas
Portretas
Portretas
3
kov. 15
10284
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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