I'm trying to create a ir.cron and that cron do something depending on a condition, but no success:
Code:
for record in records:
if record.name == '000000156':
record.write({'name': '!00000156'})
Error:
return unsafe_eval(c, globals_dict, locals_dict) File "", line 1, in <module> ValueError: <class 'TypeError'>: "'NoneType' object is not iterable" while evaluating "for record in records:\n if record.name == '000000156':\n record.write({'name': '!00000156'})"