InvenTree/InvenTree
Oliver 187707c892
Barcode Refactor (#3640)
* define a simple model mixin class for barcode

* Adds generic function for assigning a barcode to a model instance

* StockItem model now implements the BarcodeMixin class

* Implement simple unit tests for new code

* Fix unit tests

* Data migration for uid field

* Remove references to old 'uid' field

* Migration for removing old uid field from StockItem model

* Bump API version

* Change lookup_barcode to be a classmethod

* Change barcode_model_type to be a class method

* Cleanup for generic barcode scan and assign API:

- Raise ValidationError as appropriate
- Improved unit testing
- Groundwork for future generic implementation

* Further unit tests for barcode scanning

* Adjust error messages for compatibility

* Unit test fix

* Fix hash_barcode function

- Add unit tests to ensure it produces the same results as before the refactor

* Add BarcodeMixin to Part model

* Remove old format_barcode function from Part model

* Further fixes for unit tests

* Add support for assigning arbitrary barcode to Part instance

- Simplify barcode API
- Add more unit tests

* More unit test fixes

* Update unit test

* Adds generic endpoint for unassigning barcode data

* Update web dialog for unlinking a barcode

* Template cleanup

* Add Barcode mixin to StockLocation class

* Add some simple unit tests for new model mixin

* Support assigning / unassigning barcodes for StockLocation

* remove failing outdated test

* Update template to integrate new barcode support for StockLocation

* Add BarcodeMixin to SupplierPart model

* Adds QR code view for SupplierPart

* Major simplification of barcode API endpoints

- Separate existing barcode plugin into two separate classes
- Simplify and consolidate the response from barcode scanning
- Update unit testing

* Yet more unit test fixes

* Yet yet more unit test fixes
2022-09-15 14:14:51 +10:00
..
InvenTree Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
build Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
common out-of-scope:update settings value lookup to include typ (#3636) 2022-09-02 16:51:16 +10:00
company Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
label Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
locale Add support for Danish (#3675) 2022-09-14 15:00:37 +10:00
order Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
part Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
plugin Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
plugins Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
report Fix purchase order report template (#3674) 2022-09-14 14:59:08 +10:00
script Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
stock Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
templates Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
users Fix report permissions (#3642) 2022-09-05 14:14:59 +10:00
config_template.yaml Custom splash screen (#3499) 2022-08-09 09:42:53 +10:00
gunicorn.conf.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
manage.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00