Define temporary ICS id that can be changed
It shouldn't be possible to change the ICS id of an item. But when registering a bunch of existing items via the API, we need to allocate an ics_id otherwise not much can be done in the interface. The id is required for the view and edit page. The solution is to define some "temporary" ids that don't correspond to any pre-printed labels. Items with a temporary id can be assigned a real ics_id when assigning a label. Reserved ids start with 'ZZ' (from ZZA000 to ZZZ999) ICS id can now be non nullable.
Showing
- app/helpers.py 38 additions, 0 deletionsapp/helpers.py
- app/inventory/views.py 4 additions, 1 deletionapp/inventory/views.py
- app/models.py 1 addition, 1 deletionapp/models.py
- app/settings.py 4 additions, 0 deletionsapp/settings.py
- app/templates/inventory/edit_item.html 5 additions, 1 deletionapp/templates/inventory/edit_item.html
app/helpers.py
0 → 100644
Please register or sign in to comment