Hi, I want to create a module with my custom QWeb reports. If I install it they should appear as report in other modules, in addition to the existing ones. For example under the print option for invoices should be the default qweb report and my custom report. Is this possible and if yes how can I achieve it?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
Please read the documention: https://www.odoo.com/documentation/10.0/reference/reports.html and this nice tutorial from Yenthe: https://www.odoo.yenthevg.com/inheriting-and-modifying-qweb-reports/.
Hi,
You can click following button for creating reports in odoo 12 Qweb reports in odoo 12
Thanks for your answers.
I had a look at the manual. This specific manual is for changing an existing report. My aim is to add a new report.
Nevertheless I inherited the account.invoice module in my module in the following way:
from openerp import models, fields, api
class custom_vierimpott(models.Model):
_name = 'custom_module.custom_module'
_inherit="account.invoice"
name = fields.Char()
Furthermore I wrote in my report.xml:
<openerp>
<data>
<report
id="custom_report_without_prices"
model="account.invoice"
string="Invoice without prices"
report_type="qweb-pdf"
name="custom_module.report_without_prices"
attachment_use="False"
file="custom_module.custom_module"
/>
</data>
</openerp>
After this I refreshed the module. Unfortuneatly there were no results. That means under Invoicing I can only print the default invoice-report.
What is wrong in my approach?
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
4
ม.ค. 25
|
43241 | ||
|
0
ต.ค. 24
|
759 | ||
|
0
ต.ค. 24
|
5 | ||
|
1
พ.ค. 23
|
2201 | ||
|
0
เม.ย. 22
|
1722 |
To achieve this you need to inherit the template for that model and make necessary changes. Please go through the official documentation.
I found some resource about qweb reports have a look into:
1-http://learnopenerp.blogspot.com/2016/09/how-to-create-custom-reports-in-odoo.html
2-http://learnopenerp.blogspot.com/2016/11/how-to-create-qweb-reports-in-openerp.html
Hope its help you and others.
Keep sharing keep learning
Thanks