-
I am almost certain I'm doing everything correctly and I'm beginning to go insane. I'm trying to make an extremely simple plugin that uses the report mixin. I have the file plugins/stock_location_scaling/stock_label_width.py with the following content:
I also have an empty I'm using the inventree docker production server and have set INVENTREE_PLUGINS_ENABLED=True in the .env, and I've set plugins_enabled=True in the ext/config.yaml as well (just in case i guess...). I've restarted the server using When I go print a label where the template contains the following:
All I see is "Text:". test_test2 doesn't seem to be added to the context, nor test_test. What am I missing? Why can't I load a simple custom plugin? I'm lost. The plugin also doesn't show up in the Plugin Configurations admin page. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I can get the plugin to work/show up if I throw it in |
Beta Was this translation helpful? Give feedback.
-
Sounds like the plugin is not discovered. If it is not showing up in the settings/plugin table InvenTree does not know about it.
|
Beta Was this translation helpful? Give feedback.
Sounds like the plugin is not discovered. If it is not showing up in the settings/plugin table InvenTree does not know about it.
Could be a number of things but the most probable is that module discovery itself is not working.
__init__.py
inplugins
andstock_location_scaling
?raise KeyError('test)
in both files, restart the server and check if you see discovery errors in the settings/plugin pane