Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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>
<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!
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 1/26/16, 10:00 AM|
|Seen: 656 times|
|Last updated: 1/26/16, 11:26 AM|