Hi,
I'd like to know can use a 'browse' like this:
employee_ids = self.pool['hr.employee'].browse(cr, uid, [0])
but with all the records, no the first one [0].
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
I'd like to know can use a 'browse' like this:
employee_ids = self.pool['hr.employee'].browse(cr, uid, [0])
but with all the records, no the first one [0].
Thanks
Hi,
To achieve you goal we have two ways.
1) With New API : all_employees = self.env['hr.employee'].search([])
It will give us all employee list of browse object.
2) with old API : all_employees = self.pool['hr.employee'].browse(cr, uid, self.pool['hr.employee'].search(cr, uid, []) )
It will also give us all employee list of browse object.
I hope it will help you.
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
2
Mar 15
|
3915 | ||
Expected singleton
Diselesaikan
|
|
9
Mar 20
|
41585 | |
|
0
Sep 19
|
98 | ||
|
2
Okt 18
|
3548 | ||
@api.depends not triggering function
Diselesaikan
|
|
6
Jan 18
|
31947 |