[FIX] hr_payroll: total_wage return format
Field removed in 9.0 at 04cebbd (because useless). This avoids an error if read. cf #8781
This commit is contained in:
parent
096fe8a05c
commit
f8b56e4f40
|
@ -975,7 +975,7 @@ class hr_employee(osv.osv):
|
||||||
current_date = datetime.now().strftime('%Y-%m-%d')
|
current_date = datetime.now().strftime('%Y-%m-%d')
|
||||||
for employee in self.browse(cr, uid, ids, context=context):
|
for employee in self.browse(cr, uid, ids, context=context):
|
||||||
if not employee.contract_ids:
|
if not employee.contract_ids:
|
||||||
res[employee.id] = {'basic': 0.0}
|
res[employee.id] = 0.0
|
||||||
continue
|
continue
|
||||||
cr.execute( 'SELECT SUM(wage) '\
|
cr.execute( 'SELECT SUM(wage) '\
|
||||||
'FROM hr_contract '\
|
'FROM hr_contract '\
|
||||||
|
@ -984,7 +984,7 @@ class hr_employee(osv.osv):
|
||||||
'AND (date_end > %s OR date_end is NULL)',
|
'AND (date_end > %s OR date_end is NULL)',
|
||||||
(employee.id, current_date, current_date))
|
(employee.id, current_date, current_date))
|
||||||
result = dict(cr.dictfetchone())
|
result = dict(cr.dictfetchone())
|
||||||
res[employee.id] = {'basic': result['sum']}
|
res[employee.id] = result['sum']
|
||||||
return res
|
return res
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
|
|
Loading…
Reference in New Issue