diff --git a/docs/assets/images/plugin/app_locate.png b/docs/assets/images/plugin/app_locate.png new file mode 100644 index 0000000..019dd31 Binary files /dev/null and b/docs/assets/images/plugin/app_locate.png differ diff --git a/docs/assets/images/plugin/web_locate.png b/docs/assets/images/plugin/web_locate.png new file mode 100644 index 0000000..aba240a Binary files /dev/null and b/docs/assets/images/plugin/web_locate.png differ diff --git a/docs/extend/plugins.md b/docs/extend/plugins.md index f0c2679..6519c8b 100644 --- a/docs/extend/plugins.md +++ b/docs/extend/plugins.md @@ -61,6 +61,7 @@ Supported mixin classes are: - [BarcodeMixin](./plugins/barcode.md) - [EventMixin](./plugins/event.md) - [LabelPrintingMixin](./plugins/label.md) +- [LocateMixin](./plugins/locate.md) - [NavigationMixin](./plugins/navigation.md) - [PanelMixin](./plugins/panel.md) - [ScheduleMixin](./plugins/schedule.md) diff --git a/docs/extend/plugins/locate.md b/docs/extend/plugins/locate.md new file mode 100644 index 0000000..e56f4c0 --- /dev/null +++ b/docs/extend/plugins/locate.md @@ -0,0 +1,31 @@ +--- +title: Locate Mixin +--- + +## LocateMixin + +The `LocateMixin` class enables plugins to "locate" stock items (or stock locations) via an entirely custom method. + +For example, a warehouse could be arranged with each individual 'parts bin' having an audio-visual indicator (e.g. RGB LED and buzzer). "Locating" a particular stock item causes the LED to flash and the buzzer to sound. + +Another example might be a parts retrieval system, where "locating" a stock item causes the stock item to be "delivered" to the user via a conveyor. + +The possibilities are endless! + +### Web Integration + +{% with id="web_locate", url="plugin/web_locate.png", description="Locate stock item from web interface", maxheight="400px" %} +{% include 'img.html' %} +{% endwith %} + +### App Integration + +If a locate plugin is installed and activated, the [InvenTree mobile app](../../app/app.md) displays a button for locating a StockItem or StockLocation (see below): + +{% with id="app_locate", url="plugin/app_locate.png", description="Locate stock item from app", maxheight="400px" %} +{% include 'img.html' %} +{% endwith %} + +### Implementation + +Refer to the [InvenTree source code](https://github.com/inventree/InvenTree/blob/master/InvenTree/plugin/samples/locate/locate_sample.py) for a simple implementation example. diff --git a/mkdocs.yml b/mkdocs.yml index e31f449..c7b3b0e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -129,6 +129,7 @@ nav: - Barcode Mixin: extend/plugins/barcode.md - Event Mixin: extend/plugins/event.md - Label Printing Mixin: extend/plugins/label.md + - Locate Mixin: extend/plugins/locate.md - Navigation Mixin: extend/plugins/navigation.md - Panel Mixin: extend/plugins/panel.md - Schedule Mixin: extend/plugins/schedule.md