跳至內容
選單
此問題已被標幟
1 回覆
7531 瀏覽次數

Hello, I am trying to get the ID from an object after I use the orm browse() method. When I assign my variable to the id of the returned record all i get it this

_id = record_object.order_partner_id
#returns this:
browse_record(sale.order.line, 106)

Does anyone know how I can get just the 106 from the object? Thank you

頭像
捨棄
最佳答案

Hi,

_id = record_object.order_partner_id.id will give you id of the specific record.

Hope this helps.

頭像
捨棄
作者

Yep, that did it. Thank you

相關帖文 回覆 瀏覽次數 活動
2
3月 15
4288
1
3月 15
7376
1
6月 16
7235
1
3月 15
14837
1
6月 17
6571