콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2927 화면

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?

관련 게시물 답글 화면 활동
4
7월 19
7773
2
8월 25
199
0
7월 25
461
1
7월 25
860
1
7월 25
1284