nofusscomputing / centurion_erp

An ERP with a focus on ITSM and Automation
MIT License
0 stars 0 forks source link

refactor notes to remove requirement to edit code on new model #389

Open jon-nfc opened 1 week ago

jon-nfc commented 1 week ago

Currently when adding a new tenancy model, you must edit the notes code for that model to be able to add notes.

Details

refactor the notes so that the model name is used instead of hard coded logic to add a note to a model.

Current code

https://github.com/nofusscomputing/centurion_erp/blob/ed0e57c8a10eb50454a9450d2da9194068505155/app/core/models/notes.py#L81-L119

This logic must be adjusted to use an item_id? and a model. Where item_id is the models PK the note is for and model is the model name.

Links