Odoo Help


How to pass values to a method that defines selection for multiple fields?

on 4/22/15, 1:29 AM 682 views

I am trying to get selections for multiple fields from the same method, but I don't find the way to pass the values:

_columns = { 
    'x_standard': fields.selection(selection='_get_selection', string='Standards', required=1),
    'x_pressure': fields.selection(selection='_get_selection', string='Pressure', required=1),
def _get_selection(fieldname):
    selection = []
    if fieldname=='x_stanadard':
    elif fieldname=='x_pressure':
    return selection

Thanks for any help!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/22/15, 1:29 AM
Seen: 682 times
Last updated: 4/22/15, 2:04 AM