Oliver
78b1c7a22b
Skips some specific steps when importing data
...
- We need to prevent certain operations from running when we are importing data
- This is to prevent unique database constraints from being violated
- Do not register plugins during data import
- Do not launch notification events
2022-02-03 16:03:46 +11:00
Matthias
ae667df14a
add migration
2022-01-28 23:58:12 +01:00
Matthias
116369bba1
fix indent
2022-01-21 00:31:03 +01:00
Matthias
c44565f9e3
fix reused builtins
2022-01-21 00:17:52 +01:00
Matthias
21125eb892
add docstring
2022-01-20 23:55:07 +01:00
Matthias
3d2113d98b
make simpler
2022-01-20 23:53:50 +01:00
Matthias
db66546606
rename to not shadow builtin
2022-01-20 23:49:21 +01:00
Oliver
eb21e1f844
Display "boolean" plugin setting values as checkboxes
2022-01-13 16:22:38 +11:00
Oliver
3fb77f466c
PEP fixes
2022-01-13 11:00:33 +11:00
Oliver
ae016730f8
Fix - needs a global function to schedule
2022-01-13 10:53:33 +11:00
Oliver
519a1009ab
Fix: wrap args in quotes
2022-01-13 10:47:37 +11:00
Oliver
934de1f772
Adds the ability for 'scheduled tasks' to be member functions of plugins
2022-01-13 10:24:47 +11:00
Matthias
8690326a8f
PEP fix
2022-01-12 01:04:25 +01:00
Matthias
678b89e093
consolidate helpers
2022-01-12 00:59:09 +01:00
Matthias
3dab1ab736
remove unneeded branches
2022-01-12 00:56:18 +01:00
Matthias
4f74ae3fce
readd import
2022-01-12 00:22:06 +01:00
Matthias
62236474e2
Merge branch 'master' of https://github.com/inventree/InvenTree into matmair/issue2519
2022-01-12 00:12:32 +01:00
Matthias
164ee5fa5c
fix reference
2022-01-12 00:08:58 +01:00
Oliver
2255619b40
Merge pull request #2534 from SchrodingersGat/plugin-enable
...
Plugin enable
2022-01-12 09:49:52 +11:00
Oliver
4f79904fc8
Ignore events from 'webhook' tables
2022-01-11 15:02:32 +11:00
Oliver
8aec055e6c
Only load plugins if PLUGINS_ENABLED is true
...
- Hide plugin settings
- Add plugin support status to "stats" dialog
2022-01-11 13:39:47 +11:00
Matthias
db197a98b6
PEP fix
2022-01-11 01:51:19 +01:00
Matthias
cd9e9a367b
PEP fix
2022-01-11 01:49:42 +01:00
Matthias
a31ff85c89
rename to make clearer
2022-01-11 01:45:20 +01:00
Matthias
7c51d0e399
PEP fix
2022-01-11 01:44:55 +01:00
Matthias
2a7ad93173
move invenTreePlugin to new class
...
to enable depreceation
2022-01-11 01:41:33 +01:00
Matthias
86142856f7
PEP fixes
2022-01-11 01:25:21 +01:00
Matthias
0f7c277e69
docstrings
2022-01-11 01:19:03 +01:00
Matthias
d215af45f1
simplify code
2022-01-11 01:18:51 +01:00
Matthias
fa6a20712f
docstring
2022-01-11 01:13:52 +01:00
Matthias
9b02e3bdb7
reafactor
2022-01-11 01:13:36 +01:00
Matthias
9bb6bb294c
rename
2022-01-11 01:12:50 +01:00
Matthias
67a501f438
rename
2022-01-11 01:12:19 +01:00
Matthias
56772ccd02
docstring fix
2022-01-11 01:10:59 +01:00
Matthias
5424ee38e7
rename to makr internal functions as internal so
2022-01-11 01:10:34 +01:00
Matthias
0b9a6a1123
registry reanme fix
2022-01-11 01:09:04 +01:00
Matthias
9601811827
docstrings
2022-01-11 01:08:51 +01:00
Matthias
f612f57992
make registration simpler
2022-01-11 01:08:35 +01:00
Matthias
3ff4ed67c3
docstrings
2022-01-11 01:08:09 +01:00
Matthias
3ae84617d0
change default values for plugin hadler
2022-01-11 01:01:51 +01:00
Matthias
f53e66d4c3
Rename registry to make it clearer
2022-01-11 01:00:41 +01:00
Matthias
0283214034
add custom errors for plugin
2022-01-11 00:43:18 +01:00
Matthias
dd2547e117
readd spaces
2022-01-11 00:32:56 +01:00
Matthias
c3d7a26f5d
readd api call (dont know how that happened)
2022-01-11 00:30:17 +01:00
Matthias
588936f6f4
PEP fix
2022-01-10 23:53:34 +01:00
Matthias
e08c87e49f
Merge branch 'matmair/issue2519' of https://github.com/matmair/InvenTree into matmair/issue2519
2022-01-10 23:52:00 +01:00
Matthias
3b6e31cd35
Merge branch 'master' of https://github.com/inventree/InvenTree into matmair/issue2519
2022-01-10 23:48:43 +01:00
Oliver
fde2b03172
Merge remote-tracking branch 'inventree/master' into triggers
...
# Conflicts:
# InvenTree/plugin/mixins/__init__.py
2022-01-10 20:34:42 +11:00
Oliver
4ae86c8c14
Reject triggered events when running special commands
2022-01-10 20:12:43 +11:00
Oliver
0a40c253a5
Do not fire events for some tables
2022-01-10 19:56:43 +11:00
Oliver
1243923944
Event refactoring
2022-01-10 17:28:44 +11:00
Oliver
886b1f1d72
Simplify event triggering
...
- add generic receivers for database actions
- exclude django_q tables, otherwise we get an infinite loop!
Ref: https://stackoverflow.com/questions/17507784/consolidating-multiple-post-save-signals-with-one-receiver/32230933#32230933
2022-01-10 17:24:53 +11:00
Matthias Mair
2bc4d57ffa
remove double code
2022-01-10 02:49:34 +01:00
Matthias
18cb676ce3
another PEP fix
2022-01-10 02:17:50 +01:00
Matthias
7d160039b1
PEP fixes
2022-01-10 02:15:58 +01:00
Matthias
632632c8ad
fix lookup function
2022-01-10 01:28:44 +01:00
Matthias
20e712a287
update barcodes to use mixin
2022-01-10 01:23:48 +01:00
Matthias
4fc3e85a53
use new loading mechanism for barcodes too
2022-01-10 01:06:05 +01:00
Matthias
13ff94b6b2
remove dead code
2022-01-10 01:05:32 +01:00
Matthias
bb559deb5d
add docstrings
2022-01-10 01:00:45 +01:00
Matthias
6affc7550b
add depreciation TODO
2022-01-10 01:00:12 +01:00
Matthias
bcb0f62e42
remove old loading mechanism
2022-01-10 00:59:24 +01:00
Matthias
8088bf28fe
refactor ActionPlugin to use mixin
2022-01-10 00:40:19 +01:00
Matthias
6af2267e3d
fix test
2022-01-09 23:05:51 +01:00
Matthias
bf7af8f72a
cover another missing setting
2022-01-09 23:01:38 +01:00
Matthias
afada6b759
test the url arg building
2022-01-09 22:56:14 +01:00
Matthias
2c05b858a4
renmae var
2022-01-09 22:34:02 +01:00
Matthias
c8599039a2
added test for wrong config
2022-01-09 22:33:14 +01:00
Matthias
e889f487f0
added a check for the required constants
2022-01-09 22:27:50 +01:00
Matthias
31d587a9b1
unittests fdor ApiCallMixin
2022-01-09 22:19:01 +01:00
Matthias
c699ced34a
make general mixin tests multi mixin enabled
2022-01-09 22:16:19 +01:00
Oliver
e891e0a2b9
typo fix
2022-01-09 23:02:24 +11:00
Oliver
d765be8c73
Iterate through plugins in a separate background task
2022-01-09 22:58:59 +11:00
Oliver
3731d688c9
Refactor behaviour of "event" mixin:
...
- Trigger a new background task for each plugin
- Call plugin.process_event
- Plugin class can then decide what to do with the particular event
2022-01-09 22:52:28 +11:00
Matthias
ad9a9da656
PEP fix
2022-01-09 03:35:29 +01:00
Matthias
f9742ab41d
add integration test for plugin
2022-01-09 03:34:27 +01:00
Matthias
cc8948c708
fix sample url
2022-01-09 03:34:08 +01:00
Matthias
b48e9bcac9
fix settings call
2022-01-09 03:33:47 +01:00
Matthias
ea8fd21af0
pip fix
2022-01-09 03:10:23 +01:00
Matthias
ed193e9e90
docstring for plugin base import class
2022-01-09 03:04:00 +01:00
Matthias
61b21d1ec1
add sample for api caller
2022-01-09 03:03:05 +01:00
Matthias
19f2c44c2a
change mixin name
2022-01-09 03:02:19 +01:00
Matthias
33ee7e53db
append docstring
2022-01-09 03:01:50 +01:00
Matthias
d939107d36
add example
2022-01-09 03:01:31 +01:00
Matthias
3aea1bb7ba
made docstring clearer
2022-01-08 21:59:02 +01:00
Matthias
f59b59401f
refactor setting
2022-01-08 21:58:44 +01:00
Matthias
62394c4a82
small reformat
2022-01-08 21:54:42 +01:00
Matthias
3bc3e98ed1
Merge branch 'master' of https://github.com/inventree/InvenTree into api-mixin
2022-01-08 21:50:37 +01:00
Oliver
04d25a60b0
Adds sample plugin which responds to triggered events
...
- Adds some example trigger events for the "Part" model
2022-01-08 09:07:27 +11:00
Oliver
a604d85f0f
Move events.py to the plugin app
2022-01-07 22:35:54 +11:00
Oliver
63eb49777a
Add mixin class to respond to internal events
2022-01-07 22:29:19 +11:00
Matthias
220bf0db3a
Merge branch 'master' of https://github.com/inventree/InvenTree into plugin-install
2022-01-07 08:57:04 +01:00
Oliver Walters
8efd45f0ad
log warning message if db not ready
2022-01-07 18:00:38 +11:00
Oliver Walters
668e2bfcd5
Further error catching
2022-01-07 17:20:57 +11:00
Oliver Walters
103dfaa2a5
try/catch for operational error
...
- Database might not yet be ready to load models
2022-01-07 17:11:53 +11:00
Oliver Walters
c04e07c1fa
Add a task which fails on purpose
2022-01-07 17:04:33 +11:00
Oliver Walters
36feef6558
Remove log message if not relevent
2022-01-07 16:53:51 +11:00
Oliver Walters
3eb1fa32f9
Scheduled tasks get registered for the background worker
2022-01-07 16:51:00 +11:00
Oliver Walters
0ab9b2dbc7
Bug fix - always allow plugins to register settings
2022-01-07 15:42:20 +11:00
Oliver Walters
794a9e75e8
Add validation for scheduled tasks defined by a plugin
2022-01-07 15:37:43 +11:00