Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
7569 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

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

Hope this helps.

Ảnh đại diện
Huỷ bỏ
Tác giả

Yep, that did it. Thank you

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 15
4320
1
thg 3 15
7418
1
thg 6 16
7272
1
thg 3 15
14872
1
thg 6 17
6645