Repository navigation
Supplier integration - #3791
Supplier integration#3791matmair wants to merge 151 commits into
Conversation
this means each plugin can have multiple connection templates with multiple conencts with multiple settings each
| from plugin.plugin import InvenTreePlugin | ||
|
|
||
|
|
||
| class ConnectionSetting(common.models.BaseInvenTreeSetting): |
There was a problem hiding this comment.
Note: This class needs some rework after merging master in (Ref: #4834 )
There was a problem hiding this comment.
probably, a lot has changed in this area
|
This PR seems stale. Please react to show this is still important. |
|
I definitely want to have that feature, but currently the react refactor is in focus. |
|
This PR seems stale. Please react to show this is still important. |
|
Still in the WIP pipeline |
|
@matmair I'm still very keen to see this implemented - do you have motivation on this still too? Does this in your mind require the react integration, or can we look at getting it merged in now? |
|
I will move this to a plugin; it requires either the react integration or shipping the UI - which I will do with the plugin. Development velocity is also much easier to handle in a plugin. |
|
How is that going to work then? Would this plugin basically enable the use of other supplier plugins? Or would it just be one big plugin supporting multiple suppliers? Tbh I haven't really had time to look at this in depth yet, but I feel like it'd integrate well with what I've been working on in #5509 and the backend part should probably be in core ... buuut I really have no clue about the frontend requirements here. Could this maybe be divided into multiple smaller features/PRs? Also, regarding actual supplier support: I've seen that you already have a WIP digikey plugin. I've been working on my own part importer script (basically a simplified/improved version of Ki-nTree, with proper support for nested categories). It's working quite well for my purposes, but I still feel like it shouldn't really be a script, but a plugin aswell, thus useable directly from the inventree interface. So I'd be interested in contributing that into core/your plugin aswell. |
|
There will be a plugin that provides a basic UI and all that is required to handle the typical flows like search, data gathering, and creation of new parts/stock. I will not continue development with core as a target. This plugin can be used as a target for vendor-specific APIs. |
commit f15dcfc Author: Bobbe <[email protected]> Date: Wed Oct 18 16:52:07 2023 +0200 Fix supplier plugins not inheriting from settings mixin commit 36f4066 Author: Bobbe <[email protected]> Date: Tue Oct 17 15:55:52 2023 +0200 Add SUPPLIER_ID setting to other suppliers commit d46cc53 Author: Bobbe <[email protected]> Date: Tue Oct 17 15:49:15 2023 +0200 Add DEFAULT_SUPPLIER_NAME to mouser plugin commit c4c34b9 Author: Bobbe <[email protected]> Date: Tue Oct 17 15:48:51 2023 +0200 Refactor get_supplier_parts to not use lists commit d56c4bf Author: Bobbe <[email protected]> Date: Thu Oct 12 03:19:13 2023 +0200 Try to retrigger pipeline commit b6d685c Author: Bobbe <[email protected]> Date: Thu Oct 12 03:08:15 2023 +0200 FIx TME barcode detection, Improve supplier barcode handling commit c82baa2 Author: Bobbe <[email protected]> Date: Thu Oct 12 02:33:31 2023 +0200 Fix None type access commit ed4dfff Merge: d3e311e 0c519c6 Author: Bobbe <[email protected]> Date: Wed Oct 11 19:47:21 2023 +0200 Merge remote-tracking branch 'origin/master' into vendor_barcodes commit d3e311e Author: Bobbe <[email protected]> Date: Wed Oct 11 19:46:00 2023 +0200 Improve docstrings commit f8f1eed Author: Bobbe <[email protected]> Date: Wed Oct 11 19:29:33 2023 +0200 Refactor get_supplier_parts, Add get_supplier method commit 85351cf Author: Bobbe <[email protected]> Date: Thu Oct 5 01:14:46 2023 +0200 Use Decimal instead of int for quantity commit a45ba92 Merge: 85ace32 30cf97d Author: Bobbe <[email protected]> Date: Tue Oct 3 03:52:56 2023 +0200 Merge remote-tracking branch 'origin/master' into vendor_barcodes commit 85ace32 Author: Bobbe <[email protected]> Date: Tue Oct 3 03:49:51 2023 +0200 Fix TME qrcode regex commit d0b1acf Merge: 584eb0f 352fb4f Author: Bobbe <[email protected]> Date: Tue Oct 3 03:08:35 2023 +0200 Merge remote-tracking branch 'origin/master' into vendor_barcodes commit 584eb0f Author: Bobbe <[email protected]> Date: Tue Oct 3 03:06:18 2023 +0200 Add documentation for this feature commit bab4614 Author: Bobbe <[email protected]> Date: Mon Oct 2 20:08:49 2023 +0200 Fix TME qrcode regex commit 7e8abcb Author: Bobbe <[email protected]> Date: Mon Oct 2 03:21:15 2023 +0200 Fix TME purchase order number commit fadcea2 Author: Bobbe <[email protected]> Date: Mon Oct 2 03:05:33 2023 +0200 Add back all tests again commit 09ffc34 Author: Bobbe <[email protected]> Date: Mon Oct 2 03:05:06 2023 +0200 Add TME tests again commit c7f5521 Merge: 7b6855d e767516 Author: Bobbe <[email protected]> Date: Mon Oct 2 02:42:55 2023 +0200 Merge remote-tracking branch 'origin/master' into vendor_barcodes commit 7b6855d Author: Bobbe <[email protected]> Date: Mon Oct 2 00:45:25 2023 +0200 If this works the tests are broken, if this doesn't work the tests are broken too commit 32916e9 Author: Bobbe <[email protected]> Date: Sun Oct 1 20:14:51 2023 +0200 Remove the TME tests again commit 0390373 Author: Bobbe <[email protected]> Date: Sun Oct 1 19:34:02 2023 +0200 Add TME supplier barcode plugin commit 5970947 Author: Bobbe <[email protected]> Date: Sun Oct 1 19:33:25 2023 +0200 Add SupplierBarcodeMixin to minimize shared code between plugins commit 9d13c27 Author: Bobbe <[email protected]> Date: Sun Oct 1 19:28:12 2023 +0200 Disable the test again commit 91bad76 Author: Bobbe <[email protected]> Date: Sun Oct 1 18:26:50 2023 +0200 Try deleting the stock item and stock locations commit 50082ae Author: Bobbe <[email protected]> Date: Sun Oct 1 17:51:03 2023 +0200 Test 4th receive test with debug prints commit b241b50 Author: Bobbe <[email protected]> Date: Sun Oct 1 16:57:46 2023 +0200 Test third receive test commit 9337345 Author: Bobbe <[email protected]> Date: Sun Oct 1 16:21:31 2023 +0200 Test second receive test commit f7e6a82 Author: Bobbe <[email protected]> Date: Sun Oct 1 15:49:43 2023 +0200 Test with even more receive tests commit 85841df Author: Bobbe <[email protected]> Date: Sun Oct 1 14:34:34 2023 +0200 Test with simple receive test commit 0e63ef4 Author: Bobbe <[email protected]> Date: Sun Oct 1 01:29:11 2023 +0200 Test with simple tests commit 8eaabc9 Author: Bobbe <[email protected]> Date: Sun Oct 1 00:56:24 2023 +0200 Test again without tests commit 72536e9 Author: Bobbe <[email protected]> Date: Sun Oct 1 00:30:17 2023 +0200 Test with all plugins, but without mouser "model" setting commit f1ba184 Author: Bobbe <[email protected]> Date: Sat Sep 30 18:25:26 2023 +0200 Test only with digikey plugin commit 65b4175 Author: Bobbe <[email protected]> Date: Sat Sep 30 18:04:10 2023 +0200 Test removing all plugins commit b47c6eb Author: Bobbe <[email protected]> Date: Sat Sep 30 17:14:14 2023 +0200 Fix pre formatted log messages commit efe2aac Merge: a1dc0eb 3cd7ee9 Author: Bobbe <[email protected]> Date: Sat Sep 30 17:00:48 2023 +0200 Merge remote-tracking branch 'origin/master' into vendor_barcodes commit a1dc0eb Author: Bobbe <[email protected]> Date: Sat Sep 30 17:00:33 2023 +0200 Remove the test print again commit bc82ee3 Merge: 8b461c4 6f70f6d Author: Bobbe <[email protected]> Date: Wed Sep 20 01:40:40 2023 +0200 Merge remote-tracking branch 'origin/master' into vendor_barcodes commit 8b461c4 Author: Bobbe <[email protected]> Date: Tue Sep 19 21:53:36 2023 +0200 Add debug print to investigate why tests are failing commit 2e0be5a Merge: 420700f 314c93d Author: Bobbe <[email protected]> Date: Tue Sep 19 08:52:29 2023 +0200 Merge remote-tracking branch 'origin/master' into vendor_barcodes commit 420700f Author: Bobbe <[email protected]> Date: Sat Sep 16 13:22:54 2023 +0200 Fix error if no line item exists commit 6db49ca Author: Bobbe <[email protected]> Date: Fri Sep 15 17:19:50 2023 +0200 Add new api version for this PR commit fa9b524 Merge: a76df6c 2be2ea4 Author: Bobbe <[email protected]> Date: Fri Sep 15 17:15:53 2023 +0200 Merge remote-tracking branch 'origin/master' into vendor_barcodes commit a76df6c Author: Bobbe <[email protected]> Date: Fri Sep 15 17:14:51 2023 +0200 Improve selection of line item, if multiple line items match the SKU commit cdef246 Author: Bobbe <[email protected]> Date: Fri Sep 15 00:58:42 2023 +0200 Refactor a bunch of checks commit 35dc310 Author: Bobbe <[email protected]> Date: Fri Sep 15 00:49:54 2023 +0200 Improve model access using first() in two places commit 46ca6df Author: Bobbe <[email protected]> Date: Fri Sep 15 00:49:24 2023 +0200 Clarify return type for scan_receive_item commit 6419779 Author: Bobbe <[email protected]> Date: Wed Sep 13 11:13:04 2023 +0200 Fix naming clash commit 08a2507 Author: Bobbe <[email protected]> Date: Wed Sep 13 10:24:51 2023 +0200 Add get_supplier_part helper, check for barcode_data being a str commit a23caef Author: Bobbe <[email protected]> Date: Wed Sep 13 09:40:01 2023 +0200 Fix type annotations for python 3.8 commit 1d349f0 Author: Bobbe <[email protected]> Date: Wed Sep 13 09:30:57 2023 +0200 Fix fomatting again commit cd35744 Author: Bobbe <[email protected]> Date: Tue Sep 12 15:38:13 2023 +0200 Use part.get_default_location() instead of part.default_location commit 9a3c968 Author: Bobbe <[email protected]> Date: Mon Sep 11 03:36:59 2023 +0200 FIx quantity and location not being in lineitem reponse commit a84cea6 Author: Bobbe <[email protected]> Date: Mon Sep 11 02:09:54 2023 +0200 Check if barcode has already been assigned, Fix tests commit 14ccd87 Author: Bobbe <[email protected]> Date: Mon Sep 11 01:51:06 2023 +0200 Fix location in response, only include quantity and location if set commit bff393a Author: Bobbe <[email protected]> Date: Sun Sep 10 21:20:44 2023 +0200 Always include lineitem in api response commit 13e7424 Author: Bobbe <[email protected]> Date: Sun Sep 10 17:31:12 2023 +0200 Implement the api-barcode-po-receive endpoint for all suppliers commit c97ef6e Author: Bobbe <[email protected]> Date: Sun Sep 10 17:10:08 2023 +0200 Refactor supplier_barcode.py helpers into BarcodeMixin commit 3f08b3e Author: Bobbe <[email protected]> Date: Sun Sep 10 16:46:44 2023 +0200 Add api-barcode-po-receive endpoint commit b730a50 Author: Bobbe <[email protected]> Date: Thu Sep 7 13:38:47 2023 +0200 Add barcode integration tests commit a7840cf Author: Bobbe <[email protected]> Date: Thu Sep 7 00:36:00 2023 +0200 Improve formatting commit acb1179 Author: Bobbe <[email protected]> Date: Wed Sep 6 13:58:18 2023 +0200 Add __init__.py to suppliers directory commit 1f62302 Author: Bobbe <[email protected]> Date: Wed Sep 6 13:47:57 2023 +0200 Add get_supplier_part helper, Refactor plugins in preparation for inventree#3791 commit df885c2 Author: Bobbe <[email protected]> Date: Wed Sep 6 12:52:06 2023 +0200 Move barcode plugins to new suppliers subdirectory commit a88eb74 Author: Bobbe <[email protected]> Date: Wed Sep 6 12:39:09 2023 +0200 Add lcsc barcode support commit 9832e73 Author: Bobbe <[email protected]> Date: Wed Sep 6 10:03:33 2023 +0200 Use model instead of name for mouser supplier, add auto detection magic commit f135019 Author: Bobbe <[email protected]> Date: Wed Sep 6 00:34:27 2023 +0200 Separate out ecia 2d barcode parser, Add quantity, PO number to response commit d00c486 Author: Matthias Mair <[email protected]> Date: Tue Sep 5 20:57:09 2023 +0200 made small style cleanups commit e9224bd Author: Matthias Mair <[email protected]> Date: Tue Sep 5 20:45:05 2023 +0200 added small fixes if no part is found commit b5facf4 Author: Bobbe <[email protected]> Date: Tue Sep 5 13:20:31 2023 +0200 Add support for scanning digikey and mouser barcodes
* Add support for scanning digikey and mouser barcodes * added small fixes if no part is found * made small style cleanups * Separate out ecia 2d barcode parser, Add quantity, PO number to response * Use model instead of name for mouser supplier, add auto detection magic * Add lcsc barcode support * Move barcode plugins to new suppliers subdirectory * Add get_supplier_part helper, Refactor plugins in preparation for #3791 * Add __init__.py to suppliers directory * Improve formatting * Add barcode integration tests * Add api-barcode-po-receive endpoint * Refactor supplier_barcode.py helpers into BarcodeMixin * Implement the api-barcode-po-receive endpoint for all suppliers * Always include lineitem in api response * Fix location in response, only include quantity and location if set * Check if barcode has already been assigned, Fix tests * FIx quantity and location not being in lineitem reponse * Use part.get_default_location() instead of part.default_location * Fix fomatting again * Fix type annotations for python 3.8 * Add get_supplier_part helper, check for barcode_data being a str * Fix naming clash * Clarify return type for scan_receive_item * Improve model access using first() in two places * Refactor a bunch of checks * Improve selection of line item, if multiple line items match the SKU * Add new api version for this PR * Fix error if no line item exists * Add debug print to investigate why tests are failing * Remove the test print again * Fix pre formatted log messages * Test removing all plugins * Test only with digikey plugin * Test with all plugins, but without mouser "model" setting * Test again without tests * Test with simple tests * Test with simple receive test * Test with even more receive tests * Test second receive test * Test third receive test * Test 4th receive test with debug prints * Try deleting the stock item and stock locations * Disable the test again * Add SupplierBarcodeMixin to minimize shared code between plugins * Add TME supplier barcode plugin * Remove the TME tests again * If this works the tests are broken, if this doesn't work the tests are broken too * Add TME tests again * Add back all tests again * Fix TME purchase order number * Fix TME qrcode regex * Add documentation for this feature * Fix TME qrcode regex * Use Decimal instead of int for quantity * Refactor get_supplier_parts, Add get_supplier method * Improve docstrings * Fix None type access * FIx TME barcode detection, Improve supplier barcode handling * Try to retrigger pipeline * Refactor get_supplier_parts to not use lists * Add DEFAULT_SUPPLIER_NAME to mouser plugin * Add SUPPLIER_ID setting to other suppliers * Fix supplier plugins not inheriting from settings mixin --------- Co-authored-by: Matthias Mair <[email protected]>
|
Is there a better / recent setup guide than this #3791 (comment)? In my current setup there is only one setting available and it's called "Supplier - The Supplier which acts as 'DigiKey'". |
|
This PR is closed, development of this was shifted and none of the linked components are finished. I refactored basically the whole thing, some of the decisions made here were not scalable enough. |
That's from the supplier barcode plugins (introduced in #5509). |
|
Ah I see, I thought it was the same thing. Thanks for the info. |
This PR:
Open:
Before merge:
WebConnectionDatato plugin namespaceSearchRunResultto plugin namespaceFixes parts of #3261