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

Hi ,

  I am a beginner of odoo and i want to know how to use orm browse method in odoo.

Ảnh đại diện
Huỷ bỏ

You must go through these tips: http://learnopenerp.blogspot.com/

Câu trả lời hay nhất

Definitely check the documentation link provided by Mohamed, but the basic use is like this:


self.browse(ids) # this will browse records for whatever model you are using at that moment
self.env['model.name'].browse(ids) # you can browse records for any model you want
# such as 'sale.order' or 'account.invoice'

# In each case, ids is a List such as [67, 124, 721]
Ảnh đại diện
Huỷ bỏ
Tác giả

Thank's Travis this is useful to me

I'm glad to hear it! If I fully answered your question, then you can accept my answer to mark the question solved. Cheers!

how to pass the ids to this code when ids are contained in a text file?

Câu trả lời hay nhất

Hi,

Check Odoo documentation here https://www.odoo.com/documentation/saas-13/reference/orm.html

Ảnh đại diện
Huỷ bỏ