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 made a custom web controller and I want to link to the action of that controller inside a view form to download a file. The only problem I am facing currently is to show the link in the view for the user to click, at this point I don't care if it looks like a button or a link anything or any help would be appreciated. Bellow is the code for the controller and the form inside of which I want the link/button to appear.
#controller class MyController(http.Controller): _cp_path = '/sc'
@http.httprequest def some_html(self, req, s_action=None, **kw): return req.make_response(open('/home/ramywafa/openerpworkspace/imms_modules/imms_crew/controllers/templates/1.docx').read(), [('Content-Type', 'application/octet-stream; charset=binary'), ('Content-Disposition', content_disposition('1.docx', req))], )
#xml view <record model="ir.ui.view" id="view_sefarer_applicant_form"> .... <sheet>
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: 4/14/14, 1:08 PM|
|Seen: 1035 times|
|Last updated: 3/16/15, 8:10 AM|