Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
5409 มุมมอง

I've a class with two many2one that point to the some class relation. I need to show the data in the many2one in two different way. Example: my many2one fields relation is res.partner.I need to show tha partner name in the first m2o and city-state in the second one. It's possibile?

I can't use name_get because it work on all the class relations.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Francesco,

Set a context on either of the field eg:{'show_city_state':True} and look for the context in the name_get if you have this key then return city_state else return name.

Thanks

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Please can anyoune help me! i just want to know if it's possible to add field.many2one('my.model') in class which inherit res.partner knowing that 'my.model' contain field.many2one('product.product'). i(m using version 7 of openerp

อวตาร
ละทิ้ง
ผู้เขียน

Open a new post, please! Don't spam in other post.

sorry! but just I'm looking for an answer

ผู้เขียน

I know it but you can't post your problem in post of other users. Open a new post and wait someone help you.

OK Francesco!! SORRY FOR THAT!

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 15
14445
1
มี.ค. 15
5127
1
มี.ค. 15
5202
2
ก.พ. 25
5964
1
ธ.ค. 24
1493