Hi everyone!
I would like to add a menu item that would create a CSV file and let me download it when i click on that item. I already created my menuitem and a related action:
<record id="my_action" model="ir.actions.server"> <field name="sequence" eval="5"/> <field name="state">code</field> <field name="type">ir.actions.server</field> <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/> <field name="name">Export CSV</field> <field name="code">self.my_action(cr, uid, context.get('active_ids', []))</field>
</record>
<menuitem name="action" parent="hr_attendance.menu_hr_time_tracking" sequence="99" id="my_id action="my_action"/>
When i click on that button, i would like to generate a CSV file and allow the user to download it.
Could anyone help me? I searched with google, but what i find is always related to odoo's standard export feature.
Thanks a lot!
Did you find any solution?