Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
7 ตอบกลับ
41744 มุมมอง

Please help me to add print button inside form view instead of the one in header

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Sreedath,

Adding a print button is nothing but is just like you add a normal button. Add a button to your view for eg:

 <button name="%(REPORT ACTION ID)d" string="YOUR STRING" type="action" icon="gtk-print"/>

where REPORT ACTION ID is the id of your report that you have declared in the .xml file.

Thanks,

อวตาร
ละทิ้ง
ผู้เขียน

Thank you :) It worked. I have tried one more method, it also worked fine :)

Can we get a printout of DASHBOARD...?

คำตอบที่ดีที่สุด

in your report there must be a report tag as follows.

<report id="profit_loss_report"  model="Account.checklist"  string="Check List"  name="module_name.report_document"  file="module_name.report_documentreport_type="qweb-pdf"/>

the report id is in the first line :"profit_loss_report" 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello,

I followed your method and I replaced the module_name with my module's name "Medical prescription". When I print a prescription an error message is displayed "External ID not found in the system: Medical Prescription.report_document"

Could you help me please

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

hi i added the button but i do not know how to get report action id where i can find it ????

please help me in this..

thanks in advance

อวตาร
ละทิ้ง

Hi Marc, you will find the report action id from the xml you created for declaring your report.

Related Posts ตอบกลับ มุมมอง กิจกรรม
How to add a "print" button in form view แก้ไขแล้ว
3
ก.ค. 22
11517
1
พ.ย. 15
10724
how to print a custom report in openerp แก้ไขแล้ว
1
ต.ค. 22
5682
6
เม.ย. 20
11287
2
มี.ค. 15
7584