Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
3001 Lượt xem

I need to hide report from print menu in odoo17 ,menu doesn't work

<record id="action_report_hr_retirements" model="ir.actions.report">
    <field name="name">Print Custom report</field>
    <field name="model">hr.employee</field>
    <field name="report_type">qweb-pdf</field>
    <field name="report_name">h_emp.report_hr_retirements</field>
    <field name="report_file">h_emp.report_hr_retirements</field>
    <field name="binding_model_id" ref="model_hr_employee"/>
    <field name="binding_type">report</field>
    <field name="menu">False</field>
</record>


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello @Asmaa


Hope you are doing well.


- To hide the report from the print button, you need to update the "binding_model_id" to false, Please check below code. 
Please check code in comment. 

Feel free to contact me if needed

Hope this will help you.

Thanks & Regards,

Email: odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari

Ảnh đại diện
Huỷ bỏ

Please find code here :-
<record id="action_report_hr_retirements" model="ir.actions.report">
<field name="name">Print Custom report</field>
<field name="model">hr.employee</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">h_emp.report_hr_retirements</field>
<field name="report_file">h_emp.report_hr_retirements</field>
<field name="binding_model_id" eval="False"/>
<field name="binding_type">report</field>
<field name="menu">False</field>
</record>

Câu trả lời hay nhất

Hi,

If you need to remove the reporting printing menu option from your module, you can remove the binding_model_id and the binding_type of your code.


Hope it helps



Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

hello

you can try to path with those 

Annabelle

Ảnh đại diện
Huỷ bỏ