Dynamic view from a MANY2ONE field !

Asked by Olivier Lenoir

The aim is to help the user to enter data in a field :
1) a form is displayed,
2) the user starts typing characters in a selection field
3) as soon as a list of values are proposed to him
    for instance he types "P" and the list of values proposed is "Potatoes", "Prunes" , "Pears"... (and only "Pears" if he types Pe)
4) of course it is interesting to allow him or not to add "Peaches"
5-1) then if he is allowed to and if he adds a new value, the view may be changed.
5-2) the view may also be changed according to the choice because the treatment to apply on "Potatoes" may be different from this one of "Pears"...

Perhaps an example exists but I don't find it out.

Thanks for help

Heavy silence !

In other words, is-it possible to display a view with a
one2many field with an empty list, the list having values only
when the user starts typing something ?
This could be a kind of "on change"...

Thanks for some noise ;-))

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#1

Hello Olivier,

I would like to ask you more about your question as it sound more unclear.

1) You want O2M records to appear dynamically on onchange of selection fields? It has not been implemented yet.
2) You want Selection field to have new values? No, its not possible, Better you make it many2one.

Thanks.

Revision history for this message
Olivier Lenoir (olivier-lenoir-free) said :
#2

Hi vra,

Yes, you are right, it's a M2O relation (seen from the other side;-))! )
We've been working on today, we found some code in the account module
but nothing close to that matter.
Any solution ?

Thanks a lot,

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#3

Hello Olivier,

Would you please clarify the aim?

As posted by VRA, which aim you want to serve?

Thanks.

Revision history for this message
Olivier Lenoir (olivier-lenoir-free) said :
#4

Hello Jay,

In our module, the users have to manage with thousands of objects and to select them they use their components
from three or four M2O relations. Usually the users know one or more of the components by the beginning of their names. Imagine four fields labeled with Obj-to-manage, Component-A, Component-B, Component-C.
The user knows the first letter of Obj-to-manage, and the name of the Component-C... Because he types the name "CComp" of Component-C then the first letter "O" of Obj-to-manage, it is possible to
1) verify that "CComp" exists,
2) select all the Obj-to-manage beginning by "O" having the Component-C "CComp"
This should reduce a lot the list of Obj-to-manage and the selection lists of components A and B.
We found some very interesting code in the account module to open dynamic forms from a choice made in a first form but without the mechanism I try to explain.

Is it a bit more clear ?
Thanks,
Olivier

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#5

Hello Olivier,

We understood that your aim is to get dynamic view of next form based on selection.

2 things we need to know:
1. You mentioned choice on first form. Are you trying this on wizard?
2. Where did you see the similar code in account module?

Without being aware about your purpose, it would not be easy to suggest you the best way.

Thanks.

Revision history for this message
Olivier Lenoir (olivier-lenoir-free) said :
#6

I made a presentation, would you please tell me an address to send it.

Revision history for this message
Olivier Lenoir (olivier-lenoir-free) said :
#7

Thanks
--
Olivier LENOIR
13 Av de La Porte Chaumont
75019 Paris
http://www.remotesignature.com
Fixe : 09 53 97 60 82
Bureau : 01 58 35 39 38
Mobile : 06 88 96 56 03

Revision history for this message
Olivier Lenoir (olivier-lenoir-free) said :
#8

The use of the reply address is not the good idea to send a document !
Sorry

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#9

Hello Olivier,

You can send me document on email id: <email address hidden>.
so i will check.

Thanks.

Revision history for this message
LOlivier (olivier-lenoir) said :
#10

The presentation has been sent.
Thanks

Revision history for this message
Olivier Lenoir (olivier-lenoir-free) said :
#11

Hi Vra,

I'm going to close this question we are working on not too bad solutions.
Some feed back will be provided about.
Our problem remains in the documentation of open object.
We'll try to send some suggestions.
I would compare Open Object to a Rolls Royce but without the key.

Can you help with this problem?

Provide an answer of your own, or ask Olivier Lenoir for more information if necessary.

To post a message you must log in.