How do you limit selection options in a view? For instance account.voucher has 4 type options, but I want to display only two of them. How do you achieve that in a view definition?
How do you limit selection options in a view? For instance account.voucher has 4
Share
If the selection is applied on a relation field (o2m, m2m) you can play with domains on the xml view itself. If the selection is actually a selection field I’m afraid you can’t do this from XML.
You should be able to do that by overriding the
fields_view_get(orfields_getcan’t remember right now). From there you can manipulate all the stuff you want but you’ll have to handle python code and XML building.grep "def $your_method_here" *into addons folder is your friend 😉