Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
3072 Vistas

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

Publicaciones relacionadas Respuestas Vistas Actividad
1
jul 22
3418
1
feb 20
3912
0
abr 16
2945
2
oct 15
10338
1
jun 25
767