Odoo Help

Welcome!

This community 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.

0

field.related is not working ,Country name is not pop up when i select the destination please help

By
novasoft
on 3/13/14, 2:43 AM 617 views

class Destination(osv.osv):

_name = 'destination.destination'
_description = 'destination.destination'

_columns = {


           'destin_id':fields.many2one('tour.destination','Destination',required=True),
           'country':fields.related('destin_id','country',type="many2one",relation="res.country",string="Country", required=True),
           'noofnights':fields.integer('No:of Nights',required=False),
           'prg_id':fields.many2one('tour.create','pgmq'),
           'hotelinfo_id':fields.one2many('hotel.info','dest_id')
                }

Destination()

class Tourdestination(osv.osv):

_name = 'tour.destination'
_description = 'tour.destination'

_columns = {

         'name':fields.char('Destination Name', size=64, required=True, readonly=False),
           'code':fields.char('Code', size=64, required=True, readonly=False),
             'country':fields.many2one('res.country','Country', size=64, required=True, readonly=False)  
                    }

Tourdestination()

Related Fields output shows only after saving the record.

Prakash
on 3/13/14, 3:33 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 3/13/14, 2:43 AM
Seen: 617 times
Last updated: 3/16/15, 8:10 AM