Commit Graph

11420 Commits

Author SHA1 Message Date
Oliver
a2ede73669
Merge pull request #2515 from SchrodingersGat/triggers
[Plugin] Triggered Events
2022-01-10 20:55:43 +11: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
204f60405e
Merge pull request #2518 from matmair/api-mixin
[Plugin] API Call mixin
2022-01-10 20:33:17 +11:00
Oliver
4ae86c8c14 Reject triggered events when running special commands 2022-01-10 20:12:43 +11:00
Oliver
c848ca8d44 Handle errors when offloading tasks 2022-01-10 20:04:36 +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
Oliver
f7925e2d80
Merge pull request #2522 from SchrodingersGat/hide-restart-message
Hide "restart required" message in demo mode
2022-01-10 14:53:24 +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
e80a71eb46
load plugins too 2022-01-10 02:10:24 +01:00
Matthias
d03c636067
fix plugin init sequence 2022-01-10 02:10:08 +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
Oliver
4ddd6bc351 Adds more triggered events for stock models 2022-01-10 09:16:18 +11:00
Oliver
a2b88dd0fa
Merge pull request #2521 from matmair/patch-1
small fix to language in readme
2022-01-10 09:10:52 +11:00
Oliver
67aac9c373 Add triggere events for the "company" app 2022-01-10 09:07:30 +11:00
Matthias
6af2267e3d
fix test 2022-01-09 23:05:51 +01:00
Oliver
13d8bf437a PEP fixes 2022-01-10 09:02:11 +11:00
Matthias
bf7af8f72a
cover another missing setting 2022-01-09 23:01:38 +01:00
Oliver
2370e41961 Add multiple triggered events for the "order" app 2022-01-10 09:01:17 +11:00
Matthias
afada6b759
test the url arg building 2022-01-09 22:56:14 +01:00
Oliver
5acd880f39 Fix for triggered events 2022-01-10 08:54:11 +11:00
Oliver
0002edc32c Hide "restart required" message in demo mode 2022-01-10 08:50:50 +11:00
Matthias Mair
f219a10b2f
small fix to language in readme
normally the kind of API we supply is called REST
2022-01-09 22:46:28 +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
936330d3d2 Add more triggered events 2022-01-09 23:07:12 +11: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
Oliver
be729d037e
Merge pull request #2520 from SchrodingersGat/build-comple-fix-2
Second bug fix for "build complete" form
2022-01-09 22:38:42 +11:00
Oliver
6aa83796ea PEP fixes 2022-01-09 22:15:59 +11:00
Oliver
da9fa1313c Increased unit testing 2022-01-09 22:14:48 +11:00
Oliver
3e2e9aaf9e Mark serializer fields as not required 2022-01-09 20:10:00 +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