Make wizards only available in form-mode and not in list-mode

Registered by EdbO on 2008-12-29

Go to "administration"->"low level objects"->"Actions"->"Wizards", you get a list of available wizards. As you can see at the right there is a checkbutton called "Action on multiple docs". This means that the wizard isn't available when you are in a form.

There is no option to make a wizard only available when you are in a form. It's very easy to do that.

Modify the ir.xml and ir_actions.py on the server-side (both in the base-module) and the main.py on the clientside (modules/actions/main.py).
search the ir.xml for "act_wizard_view_tree" and "act_wizard_view" and add "<field name="single"/>"

search the ir_actions.py for "class act_wizard" and add
" 'single': fields.boolean('Action on single doc.', help="If set to true, the wizard will not be displayed in the list."), " to the columns section.

search the main.py for "def exec_keyword" and add above "except rpc.rpc_exception, e:" " actions = filter(lambda x: not x.get('single',False), actions) "

Restart the server with --update=base, restart the client and enjoy!

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.