Using domain on url does not work on version 17
This is the solution:
Create an action record,
Set the domain empty
Browse the action reference object and update the domain field,
Then call your redirect url with the action
e.g
my_action.xml
Dashboard (Memo)
memo.model
ir.actions.act_window
[]
tree,form
your_controller.py
@http.route(['/get-data-info/'])
def get_data_info(self, items):
"""items : '[8,88,90,70]'
action_id = request.env.ref('module.myaction')
menu_id = request.env.ref('module.my_menu')
act_obj = request.env['ir.actions.act_window']
awid= act_obj .browse([ action_id.id])
if awid:
awid.update({ 'domain': [('id', 'in', eval(items))]})
url = f"/web#action={action_id.id}&model=memo.model&view_type=list&cids=1&menu_id={menu_id.id}" return request.redirect(url)
Hi, I need some more info. Why would you want to send "form, mode or action" to backend?
Hai Lucio. I send "form, mode or action" to backend in case when I design an email template with front end designer and save or cancel it, it will redirect exactly the last opened action or form. I think it will usefully for odoo if you want anything about redirect from website to web (front to back).
On Tuesday, July 28, 2015, Lucio <lucio-nardelli-itecnis-com@mail.odoo.com> wrote:
--
Beloved Friend
Andre Leander