Thanks for your reply :)

But still doesn't work :(

I've tried hda's solution : fields.many2one and then widget="selection"
I've tried as well without : widget="selection" just to see if the selection 
was keeped 
Without any result.

DreamersDelight, I think you're right but I don't know why I'm not able to only 
select the name in my query !

I follow your advice and I tried this function :

def _get_monde(self, cr, uid, context={}):
    obj = self.pool.get('monde')
    ids = obj.search(cr, uid, [], context=context)
    res = obj.read(cr, uid, ids, ['code', 'name'], 
context)
    return [(r['code'], r['name']) for r 
in res] + [('','')]

'monde_1': fields.selection(_get_monde,'Language order1'),


maybe something wrong with my  class 'monde' ???


class monde(osv.osv):
    _name = 'monde'
    _description = 'monde'
    _columns = {
        'name': fields.char('Monde Name', size=64,
            help='The full name of the monde.', 
required=True, translate=True),
        'code': fields.char('monde Code', 
size=2),
    }
    _sql_constraints = [
        ('name_uniq', 'unique (name)',
            'The name of the monde must be unique 
!'),
        ('code_uniq', 'unique (code)',
            'The code of the monde must be unique 
!')
    ]
monde()

I start to get crazy with this !

Thanks a lot for your help :)




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=60241#60241

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to