onetomany fields

Asked by Pravitha V

I try to create a related field on OpenERP 6.0.1 . is it possible to define two different onetomany relation for the same field name? What all changes i must do in the(.py file and XML Files).

_________________
Regards,
Nightfury

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
Serpent Consulting Services (serpent-consulting-services) said :
#1

Hello Praveetha,

You may try this:

'children_ids':fields.related('myfield_id','children_ids',relation=my.children', type='one2many',string="Children"),

As you see, you should always link one field to one field.

As such, what is the aim that you needed 2 fields to affect 1 field?

I suggest you can override one2many() class and combine values of 2 one2many fields.

Regards,
Serpent Consulting Services.

Can you help with this problem?

Provide an answer of your own, or ask Pravitha V for more information if necessary.

To post a message you must log in.