I have this function in my python file:
def get_employee_lines(self, cr, uid, ids, company_id, date_start, date_end):
print ('--------------------MOMO----------------------')
payslip_line = self.pool.get('hr.payslip')
print payslip_line
print company_id
print date_start
print date_end
obj_ids = payslip_line.search(cr, uid,ids, [ ('date_from', '=', date_start), ('date_to', '=', date_end)])
res = obj.read( obj_ids, ['employee_id'], context)
print res['employee_id']
return res
And, i have called it in my RML:
[[ repeatIn (get_employee_lines ( example.company_id, example.date_start, example.date_end), 'o') ]]
And in front of the cell:
[[ o.employee_id]]
But, i have gotten this error:
2015-08-26 09:23:22,979 4118 ERROR company openerp.tools.safe_eval: Cannot eval "repeatIn (get_employee_lines ( example.company_id, example.date_start, example.date_end), 'o')"
Traceback (most recent call last):
File "/opt/openerp/v7/server/openerp/tools/safe_eval.py", line 285, in safe_eval
return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
File "", line 1, in <module>
TypeError: get_employee_lines() takes exactly 7 arguments (4 given)
2015-08-26 09:23:22,980 4118 ERROR company openerp.tools.safe_eval: Cannot eval 'o.employee_id'
Traceback (most recent call last):
File "/opt/openerp/v7/server/openerp/tools/safe_eval.py", line 285, in safe_eval
return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
File "", line 1, in <module>
NameError: name 'o' is not defined
Any tips?
Buy why!!!!! Really i need an answer why dont you help me instead of this