تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5163 أدوات العرض

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.

أفضل إجابة

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.

Regads,

Anil.



الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
يونيو 16
3533
2
أكتوبر 17
8451
3
فبراير 25
3599
0
مايو 24
46
1
أبريل 24
3378