Search code examples
odooodoo-10odoo-9odoo-11odoo-12

Window action without having so select any record


First and for reference, what I call a window action is an action on the top of a tree view.

Example below:

enter image description here

Problem: if I select no record, Odoo tells me that I have to select record.

Question: I would like the action to be called even if there is no record selected: Is that possible?

Example: the action for instance will start a popup wizard, if a selection of record is done this selection will be preloaded, if no record is selected I will process myself the data preloaded.


Solution

  • The following context in the window action will allow it to be triggered even if no record is selected:

    context="{'sidebar_without_id':True}"