Closed lookme2 closed 3 years ago
@lookme2 Have you tried the following sequence?
part = Part(api, 1)
part._data['active'] = False
part.save()
part.delete()
(replace 1
with your part PK)
EDIT: The user who is deleting the part also needs to have the delete
permission for the Part
model, see: https://inventree.readthedocs.io/en/latest/admin/permissions/
@eeintech thanks. I'll give that a try.
I would like to remove parts from my database via the python module. I don't see a way of doing that. Am I missing something?