InvenTree/InvenTree/build
Matthias Mair 5d1d8ec889
Refactor states/status (#4857)
* add file for states

* move general definition out

* add some tests and docs

* add tests for invalid definitions

* make status_label tag generic

* move templatetags

* remove unused tag

* rename test file

* make status label a lookup

* rename tags

* move import structure

* add missing tag

* collect states dynamically

* fix context function

* move api function out

* add tests for tags

* rename tests

* refactor imports

* Add test for API function

* improve errors and add tests for imporved errors

* make test calls simpler

* refactor definitions to use enums

* switch to enum

* refactor definitions to use enums

* fix lookup

* fix tag name

* make _TAG lookup a function

* cleanup BaseEnum

* make _TAG definition simpler

* restructure status codes to enum

* reduce LoC

* type status codes as int

* add specific function for template context

* Add definition for lookups

* fix filter lookup

* TEST: "fix" action lookup

* Add missing migrations

* Make all group code references explict

* change default on models to value

* switch to IntEnum

* move groups into a seperate class

* only request _TAG if it exsists

* use value and list

* use dedicated groups

* fix stock assigment

* fix order code

* more fixes

* fix borked change

* fix render lookup

* add group

* fix import

* fix syntax

* clenup

* fix migrations

* fix typo

* fix wrong value usage

* fix test

* remove group section

* remove group section

* add more test cases

* Add more docstring

* move choices out of migrations

* change import ordeR?

* last try before I revert

* Update part.migrations.0112

- Add custom migration class which handles errors

* Add unit test for migration

- Ensure that the new fields are added to the model

* Update reference to PR

---------

Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
2023-06-09 10:27:26 +10:00
..
fixtures Reference fields (#3267) 2022-07-11 00:01:46 +10:00
migrations Parameter filtering (#4823) 2023-05-19 13:24:55 +10:00
templates/build Refactor states/status (#4857) 2023-06-09 10:27:26 +10:00
__init__.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
admin.py Code style improvements (#4683) 2023-04-28 20:49:53 +10:00
api.py Refactor states/status (#4857) 2023-06-09 10:27:26 +10:00
apps.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
models.py Refactor states/status (#4857) 2023-06-09 10:27:26 +10:00
serializers.py Refactor states/status (#4857) 2023-06-09 10:27:26 +10:00
tasks.py Refactor states/status (#4857) 2023-06-09 10:27:26 +10:00
test_api.py Refactor states/status (#4857) 2023-06-09 10:27:26 +10:00
test_build.py Fix common spelling mistakes (#4956) 2023-06-04 00:04:52 +10:00
test_migrations.py Cleanup / consolidate unit testing code (#4831) 2023-05-17 07:35:26 +10:00
tests.py Cleanup / consolidate unit testing code (#4831) 2023-05-17 07:35:26 +10:00
urls.py [Feature] Add RMA support (#4488) 2023-03-29 10:35:43 +11:00
validators.py [Plugin] Allow custom plugins for running validation routines (#3776) 2022-10-18 23:50:07 +11:00
views.py Improve rendering efficiency for build detail page (#4416) 2023-02-25 18:58:59 +11:00