Odoo Help

0

help with many2one field

By
sanaa tayb
on 5/13/13, 6:55 PM 1,589 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--
5122
| 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

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.

Register

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

0 follower(s)

Stats

Asked: 5/13/13, 6:55 PM
Seen: 1589 times
Last updated: 3/16/15, 8:10 AM