Changing all stock items to not delete on depletion #4437
-
I've created a few hundred stock items and now realised I should have disabled the delete on deplete option. I found a mysql table with this setting and wondering if it's safe to just change this parameter or will there be other isses that I"m not aware of if I do? stock item with option disabled:
stock item with option enabled:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@StormTrooper in general I do not recommend directly writing to the database. In this case, it should be safe. Maybe:
to ensure the transaction is atomic. |
Beta Was this translation helpful? Give feedback.
-
@StormTrooper if you have shell access to the server you can do the same thing through the django ORM CLI:
|
Beta Was this translation helpful? Give feedback.
-
Thanks guys. I didn't know about the shell - this has set the option. I had to use |
Beta Was this translation helpful? Give feedback.
@StormTrooper if you have shell access to the server you can do the same thing through the django ORM CLI: