Odoo Help

0

How to get the id from a browse_record?

By
Eric
on 3/17/14, 7:55 PM 1,628 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
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

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

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