Is it possible to modify Stock Settings via database API

I realized that Stock Settings page is stored as records of table ‘tabSingles’ in database.
How to modify one of it’s value via Database API? Can I use “frappe.db.set_value”?

Hi @oscarutomo:

Use frappe.db.set_single_value

Something like this:
frappe.db.set_single_value("Stock Settings", "allow_negative_stock", 1)

Hope this helps.

Thanks avc…

Appreciate it