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

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
How can i browse this m2m record? แก้ไขแล้ว
2
มี.ค. 15
4373
1
มี.ค. 15
7466
1
มิ.ย. 16
7305
Get first record from another object? แก้ไขแล้ว
1
มี.ค. 15
14905
On_change with self.pool.get and browse แก้ไขแล้ว
1
มิ.ย. 17
6684