How to enable 'Maintain Stock' if a transaction has already been made?

When I check this checkbox, it gives me an error because a transaction has already been made. How can I enable it?

Hey Pith, Frappe doesn’t allow enabling “Maintain Stock” after transactions are made. You’d need to cancel all related stock transactions, enable the checkbox, then resubmit them. If that’s not practical, creating a new item with “Maintain Stock” enabled might be a better option.