i want to make qweb report accessible for public user of my custom object
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
Hi,
- Create the QWeb Report: First, create the QWeb report that you want to make accessible to public users. This involves creating an XML file in your custom module with the QWeb template for your report.
- Configure Access Rights: In order to allow public users to access your report, you need to configure the appropriate access rights. You'll need to decide whether these users should be able to view, edit, or create records of your custom object and access the report
- Create a new user group specifically for the public users who need access to your report.
- Assign the public users (or a role/group containing public users) to the newly created user group.
Code :
<record id="report_custom_object_id" model="ir.actions.report">
<field name="model">your.custom.
<field name="name">Your Report Name</field>
<field name="report_type">qweb-pdf</
<field name="report_name">your_
<!-- Add this line to restrict access to the user group -->
<field name="groups_id" eval="[(4, ref('your_module.group_public_
</record>
Hope it helps
It was truly useful! Without an inquiry, I've just barely begun, however I'm finding out increasingly more about it. Much thanks to you for being benevolent, and proceed with the astounding exertion.