Coverage for src/backend/InvenTree/plugin/samples/integration/simpleactionplugin.py: 0%

12 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-07 17:47 +0000

1"""Sample implementation for ActionMixin.""" 

2 

3from plugin import InvenTreePlugin 

4from plugin.mixins import ActionMixin 

5 

6 

7class SimpleActionPlugin(ActionMixin, InvenTreePlugin): 

8 """An EXTREMELY simple action plugin which demonstrates the capability of the ActionMixin class.""" 

9 

10 NAME = 'SimpleActionPlugin' 

11 SLUG = 'simpleaction' 

12 ACTION_NAME = 'simple' 

13 

14 def perform_action(self, user=None, data=None): 

15 """Sample method.""" 

16 print('Action plugin in action!') 

17 

18 def get_info(self, user, data=None): 

19 """Sample method.""" 

20 return {'user': user.username, 'hello': 'world'} 

21 

22 def get_result(self, user=None, data=None): 

23 """Sample method.""" 

24 return True