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

Many2many fields not working in wizards in 7.0

By
Maniganda
on 5/13/13, 5:22 AM 2,638 views

hi i am creating many2many fields in openerp 7.0 wizards,and i am getting the value as empty list if i select the values also ,what is the problem ??

0

Maniganda

--Maniganda--
1038
| 5 7 7
Bangalore, India
--Maniganda--
Maniganda
On 5/22/13, 8:49 AM

I fixed the issue by giving different relation name for many2many relation table such as field1 :fields.many2many('res.partner','some_rel','curr_id','res_id') field2 :fields.many2many('res.partner','some_rel1','curr_id','res_id')

Can you help me to do the same

Shivam Mahajan
on 1/13/16, 1:53 AM
2

Andreas Maertens

--Andreas Maertens--
912
| 5 5 7
Finsterwalde, Germany
--Andreas Maertens--

I develop odoo8.0 modules

Andreas Maertens
On 5/22/13, 11:33 AM

You just can ignore the rel, field1 and field2 attributes. I just made a wizard relating to attachments by adding field: fields.many2many("ir.attachments", string="Attachment")

and it works.

You need to fill that relation in _defaults by a method using following pattern:

def _get_default_attachment(self, cr, uid, context=None):

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, 5:22 AM
Seen: 2638 times
Last updated: 3/16/15, 8:10 AM