Frappe is not Logging activities which has done from script default

I have setup my Quotation with custom workflow called Quotation Progress. I want get the log details of all the quotation state changes and transitions. Activity logging process only happening when done things through portal. I have custom script which submit later in the workflow.

activity log after doing an action

now i tried doing an action from script
image

but no change in the activity log

How would i achieve this? it is important for the client to know the change for a document.

When you’re using the console, you’ll need to explicitly commit the changes to the database by running frappe.db.commit().

Please note that in most other circumstances this happens automatically and should not be called explicitly.

even after i ran frappe.db.commit() it is not happening. But, one thing i have found is that, the logging is not happening only for updation action of a document. i thing when doc.save() runs, the logging not happening if it is update event/action.