Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to get the id from a browse_record?

By
Eric
on 3/17/14, 7:55 PM 1,139 views

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

1

Nehal

--Nehal--
2090
| 5 2 8
Ahmadabad, India
--Nehal--
Nehal
On 3/18/14, 1:34 AM

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

Eric
on 3/18/14, 12:28 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 3/17/14, 7:55 PM
Seen: 1139 times
Last updated: 3/16/15, 8:10 AM