2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

1342 Commits

Author SHA1 Message Date
Matthias Mair
516755db97
refactor(frontend): Do not request token in frontend (#9217)
* remove calls that reference tokens

* remove call to token endpoint

* ensure CSRFToken is always send

* bump axios

* lower axios

* reset axios change

* bump reslution down
2025-03-16 08:36:58 +11:00
Oliver
0e43e8de2d
Further reduce log output for weasyprint (#9305)
Co-authored-by: Matthias Mair <code@mjmair.com>
2025-03-16 07:42:54 +11:00
Oliver
4eaa5880c1
Fix currency rendering (#9308)
- Closes https://github.com/inventree/InvenTree/issues/9300
2025-03-16 07:42:34 +11:00
Oliver
e1ac1c77c0
Provide mocked URL to dummy print requst (#9307)
* Provide mocked URL to dummy print requst

- FIxes bug which prevented background printing with DEBUG=False

* Disable debug for postgres testing
2025-03-16 00:53:19 +11:00
Joe Rogers
d7aa5e45b9
Check for schema generation state when removing fields (#9236)
* Ensure notes are not removed when generating schema

* Skip remaining conditional field removals when generating schema, remove removable fields from required lists

* Update API version, add schema gen state check for api-doc endpoint

* Add test for generate schema state

* Add test for schema postprocessing function

* Filter nullable + read_only fields out of schema required lists

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2025-03-15 23:53:30 +11:00
Oliver
cdb445583b
Prevent sentry reporting in test mode (#9304) 2025-03-15 22:42:18 +11:00
Oliver
3dfd1ed146
Static Asset Management (#9292)
* Caddyfile: Redirect asset requests

- Ensure the static asset files are served by the proxy
- Reduce gunicorn / python load
- Significant server performance increase

* Allow CORS requests to 'assets' path

* Update static assets path for vite build

* Remove RedirectAssetView

* Specify relative base path

Ref: https://vite.dev/guide/build.html#relative-base

* Revert settings.py

* Revert caddyfile

* Remove defunct unit test

* Add timeout to test
2025-03-14 08:20:51 +11:00
Oliver
b25bf5e669
Dynamic filters (#9290)
* Add attributes to TableFilter type def

* Refactoring

* Refactor ProjectCodeFilter

* Provide simple string rendering of a dynamic filter

* Refactor ResponsibleFilter

* Further refactoring

* More refactoring

* Fix placeholder value
2025-03-13 13:09:37 +11:00
Oliver
7a43c3a83e
Auto-fill currency for new supplier part (#9286)
- Closes https://github.com/inventree/InvenTree/issues/9284
2025-03-13 01:35:29 +11:00
dependabot[bot]
0049544305
Bump @babel/runtime from 7.25.6 to 7.26.10 in /src/frontend (#9285)
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.25.6 to 7.26.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 00:46:09 +11:00
github-actions[bot]
f7536a9f89
New Crowdin translations by GitHub Action (#9175)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-11 19:21:21 +11:00
dependabot[bot]
fdfbd5f783
Bump jinja2 from 3.1.5 to 3.1.6 in /src/backend (#9272)
* Bump jinja2 from 3.1.5 to 3.1.6 in /src/backend

Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.5 to 3.1.6.
- [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.5...3.1.6)

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

Signed-off-by: dependabot[bot] <support@github.com>

* fix req

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2025-03-11 08:05:17 +11:00
dependabot[bot]
1cd7baabb1
Bump axios from 1.7.9 to 1.8.2 in /src/frontend (#9270)
Bumps [axios](https://github.com/axios/axios) from 1.7.9 to 1.8.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.9...v1.8.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 08:04:04 +11:00
dependabot[bot]
94ded911cc
Bump django from 4.2.19 to 4.2.20 in /src/backend (#9252)
* Bump django from 4.2.19 to 4.2.20 in /src/backend

Bumps [django](https://github.com/django/django) from 4.2.19 to 4.2.20.
- [Commits](https://github.com/django/django/compare/4.2.19...4.2.20)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix req

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2025-03-10 20:49:08 +11:00
Oliver
06961c6a24
Add error handling to API queries (#9253) 2025-03-07 14:30:51 +11:00
Oliver
2e91dc202b
Fix for link length migration (#9249)
- Found some fields which had not been migrated correctly
2025-03-06 16:24:54 +11:00
Matthias Mair
8e753b3797
fix(backend): API version correction (#9243)
The API version was not corretly changed in https://github.com/inventree/InvenTree/pull/9131 - this fixes it.

Fixes https://github.com/inventree/InvenTree/issues/9242
2025-03-05 11:24:29 +00:00
Oliver
017d96f64e
Ignore sentry for TemplateSyntaxError (#9239)
- Getting flodded with reports of users misapplied template filters
2025-03-05 22:00:05 +11:00
Oliver
21ae1138ce
Tracking api fix (#9238)
* [Bug] Fix search for StockTrackingList

- Removed invalid field

* Add unit test coverage for failing condition

* Fix 'notes' field for extra line item API
2025-03-05 21:59:44 +11:00
simonkuehling
d96f0d78e9
increase character limits on all link fields to 2000 (#9131)
* increase character limits on all link fields to 2000

* update test to still trigger

* Don't fail when diff is too big for echo (#9205)

* Reduce severity of error message (#9209)

- Currently flooding sentry.io with reports

* Disable pagination for ConfigList class (#9210)

* [API] Auth login error (#9212)

Fixes #9211

* [UI] Table Update (#9220)

- Retain user selection for pageSize

* renumber migrations after merge from master

* Remove quick actions (#9222)

* Remove placeholder components

- No function
- Cleanup for 1.0.0

* Remove Placeholder.tsx

* feat(backend): Add user profile (#9116)

* Add user profile

* fix choice set

* ensure primary_group is valid

* add missing migrations

* fix tests

* merge migrations

* add migration test

* add new model to ruleset

* ensure changed to the m2m conenction also validate primary grups

* move signals

* fix import?

* patch user language through

* use set methods correctly

* bump api

* refactoring to make debugging and extending easier

* fix dum recurrsion problem

* fix user pk lookup

* rename migration

* add user and group page

* cleanup

* add hoverCard for user / owner / group render

* include owner_model in owner responses

* move user serializers to users

* add profile to list

* add brief serializer for profiles

* ensure profile is present in most apis

* extend rendered data

* store and observe langauge in profile

* reduce unneeded complexity

* enable access to full profle (including internal fields) in me serializer

* move theme to a single object

* persist theme settings

* fix radius lookup

* remove debug message

* fix filter

* remove unused field

* remove image fields

* add setting to control showing profiles

* fix settings

* update test

* fix theme reload

* Add contact UI

* Add profile edit screen

* fix test

* Add testing for user theme panel

* fix var name

* complete coverage of theme

* Add test for new pages

* make test more reliable in strict mode

* remove step

* fix ref

* add verbose names

* fix used setting

* extend tests

* fix permissions

* fix lookup

* use lookup to enuse ursls stay valid

* update migrations

* Add position field

* fix permissions

* Fix font size in location column (#9230)

* [WIP] Background reports (#9199)

* Update report generation progress

* Add shim task for offloading report printing

* Cleanup

* Add detail endpoints for label and report outputs

* Display report printing progress in UI

* Implement similar for label printing

* Reduce output for CI

* Add plugin slug

* Bump API version

* Ensure it works with machine printing

* Fix null comparison

* Fix SKU link

* Update playwright tests

* Massively reduce log output when printing

* handle null values in existing db data

* fix test to pass at max character limit again

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Joe Rogers <1337joe@users.noreply.github.com>
2025-03-05 10:44:04 +11:00
Oliver
d822b9b574
[WIP] Background reports (#9199)
* Update report generation progress

* Add shim task for offloading report printing

* Cleanup

* Add detail endpoints for label and report outputs

* Display report printing progress in UI

* Implement similar for label printing

* Reduce output for CI

* Add plugin slug

* Bump API version

* Ensure it works with machine printing

* Fix null comparison

* Fix SKU link

* Update playwright tests

* Massively reduce log output when printing
2025-03-04 23:40:54 +11:00
Oliver
d5a176c121
Fix font size in location column (#9230) 2025-03-04 23:27:34 +11:00
Matthias Mair
0d1ab4e75a
feat(backend): Add user profile (#9116)
* Add user profile

* fix choice set

* ensure primary_group is valid

* add missing migrations

* fix tests

* merge migrations

* add migration test

* add new model to ruleset

* ensure changed to the m2m conenction also validate primary grups

* move signals

* fix import?

* patch user language through

* use set methods correctly

* bump api

* refactoring to make debugging and extending easier

* fix dum recurrsion problem

* fix user pk lookup

* rename migration

* add user and group page

* cleanup

* add hoverCard for user / owner / group render

* include owner_model in owner responses

* move user serializers to users

* add profile to list

* add brief serializer for profiles

* ensure profile is present in most apis

* extend rendered data

* store and observe langauge in profile

* reduce unneeded complexity

* enable access to full profle (including internal fields) in me serializer

* move theme to a single object

* persist theme settings

* fix radius lookup

* remove debug message

* fix filter

* remove unused field

* remove image fields

* add setting to control showing profiles

* fix settings

* update test

* fix theme reload

* Add contact UI

* Add profile edit screen

* fix test

* Add testing for user theme panel

* fix var name

* complete coverage of theme

* Add test for new pages

* make test more reliable in strict mode

* remove step

* fix ref

* add verbose names

* fix used setting

* extend tests

* fix permissions

* fix lookup

* use lookup to enuse ursls stay valid

* update migrations

* Add position field

* fix permissions
2025-03-04 22:57:20 +11:00
Oliver
8bca48dbdd
Remove quick actions (#9222)
* Remove placeholder components

- No function
- Cleanup for 1.0.0

* Remove Placeholder.tsx
2025-03-04 17:54:36 +11:00
Oliver
8cee2e36ca
[UI] Table Update (#9220)
- Retain user selection for pageSize
2025-03-03 19:09:42 +11:00
Matthias Mair
ac96ba4a7c
[API] Auth login error (#9212)
Fixes #9211
2025-03-02 07:58:46 +11:00
Oliver
d69fb9011c
Disable pagination for ConfigList class (#9210) 2025-03-01 16:12:09 +11:00
Oliver
8404e2232f
Reduce severity of error message (#9209)
- Currently flooding sentry.io with reports
2025-03-01 16:12:01 +11:00
Oliver
6c52f00c16
Call machine func (#9191)
* Force label printing to background worker

* Refactor "check_reload" state of machine registry

- In line with plugin registry
- More work can be done here (i.e. session caching)

* Better handling of call_plugin_function

* Wrapper for calling machine function

* Use AttributeError instead

* Simplify function offloading

* Check plugin registry hash when reloading machine registry

* Cleanup

* Fixes

* Adjust unit test

* Cleanup

* Allow running in foreground if background worker not running

* Simplify call structure
2025-02-28 21:07:56 +11:00
Joe Rogers
157cbbead5
Schema cleanup tmp (#9143)
* Add type hints for name, address, expired, and active

* Add nullable to various fields that return null in the test dataset

* Removed nullable type hint, add default boolean value instead of nullable

* Bump schema version

* Add schema version notes, add localized tags for doc string

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2025-02-28 19:15:35 +11:00
Oliver
92a9423c21
Remove restriction on row action (#9201) 2025-02-28 16:43:25 +11:00
Michael
0da9391568
Add part full name to supplier part table (#9197) 2025-02-27 23:17:43 +11:00
Oliver
28259a1ad6
Add loading indicator for custom panels (#9194) 2025-02-27 15:25:56 +11:00
Oliver
92edbf41ab
Add 'note' field to form (#9186) 2025-02-26 13:56:28 +11:00
Oliver
3940544a70
Allow custom icons to be cleared (#9185)
* Allow custom icons to be cleared

- Closes https://github.com/inventree/InvenTree/issues/9182

* Bump API version

* Update unit test

* Loosen test requirements
2025-02-26 13:25:44 +11:00
Oliver
94c2157d3c
Handle case of null stock location (#9183) 2025-02-26 09:26:11 +11:00
Oliver
df60b1bc22
Allow reload of stock table if multiple new items are created (#9178) 2025-02-25 21:37:43 +11:00
Matthias Mair
89c5148873
Revert "remove need for hard coded token (#9136)" (#9177)
This reverts commit 9f236f5ce9866513354a9e5e138507a9d7151b09.
2025-02-25 09:44:14 +00:00
Matthias Mair
9f236f5ce9
remove need for hard coded token (#9136) 2025-02-25 09:22:35 +11:00
Matthias Mair
991b578c30
refactor(frontend): Auth component refactor (#9121)
* https://github.com/inventree/InvenTree/pull/6293

* refactor to a shared component

* refactoring container stuff to a wrapper

* move title to wrapper

* move logoff and loader to wrapper

* mvoe functions to general auth

* seperate login and register into seperate pages

* unify auth styling

* rename component

* adapt to new look

* check if registration is enabled

* reduce diff

* reduce diff

* fix import

* add aria label to make more reliable

* make cap match

* ensure that confirm only works with valid inputs

* leave error for non-matching pwd to API

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2025-02-25 07:04:16 +11:00
Oliver
58a03d960a
Refactor API token display (#9168)
* Refactor API token display

* Tweaks

- Fix accessor ID
- Add filtering

* Revert ordering fields
2025-02-25 07:03:22 +11:00
github-actions[bot]
49eaedaca6
New Crowdin translations by GitHub Action (#9161)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-24 11:14:52 +11:00
Oliver
cfdafcd791
Dashboard item rendering fixes (#9163) 2025-02-23 21:39:22 +11:00
Oliver
c9666ff8ec
Remove 'url' field from serializers (#9150)
* Remove 'url' field from serializers

- Not used in any official client
- Inconsistent use across models

* Bump API version

* Adjust unit tests

* Fix API version
2025-02-23 21:07:34 +11:00
Oliver
9d1d0fa66b
Cleanup backend code (#9158)
* Cleanup backend code

* Re-add # TODO
2025-02-23 17:51:51 +11:00
Oliver
05fa36df72
TODO Cleanup (#9152) 2025-02-23 09:31:02 +11:00
Matthias Mair
c3f737b320
fix(frontend): header nesting warning when using navbar_message (#9154) 2025-02-23 08:16:03 +11:00
Oliver
07423ff247
Slight tweaks to forms (#9149) use 2025-02-22 23:33:35 +11:00
Oliver
347f7ea050
[UI] Barcode scanner update (#9151)
Use BARCODE_WEBCAM_SUPPORT setting
2025-02-22 23:33:17 +11:00
Oliver
8df34cefd6
[UI] Settings render (#9148)
* Update sample plugin

* Inline rendering of model based settings

* Spelling fix

* Add playwright testing
2025-02-22 21:59:06 +11:00