跳至内容
菜单
此问题已终结
1 回复
3083 查看

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.


形象
丢弃
编写者

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

相关帖文 回复 查看 活动
1
7月 22
3448
1
2月 20
3930
0
4月 16
2945
2
10月 15
10345
1
6月 25
777