I implemented a REST API on odoo using a controller. the API receives the contact id which I need to use to open the main contact page. I tried with request.redirect but it doesn't work "request.redirect("http://127.0.0.1:8069/web#id=26&cids=1&menu_id=338&action=475&model=res.partner&view_type=form") Thanks in advance.
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
This question has been flagged
Hello VOIP_CRM,
You can redirect to contact page from odoo controller.
Find Example in comment.
I hope this will help you.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
For Example -
def get_contact_url(self):
"""This method will return url"""
action_id = self.env.ref('contacts.Your_template_id')
url = self.env['ir.config_parameter'].sudo().get_param('web.base.url')
contact_url = '/web#id=%s' % (self.id) + '&action=%s' % (action_id.id) + '&model=res.partner&view_type=form'
return url + contact_url
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up