Odoo Help


how to retrieve data one2many fields from product.suplierinfo

on 7/4/15, 2:14 AM 1,154 views

hi to all,
firstly for give me about my quesstion , may be is not clear ( i am very new to openerp ).

when we add new product, there is tab to add supplier info.such as sec,name,limited delay, qty, etc.

en i need to appear data of suppier name info on tree view of product.product..

ould be great thanks for help.
thanks in advance

One2many fields are not feasible to put on the tree view, you might have multiple supplier records on one product and a list view cannot show all, but it will show only the number of suppliers. Thanks.

Serpent Consulting Services Pvt. Ltd.
on 7/4/15, 4:27 AM

Anil R. Kesariya

--Anil R. Kesariya--
| 6 5 8
Rajkot, India
--Anil R. Kesariya--

Odoo Techno Functional Expert

* Engaged with odoo since May - 2012.

* Customise existing module or develop new module base on customer requirement.

* Played key developer role in many past and running projects.

* Expert in requirement gathering of business and transforming requirement into odoo platform.

* Major expertise in core modules, database, report development and theme development.

* Integration expert.

Linkedin  : https://in.linkedin.com/in/anil-kesariya-97b20a66

Anil R. Kesariya
On 7/4/15, 2:33 AM

Hi Henro,

If you want to retrive data of product supplier info.

1) You need to have browse record of product itself.

2) As product supplier info is one2many field than you need to iterate loop to get information of related supplier info.

Than, you can perform your next action for it.

For eg:

I already browse record of product.product model

Than you can get info like this:

for supplier_info in product.seller_ids:
    print "Access info of any fields which is defined in supplier info table", suppplier_info.name  
    print "Product Name:::", suppplier_info.product_name 
    #so on...

@Note: seller_ids is one2many field defined in product model.

Hope this will helps you.



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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 7/4/15, 2:14 AM
Seen: 1154 times
Last updated: 7/4/15, 4:27 AM