When i call the below function through API;
In both try and except conditions I have to keep log in separate table named api.log.
While the function enters in except condition, error occurs on creating record on api.log table
It is solved by using commit function.
Unable to create a record in except loop of try-except odoo10