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

So far I know that self.pool['MODEL_NAME'] gets me an instance of a model, and I've seen self.search() being used to get a list of surroogate keys, and self.browse() being used to lookup objects for those keys.

What I'm looking for is an explanation of what all the arguments are for those functions with perhaps an explanation of the performance impact of using them. Even if I can keep studying examples of these in the addons until I cobble something together which works, it is likely to have unpleasant side effects unless I understand when it is most appropriate to use which function.

I've been reading the source of these functions but that is a much deeper rabbit hole before I can really put it all together. An explanation written for humans of this part of the system would be very helpful, if one exists.

Sorry about the second question in a day, I thought asking this question would obviate the need for several future questions.

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

Comically, I cannot approve and answer and I cannot comment on an answer because both require more karma than I have. Thanks Fabian, https://www.odoo.com/documentation/8.0/reference/orm.html#common-orm-methods was what I was looking for, although it's hard to say how much of it applies to v7.

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

You should check the technical documentation, it's pretty good. Start by the tutorials. Https://www.odoo.com/documentation/8.0

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

Hi,

Refer the following link for detailed explaination for ORM methods: 
https://doc.odoo.com/v6.0/developer/2_5_Objects_Fields_Methods/methods.html/

This may also help you to understand objects & fields:
https://doc.odoo.com/6.1/developer/03_modules_2/

 

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

This documentation is deprecated, we wrote a new one on odoo.com/documentation

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 15
4039
1
thg 4 22
3786
1
thg 12 21
2460
1
thg 7 21
8617
0
thg 12 24
1412