Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

How to create pdf report from website frontend?

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
pdfformreportingwebsitev14
2 Besvarelser
7990 Visninger
Avatar
Tri Nanda

I using Odoo14,

I have a form for student course registration,which is the form is accesible from public (no login require).


When a user register on the form, I want to have an option, there are a button to print a pdf report from their filled data by themself.


So, how to create pdf report from website frontend?


please , any help, source or tutorial how to do that will be very thanks,


Thanks,

Tri Nanda

0
Avatar
Kassér
Avatar
Tri Nanda
Forfatter Bedste svar

I solved this by using this code:

my controller code

@http.route('/create/course-registration', type="http", auth="public", website=True)
def create_course_registration(self, **kw):
my_other_code...
my_other_ocde...
student_course = request.env['aqur.student.course'].sudo().create(
{'student_id': student_id.id, 'course_id': kw['course_id'], 'course_category_id': kw['course_category_id'],
'requisition_schedule_id': requisition_schedule_id})
return request.render('aqur_core.student_registration_thanks', {'student_course': student_course})


and here is my website template view:









(sorry if  I  screenshot the code above,when I paste my code in this forum it always disapear when I submit answer.

But I got the other problem now, the user must do login to access the pdf,

Is there a way to access or download the pdf with public user that don't require to login?

Please, any help, source or tutorial how to do that will be very thanks,

Thanks,

Tri Nanda


0
Avatar
Kassér
Avatar
Niyas Raphy (Walnut Software Solutions)
Bedste svar

Hi,
 I hope once the form is filled, you will be recording data in the backend model/table, define a report for that model, and from the website you can call/print that report.

For  printing  from  website,  see this  answer :   How to print/Download report from website ?


Thanks

1
Avatar
Kassér
Tri Nanda
Forfatter

Hi @Niyas, thank you for the answer,
Yes Niyas, when the form is filled and submited, it will record the data in the backend table/module.

Thank you for the reference answer Niyas,
but Niyas Sory, am still confused in where should I do start to write the code, do you have reference how to do that from stratch Niyas?, or step by step on how to do that?

Thanks,
Tri Nanda

Niyas Raphy (Walnut Software Solutions)

for creating report in backend see: https://www.youtube.com/watch?v=pIevsbkoq-E

Tri Nanda
Forfatter

Hi @Niyas, I can print the report now from my backend, thank you very much for the tutorial Niyas. I also can print report now from a button that call python function using your tutorial here: # https://www.youtube.com/watch?v=Dc8GDj7ygsI&list=PLqRRLx0cl0hoJhjFWkFYowveq2Zn55dhM&index=67

Now I confuse, how to call the function from Odoo website frontend Niyas.
may you refer me a code, source or tutorial how to do that Niyas, please?
Thanks,
Tri Nanda

Tri Nanda
Forfatter

@Hi Niyas, I solved this problem now, thank you for your tutorial reference. But I got other problem now, my user must do a login to access the pdf,

is there a way how access the pdf from public user thah doesn't require to login?

Thanks,
Tri Nanda

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

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

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
How to create multi step website forms?
form controllers website v14
Avatar
Avatar
Avatar
2
feb. 24
6523
Change color of table td odoo14
pdf reporting report v14
Avatar
Avatar
1
apr. 23
2536
How to assign a url to a download button on odoo website(v11) Løst
purchase pdf reporting url website
Avatar
Avatar
1
aug. 22
7083
(Odoo v11) Print button on website to print the report in pdf. Løst
pdf reporting v11 website odoo
Avatar
Avatar
Avatar
7
jan. 20
10771
website form
form website
Avatar
Avatar
Avatar
2
maj 25
10674
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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