Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
30137 Vues

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

Avatar
Ignorer
Meilleure réponse

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. 

Avatar
Ignorer
Publications associées Réponses Vues Activité
2
mars 15
3936
9
mars 20
41671
0
sept. 19
98
2
oct. 18
3618
6
janv. 18
32013