Skip to Content
Menú
This question has been flagged
1 Respondre
3073 Vistes

Hi I have to get the minimum wage of the contract list available in the database.

I am using Odoo 8.

Can you help me to write a function whose return min wage ?

Thanks.


Avatar
Descartar
Autor

def _get_wage_min(self, cr, uid, ids, field_name, arg, context=None):

res = dict.fromkeys(ids, 0.0)

for contract in self.employee_contract_ids.browse(cr, uid, ids, context=context):

res[contract.id] = min([contract.wage])

return res

here is my code

Related Posts Respostes Vistes Activitat
1
de jul. 22
3423
1
de febr. 20
3912
0
d’abr. 16
2945
2
d’oct. 15
10338
1
de juny 25
767