Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: How to open wizard in edit mode

by
Holger Brunn
- 01/16/2016 06:19:45
> Does anyone know how to open a wizard in edit mode? This question has been
> asked several times on the forum but none of the solutions seem to work.

you should probably link what exatcly you asked an where

> I was hoping I could change the 'target' to 'new' or 'inline' or something,
> but nothing seems to be working. Regards, Shawn

you need to pass a flags dictionary with 'initial_mode': 'edit', similar as in 
https://github.com/OCA/server-tools/blob/8.0/database_cleanup/model/purge_wizard.py#L63
If you need to open the wizard from a menu or the sidebar, you need an 
indirection via a server action as done in https://github.com/OCA/server-tools/blob/8.0/database_cleanup/view/purge_data.xml#L33

-- 
Therp - Maatwerk in open ontwikkeling

Holger Brunn - Ontwerp en implementatie

mail: holger@therp.nl
web: http://therp.nl