Odoo Help

1

0
1 Answer
0
Avatar

Hiral Patel (hip)

--Hiral Patel (hip)--
973
| 2 1 7
India
--Hiral Patel (hip)--


Hiral Patel (hip)
7/6/13 12:03

id1 is actual.object.id and id2 is other.object.id. Actual object.id and other.object.id are the fields' names used in the relation table, and 'res.partner.category' is the relational object.

The syntax of M2M is fields.many2many('other.object.name', 'relation object', 'actual.object.id', 'other.object.id', 'Field Name')

*'other.object.name' is optional for v7.

Thank you

3 Comments
omprakash
7/6/13 12:54

Hi Hiral Patel , Thanks for immediate reply .. I have doubt in < id1 is actual.object.id and id2 is other.object.id. Actual object.id and other.object.id are the fields' names used in the relation table, > from this point what is relation table from this example & where i can find it ?

HUYREKA Solutions, Gregor Huyskens
14/7/13 05:08

You can find this in the 6.0 documentation. The second argument is the relation name (and table name). https://doc.openerp.com/v6.0/developer/2_5_Objects_Fields_Methods/field_type.html/ ... fields.many2many('other.object.name', 'relation object', ... Where: relation object is the table that makes the link (...) Example: 'category_ids': fields.many2many( 'res.partner.category', 'res_partner_category_rel', 'partner_id', 'category_id', 'Categories'),

evon_dun
7/10/13 03:31

I want to use partner's name from 'partner_ids' field which is a 'many2many' field in the 'partner.ledger.webkit' model, in the attachment prefix for the report 'Partner Ledger Report' example 'object.company_id.name.pdf'. Please help!

Ask a Question
Writer
Keep Informed
1 follower(s)
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