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

help with many2one field

By
sanaa tayb
on 5/13/13, 6:55 PM 1,404 views

hey everybody , can anyone help me with the field many2one ??? in my module i have a field with a drop down list where i want to show all the names of my patients already registered in my database ... Plzzzz help meee

my python file :

class medical(osv.osv): _name='medical' _description='dossier medical du patient'

_columns={
            #info general
            'name' : fields.many2one('patient.name', 'name'),

} medical()

my xml file :

<field name="name" domain="[('name','=','name')]"/>

Just as specification i want to get the field "name" from the class : patient

_name='patient'
_description='dossier administratif du patient'
_columns={
            'name' : fields.char('numero d`adhesion', size=30,   required=True),

} patient()

0

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 5/13/13, 7:11 PM

in medical.py

_columns={
          'patient_id' : fields.many2one('patient', 'Patient'),     
         }

in medical.xml

 <field name="patient_id"/>

so in form medical displays a list of patient by name .

thank you very very much it wored :)

sanaa tayb
on 5/13/13, 7:25 PM

Thank you to mark this question resolved.

Borni DHIFI
on 5/13/13, 7:33 PM

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: 5/13/13, 6:55 PM
Seen: 1404 times
Last updated: 3/16/15, 8:10 AM