To update opening stock for non-serialized item, you should make Stock Reconciliation. And for serialised item, you can make Stock Entry of type Material Receipt.
In both cases, you should enter "Difference/Expense Account" as "Temporary Liability" account. On submission of the document, system will debit warehouse account which is an asset account and credit difference/expense account. Before making those entry, make sure you have enabled "Perpetual Inventory" by checking Stock Settings page.
If you are not making opening stock entry, you can select "Stock Adjustment" account in Difference/Expense Account field which is an expense account.
To learn more about perpetual inventory, please check following pages: