2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-13 10:35:40 +00:00

Exchange rate plugin (#5667)

* Add plugin mixin class for supporting exchange rates

* Split some mixin classes out into their own files

- mixins.py is becoming quite bloated!

* Add some new settings for controlling currency updates

* Adds basic plugin implementation

* Refactor existing implementation

- Builtin plugin uses frankfurter.app API
- Better error / edge case handlign

* Add sample plugin for currency exchange

* Allow user to select which plugin to use for plugin updates

* Observe user-configured setting for how often exchange rates are updated

* Updates for some of the sample plugins

* Fix plugin slug

* Add doc page

* Document simple example

* Improve sample

* Add blank page for currency settings info

* More info in "config" page

* Update docs again

* Updated unit tests

* Fill out default settings values when InvenTree runs

* Add log messages

* Significant improvement in default settings speed

- Use bulk create
- Be efficient
- Dont' be inefficient

* More strict checks

* Refactor default values implementation

- Don't run at startup
- Run on list API
- Implement generic @classmethod
This commit is contained in:
Oliver
2023-10-05 21:19:28 +11:00
committed by GitHub
parent f5e8f27fcd
commit c7eb90347a
27 changed files with 760 additions and 405 deletions

View File

@ -162,6 +162,7 @@ nav:
- Error Logs: settings/logs.md
- Email: settings/email.md
- Background Tasks: settings/tasks.md
- Currency Support: settings/currency.md
- App:
- InvenTree App: app/app.md
- Connect: app/connect.md
@ -202,6 +203,7 @@ nav:
- API Mixin: extend/plugins/api.md
- App Mixin: extend/plugins/app.md
- Barcode Mixin: extend/plugins/barcode.md
- Currency Mixin: extend/plugins/currency.md
- Event Mixin: extend/plugins/event.md
- Label Printing Mixin: extend/plugins/label.md
- Locate Mixin: extend/plugins/locate.md