Good day, I am developing a payroll module adapted to Venezuelan law and I'm creating a function that seeks the daily wage of an employee, all that came out well, the module makes the calculation, but; when I want to save the log I get this error: "TypeError: on_change_month_wage() Takes at most six arguments (7 Given)"
This is my code:
def on_change_month_wage(self, cr, uid, ids, month_wage, context=None):
res = {} if month_wage > 0: res['diary_wage'] = month_wage / 30 return {'value': res}
_columns = {
'month_wage':fields.float('Salario Mensual', digits=(16,2)), 'diary_wage':fields.function(on_change_month_wage, type = 'float', string = 'Salario Diario'),
}
and my xml lines:
field name="month_wage" string="Salario Mensual" on_change="on_change_month_wage(month_wage)" field name="diary_wage" string="Salario Diario"
obviously deleted the "< />" for this post
and so... What should i do to solve this error? Thank in advance
You separate on_change and fields.function