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

Hi i try to get all row of a model in odoo 9

But, it returns only 290 rows of total 310 rows of data that I count directly via pgadmin.

Is there any otherway to do this and get all data in ir.ui.menu?

I try to get data with this :

menu_ids = request.env['ir.ui.menu'].sudo().search([])
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi

Maybe there is some menu that is not active so it can't be retrieved by search.

I suggest you to try this

menu_ids = request.env['ir.ui.menu'].with_context(active_test=False).search([])
Hope it helps!!

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

Hi I try this but it's giving me less record than before

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 23
5888
5
thg 6 21
23758
2
thg 5 21
12627
1
thg 7 16
6558
1
thg 3 15
5351