Commit Graph

14936 Commits

Author SHA1 Message Date
Oliver
edad000d8e
CORS fixes: (#6310)
* CORS fixes:

- Update CORS headers in settings.py

* Remove dead code
2024-01-22 04:48:58 +00:00
Lavissa
917a88c6f4
Add check for KeyError on reading plugin commit (#6300)
* Add check for KeyError on reading plugin commit

* .

* .
2024-01-22 06:56:08 +11:00
Oliver
428a4c0386
SSO Error Improvememts (#6246)
* Improve exception handling

* Extract extra information from SSO auth failure

* Revert order of ignore check
2024-01-21 23:31:47 +11:00
Oliver
4b5fcd4e69
Remove {% jstrans %} tag (#6298)
* Revert {% jstrans %} for .js files

- file extension is enough

* Remove custom jstrans templatetag

* Replace jstrans calls for .html files

- Add "escape=True"

* Allow for custom "escape" argument

* Update custom trans tag

- Cannot pass kwargs in the same way
- Add the "escape" attribute

* Update js translations in html files
2024-01-21 22:47:47 +11:00
Oliver
c5d0902379
django-allauth==0.6.1 (#6301) 2024-01-20 22:33:41 +00:00
Oliver
e3f6624cf9
SSO config docs (#6297)
* Fix django-allauth URLs

* Update SSO docs
2024-01-20 15:31:17 +11:00
dependabot[bot]
22068da3fa
Bump vite from 4.4.12 to 4.5.2 in /src/frontend (#6296)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.12 to 4.5.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.2/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-20 02:40:52 +00:00
Oliver
4f8dddc597
JS translation fix (#6288)
* Implement {% jstrans %} template

- Forces string escaping in translated text
- Required for js written in templates

* Fix part_base.html

* Update .html files

- Change any templated javascript code to use {% jstrans %}

* Update .js files

- Explicitly use {% jstrans %}

* Update CI checks
2024-01-19 01:16:17 +00:00
Matthias Mair
914743627b
[PUI] Fix global login (#6287)
* Global login PUI -> CUI
Fixes #6285

* ensure session is always set

* Check if user is already logged in CUI->PUI

* reduce diff
2024-01-19 00:57:00 +00:00
Oliver
a0b595de6e
Tracing tweaks (#6278)
* Tweaks for OpenTelemetry tracing:

- Add logger info message if enabled
- Explicit kwargs to setup_tracing method
- Change is_http to True by default (as per internal docs)

* Allow operation without specifying tracing.headers

* Clean up log message
2024-01-19 11:55:48 +11:00
Matthias Mair
357f715789
[PUI] Fix logout (#6284)
* fix path

* changed PUI to use logout route
Fixes #5968
2024-01-19 11:30:19 +11:00
Matthias Mair
64dbf8c1e3
[FR] Add tracing support (#6211)
* [FR] Add tracing support
Fixes #6208

* move checks out of manage.py

* fixed reqs

* small cleanup

* move tracing init to settings
similar to how sentry is handled

* rephrase

* clean up imports

* added argument regarding console debugging

* fix typing

* added auth section

* remove empty headers

* made protocol configurable

* rename vars & cleanup template

* more docs for template

* add docs
2024-01-18 17:50:05 +11:00
Oliver
89e458bcba
Import Fix (#6274)
* Fix check for static dir

* Fix export price field for SalesOrderLineItem

* Automatically detect which non-nullable fields need conversion

* Fix bug during import

- fulfilled_quantity and allocated_quantity must have a pk
- Cannot work before imported!
2024-01-18 17:25:25 +11:00
Oliver
1d3a23ca4e
News updates (#6275)
* Set default ordering

* Order table by "most recent entries" by default
2024-01-18 17:25:15 +11:00
Matthias Mair
b8b3dfc90e
Move more paths to basic path (#6251)
* move more paths to basic path

* changed url route to only match fully - fixed test

* revert path changes on labelprint pages

* fix not found/redirect

* revert test change
2024-01-18 17:05:10 +11:00
Oliver
c3a5d777b1
Do not create owners when importing data (#6271)
- Prevent issues due to duplicate Owner objects
2024-01-18 10:31:43 +11:00
Oliver
053df0f59d
Update README.md (#6270)
Add new sponsor

(Thanks @markus-k :) )
2024-01-18 09:37:54 +11:00
Lavissa
0892de8c99
Fix news feed task timeout (#6250) 2024-01-17 17:52:52 +11:00
Oliver
eb7fd4de2b
New Crowdin updates (#6258)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-17 16:40:17 +11:00
Oliver
b983a8636c
Report copy fix (#6264)
* Update process for copying default report templates

- Overwrite if the file hash has changed

* Cleanup inline code
2024-01-17 16:40:05 +11:00
Oliver
7d36049ac9
[React] UI Translation Updates (#6257)
* Move locales definition into separate file

- Cleanup settings.py a bit

* Update docstring

* Expose 'default_locale' to info API endpoint

* Validate settings.LANGUAGE_CODE

* Fix bug in BuildDetail page

* Use selected language when making API queries

* Translate more strings

* Tweak variable name

* Update locale config

* Remove duplicate code

* Remove compiled messages.ts translation files

* Fixes for LanguageContext.tsx

* Update messages.d.ts for sr locale

* Ensure compiled files are served by django runserver

* Amend changes to STATICFILES_DIRS

* Cleanup prerender.py

* Refetch status codes when locale is changed

* Fix log msg

* Clear out old static files
2024-01-17 16:29:06 +11:00
Oliver
386aa5952c
Update invoke docs (#6263)
- Minimum invoke version is 2.0.0
2024-01-17 12:36:24 +11:00
Oliver
75f75ed820
Tasks API Endpoint (#6230)
* Add API endpoint for background task overview

* Cleanup other pending heartbeat tasks

* Adds API endpoint for queued tasks

* Adds API endpoint for scheduled tasks

* Add API endpoint for failed tasks

* Update API version info

* Add table for displaying pending tasks

* Add failed tasks table

* Use accordion

* Annotate extra data to scheduled tasks serializer

* Extend API functionality

* Update tasks.py

- Allow skipping of static file step in "invoke update"
- Allows for quicker updates in dev mode

* Display task result error for failed tasks

* Allow delete of failed tasks

* Remove old debug message

* Adds ability to delete pending tasks

* Update table columns

* Fix unused imports

* Prevent multiple heartbeat functions from being added to the queue at startup

* Add unit tests for API
2024-01-17 07:10:42 +11:00
miggland
5c7d3af150
Add tests for report API (#6214)
* Add tests for report api

* Add test for delete endpoint

* Use pk in reverse call

* Allow kwargs in APITestCase methods

* Data is in response.data

* Fix comment

* Use expected_code argument instead of separate check

* Test with superuser

* Negative indexing not allowed, try with this alternative

* Looking for what went wrong..

* APITestCase does not work like Python requests - change POST calls

* Upload success is code 201

* In PATCH method, change test file and description as well

* Add test for get_api_url method

* Change format parameter for file upload

* Copy tests for report API over to label API

* Add test model for BuildLineLabel

* Update tests

* Make example template valid

* Add methods for testing label printing
2024-01-17 06:55:55 +11:00
Oliver
21ff17332d
Do not translate string (#6248) 2024-01-16 22:12:59 +11:00
Oliver
7cd62527c0
Prevent creation of new PluginConfig during data import (#6247)
* Prevent creation of new PluginConfig during data import

- Fixes race condition which can occur sometimes

* typo fix
2024-01-16 22:12:51 +11:00
Oliver
716e577916
Update rebuild_thumbnails command (#6254)
* Update rebuild_thumbnails command

- Skip if images already exist
- Prevents significant clutter in the logs
- Speeds up the command too

* Refactoring
2024-01-16 22:12:38 +11:00
Oliver
8eec2f32c0
Panel index fix (#6255)
* Fix panel routing for part category index

* Fix routing for stock location index
2024-01-16 22:12:28 +11:00
Oliver
fa28697799
Import data fix (#6253)
* Use '--natural-foreign' when exporting dataset

- Uses "natural keys" (model names) instead of ContentType ID

* Update task options

- Change 'include_plugins' to 'exclude_plugins'
- Change 'delete_temp' to 'retain_temp'

* Split data import into two-step process

- First, import auth models
- Second, import data
- Ensures auth.user and auth.group are in place before users.owner is loaded

* Adjust temp file name

* Touch apps.py

- Just so the proper CI checks run
2024-01-16 21:32:51 +11:00
Oliver
829e01dd33
Updates to data import/export steps (#6244)
* Updates to data import/export steps

- Allow import/export of users.owner model
- Allow export of API tokens (optional, default=False)

* Exclude plugin configuration data by default

* Add option to exclude socialaccount information from exported data
2024-01-16 01:26:57 +11:00
Oliver
576bef5d82
Add new setting PURCHASEORDER_AUTO_COMPLETE (#6245)
* Add new setting PURCHASEORDER_AUTO_COMPLETE

- Controls whether purchase orders are automatically closed
- Default to True

* Tweak setting component
2024-01-16 00:51:03 +11:00
Oliver
3511450b3d
Update callback when base currency is adjusted (#6243)
* Update callback when base currency is adjusted

- Schedule recalculation of part pricing

* Revert old changes
2024-01-15 17:12:16 +11:00
Oliver
f396642d16
Fix escape codes in translated strings (#6234)
* Fix escape codes in translated strings

- Only add escape characters for javascript files

* import fix

* more import fix
2024-01-14 13:29:36 +11:00
Bobbe
d2d59e0709
Add tests for get_purchase_orders logic (#6236) 2024-01-14 12:44:34 +11:00
Oliver
f27503b1af
Cleanup about and version dialogs (#6235) 2024-01-14 10:10:34 +11:00
Oliver
9070eaad60
New Crowdin updates (#6229)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-14 08:36:45 +11:00
Oliver
4254b7dda3
Add settings for return orders (#6231) 2024-01-14 07:52:13 +11:00
Oliver
544c7d389c
Fix display of error notifications (#6232) 2024-01-14 07:52:02 +11:00
Oliver
ef679b1663
Error API (#6222)
* Adds API endpoint for fetching error information

* Bump API version

* Implement table for displaying server errors

* Add support for "bulk delete" in new table component

* Update API version with PR

* Fix unused variables

* Enable table sorting

* Display error details
2024-01-13 19:27:47 +11:00
Oliver
5180d86388
Change log message from info to debug (#6227)
- Reduces log verbosity for message which is not typically useful
2024-01-13 19:27:07 +11:00
Oliver
9b1a310ffe
Fix rendering of supplier part pack quantity (#6226)
- Fixes https://github.com/inventree/InvenTree/issues/6224
2024-01-13 08:06:47 +11:00
Oliver
213a63318d
Fix placeholder text values (#6223) 2024-01-13 01:29:12 +11:00
Oliver
a04b22b090
Fix URL regex (#6218)
URL regex for build report detail view was incorrect
2024-01-12 23:49:50 +11:00
Oliver
b4a7787447
New Crowdin updates (#6207)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-12 23:16:58 +11:00
Oliver
1b054c5a9c
Patch purchase_order.js (#6215)
* Patch purchase_order.js

Small tweak to catch potential undefined variable

* Cleanup

* Remove trailing whitespace
2024-01-12 22:17:39 +11:00
Matthias Mair
b8369fb726
fixed depreceated is_ajax (#6210) 2024-01-12 10:06:25 +11:00
dependabot[bot]
8a764c2c05
Bump jinja2 from 3.1.2 to 3.1.3 (#6209)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-12 09:38:05 +11:00
Bobbe
082b5d1c80
Fix reassigning supplier barcodes (#6162)
* Ignore 3rd party barcode plugins when assigning barcode

* Use single quotes
2024-01-12 09:37:04 +11:00
Oliver
7f231cb6c1
Specify ForeignKey widget for importing destination field (#6205)
- Fixes https://github.com/inventree/InvenTree/issues/6201
2024-01-11 22:17:14 +11:00
Oliver
df8b480abb
Style fixes (#6203) 2024-01-11 15:16:03 +11:00