class hotel_book(osv.osv):
    _name = 'hotel.book' 
    
    def _complete_name(self, cr, uid, ids, name, args, context):
        
        t = {1: u'Physical Locations', 
            2: u'Partner Locations', 
            3: u'Virtual Locations'} 
        print t
        return t 

    def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):  
        #res = self.name_get(cr, uid, ids, context=context)
        t = {1: 'My Name', 
            2: 'My Other ', 
            3: 'Nhat'} 
        return t
       
    _columns = {
                
        'check_in_date': fields.datetime('Created In', required=True),
        'check_out_date': fields.datetime('Created Out'),
        'room_id': fields.many2one('hotel.room', 'Room',required=True),
        'name': fields.function(_name_get_fnc, method=True, type="char", 
string='Full Name')           
    } 
I have fields.function type 'char', but I don't know returned data in function 
_name_get_fnc ( function get value), In this function I return dict and even 
thought 'string' type, but fields always is readonly status, please help me fix 
this issue.

Many Thanks

Vu Nhut




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

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

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


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

Reply via email to