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

Close wizard after print report

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
wizardreportodooV8
3 Odpowiedzi
13512 Widoki
Awatar
ASP

Hi All,

In my project there's a requirement to cut check in batch and print reports in a single click by selecting the list of open supplier invoices. To achieve this I've prepared a wizard and added an option called 'Write check in batch' under 'more' button of the invoice tree view.

 When I select a list of open invoices and choose the above option, a wizard appears for check number entry and it has 2 buttons: 

1. Confirm, 2.Cancel. When user enters the check number and click on confirm it is creating voucher record and validating it as well. Also I'm getting the PDF report instantly as I'm returning a report action at the end of the function.


But my issue is the wizard is not closing and still remains open even after report generation. The Confirm button on the wizard is of type object and I've defined a corresponding method for it where at the end I'm using this:


return self.pool['report'].get_action(cr, uid, [], 'model.report', contect=context) - which generated the PDF.


But my wizard is not closing. Please help me on this. Any help would be appreciated :)


Regards

ASP 

1
Awatar
Odrzuć
Michael Goetz-Schneider

Hi ASP, I see just a typo contect=context, but this may be just copy and paste error. We made a generic print wizard initiated by a button, to be able to send the document to a server printer using base_report_to_printer from a third party named Agile. In Version 7 everything works fine, after printing a preview, i.e. PDF as usual, the wizard closes, in Version 8 it does not. Your project may differ from ours, but it is the same issue. Could you solve your problem meanwhile ?

Anabela Damas

Did you find the solution?

Awatar
Najlepsza odpowiedź

Hi !

Maybe late but solution is to remove report_type key of the resulting dict.

Example:

action_dict = self.env['report'].get_action('xml_id_of_report')
del action_dict['report_type']
return action_dict

or instead of using the get_action method, you can return this

return {'type': ir.actions.report.xml', 'report_name':'xml_id_of_report'}

Hope this help

1
Awatar
Odrzuć
Deepa Venkatesh

First option worked liked a charm, though second option didn't work for me. Still good solution, earned a point from me :).. ThankQ...

Deepa Venkatesh

However this fails to load the Qweb format.

@deep maybe your Qweb report has an error because I already launch a Qweb-pdf report successfully with this piece of code

Awatar
Pouya Malekinejad
Najlepsza odpowiedź

in your report action add this:
{
'close_on_report_download':True
}

Example:

def action_confirm(self):   
    vouchers=self.create_vouchers()
r\eport_action=self.env.ref('your_module.your_report_action').report_action(self.ids_to_print)
    report_action['close_on_report_download']=True
    return report_action

and in your form view :
<footer>
<button string="Confirm" class="btn-primary" type="object" name="action_confirm"/>
<button string="Cancel" class="btn-secondary" special="cancel"/>
</footer>


0
Awatar
Odrzuć
Aïmane

Works in odoo 12, thank you very much.
Where have you found that, is it in a documentation ?

Pouya Malekinejad

No it is not in documentation nor it is used anywhere in Odoo, I needed it and I was looking where to add it and it was already there!

Awatar
Cybrosys Techno Solutions Pvt.Ltd
Najlepsza odpowiedź

Hello,

In your case consider the following example

report_reference = self.env.ref('your_module_name.your_report_action_id').report_action(self, data=datas, config=False)
report_reference.update({'close_on_report_download': True})
return report_reference

It will close the wizard after downloading the report

Regards

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ść
Generate Report excel from Custom Wizard in Odoo8 ?
wizard report excel odooV8
Awatar
0
kwi 18
7008
Change PDF report name on wizard
wizard report
Awatar
Awatar
2
lip 24
4070
Blank report PDF from Wizard Rozwiązane
wizard report
Awatar
Awatar
2
kwi 24
3608
External ID not found in the system
wizard report
Awatar
4
paź 20
6526
how can i add default image to wizard?? Rozwiązane
wizard odooV8
Awatar
Awatar
Awatar
Awatar
3
cze 19
5984
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