İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3081 Görünümler

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
Vazgeç
Üretici

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Tem 22
3440
1
Şub 20
3926
0
Nis 16
2945
2
Eki 15
10341
1
Haz 25
774