InvenTree/InvenTree/order
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
..
fixtures Add explicit reference_int values for order fixtures (#3645) 2022-09-05 21:37:59 +10:00
migrations Int migration fix (#3323) 2022-07-15 11:57:27 +10:00
templates/order PO: Use supplier currency when creating a new extra line (#3666) 2022-09-09 12:43:07 +10:00
__init__.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
admin.py Merge pull request from GHSA-7rq4-qcpw-74gq 2022-06-15 18:32:35 +10:00
api.py Fix default ordering for build orders (#3626) 2022-09-01 12:25:08 +10:00
apps.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
forms.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
models.py Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
serializers.py Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
tasks.py Overdue order notification (#3114) 2022-06-06 19:12:29 +10:00
test_api.py Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
test_migrations.py Int migration fix (#3323) 2022-07-15 11:57:27 +10:00
test_sales_order.py Reference fields (#3267) 2022-07-11 00:01:46 +10:00
test_views.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
tests.py Feature: Supplier part pack size (#3644) 2022-09-08 09:49:14 +10:00
urls.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
validators.py Reference fields (#3267) 2022-07-11 00:01:46 +10:00
views.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00