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

I have added a menu item in Reporting Tab in Manufacturing module. I have already written python code to create CSV file. How do I make it downloadable when I click the menu item in manufacturing module.

This is how I added the menu:

<record model="ir.actions.act_window" id="raw_material_planning">
<field name="name">Raw Material Planning</field>
<field name="res_model">gear.manufacturing</field>
<field name="view_mode">calendar,tree,form</field>
</record>

<menuitem name="Raw Material Planning" parent="mrp.menu_mrp_reporting" id="menu_raw_material_planning"
action="raw_material_planning"/>

I need some assistance
อวตาร
ละทิ้ง

can you provide a code of how you added a menu ? I am interested in when you click on menu it makes http request or xhr/ajax

ผู้เขียน

I have added the code in question

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

Hi,

You can call a python function from the menu item and do accordingly, to call python function from the menu item, check this link: How to call python function from menu item

Thanks

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

Thanks for the response. But how do I make result downloadable as csv?

Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ก.ค. 19
7773
2
ส.ค. 25
229
0
ก.ค. 25
462
1
ก.ค. 25
862
1
ก.ค. 25
1286