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.

1

How do I create a selection field?

By
sanaa tayb
on 5/12/13, 8:38 PM 1,874 views

hello everyone ... I created a new module called : infos_admin where I have a registration form with a bunch of fields to register a new patient in my database , the problem is I created another module where I need to get all the patient names so select one...

Any idea how to realise this?

Provide more details so we can help you. what exactly you mean by 'get all the patients names'? do you want to let the user to select one? or show a table containing all patient records? and what you want to be able to do with them?

Smart Way LLC, Anas Taji
on 5/13/13, 1:09 AM

i want to create a "drop down list" containing the list of all my patient's names, and let the user select one of them ... do you see what i mean?? thanks for your reply :)

sanaa tayb
on 5/13/13, 5:53 PM
5

Anas Taji

--Anas Taji--
2203
| 6 7 8
Amman, Jordan
--Anas Taji--

Skype: anas.taji-sw

Email: anas.taji@smartway-jo.com

Anas Taji
On 5/13/13, 9:15 PM

In your second module class, add the following field:

_column = { ...
          'patient_id': field.many2one('patient.object', 'Patient')
          }

In the second module form view, add the field like below:

<field name="patient_id" widget="selection" string="Patient"/>

Hope this will help you..%

Thank you very very much , it did woork :)

sanaa tayb
on 5/14/13, 1:22 PM

Glad to hear it, you may want to mark the question as solved.. ;)

Smart Way LLC, Anas Taji
on 5/14/13, 4:19 PM
0
Francisco Castro
On 3/3/14, 2:41 PM

how can I use that selection type to list some items of the choice I made for example the age, the color of the hair, etc on another field?

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

2 follower(s)

Stats

Asked: 5/12/13, 8:38 PM
Seen: 1874 times
Last updated: 3/16/15, 8:10 AM