2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06:44 +00:00

662 Commits

Author SHA1 Message Date
Oliver
392624cb84
[PUI] Installed items (#8202)
* Improve checks if "installed items" panel should be displayed

* Adds ability to exclude a given field from form data

* Implement form for installing stock item

* Add placeholder for uninstall action

* Add "note" field

* Add PUI form to uninstall stock item
2024-09-27 16:00:06 +10:00
Oliver
a5f2273e14
[PUI] Serialize Stock (#8192)
* Add PUI form to serialize existing stock item

* Remove debug statement

* Ensure that stock item trees are rebuilt correctly after serialization

- No idea how this has not been detected previously

* Add unit test to ensure child_items annotation works as expected

* Add link to parent item in stock detail page

* Refactor to use new placeholder hook
2024-09-27 08:29:40 +10:00
Oliver
4f06918c36
[PUI] Fix Build Output Forms (#8184)
* Enhancements for stock item form

* Edit stock item from "build output" table

* Rearrange menu items

* Fix build order line complete action

* Fix for other modals

* Cleanup dead code

* Reload build details after output state change

* Logic fix for plugin table

* Bump API version

* Adds hook for generating placeholder serial numbers

* Add playwright tests

* Remove unused imports

* Cleanup playwright tests
2024-09-27 00:35:30 +10:00
Oliver
194640f55a
[PUI] Plugin panel context (#8190)
* Add server-side context for panel plugin rendering

* Add "context" to PluginContext type

* Pass server context through to client-side rendering

* Bump API version
2024-09-26 20:30:51 +10:00
Lukas
35362347a7
UI plugins custom features (#8137)
* initial implementation to let plugins provide custom ui features

* provide exportable types

* refactor ref into renderContext to make it more generic and support template preview area ui plugins

* rename 'renderContext' -> 'featureContext' as not all features may render something

* allow to specify the function name via the source file string divided by a colon

* Bump api version

* add tests

* add docs

* add docs

* debug: workflow

* debug: workflow

* fix tests

* fix tests hopefully

* apply suggestions from codereview

* trigger: ci

* Prove that coverage does not work

* Revert "Prove that coverage does not work"

This reverts commit 920c58ea6fbadc64caa6885aebfd53ab4f1e97da.

* potentially fix test???
2024-09-26 19:59:37 +10:00
Oliver
8928bc127a
Remove translation for logged warnings (#8173) 2024-09-24 21:47:47 +10:00
Oliver
6d0353028f
Enhance exception management (#8174) 2024-09-24 21:47:36 +10:00
Oliver
4f2baab43b
[PUI] Part scheduling (#8163)
* Placeholder part scheduling panel

* Add API endpoint definition

* Add defined serializer to scheduling endpoint

* Refactor add_schedule_entry

* Fix field type

* API tweak

* Render scheduling data

* Make links clickable

* Correctly account for dates in the past

* Cleanup table

* Bump API version information

* js linting
2024-09-24 13:57:28 +10:00
dependabot[bot]
82b7e97df6
Bump the dependencies group across 2 directories with 13 updates (#8167)
Bumps the dependencies group with 1 update in the /src/backend directory: [eslint](https://github.com/eslint/eslint).
Bumps the dependencies group with 12 updates in the /src/frontend directory:

| Package | From | To |
| --- | --- | --- |
| [@codemirror/language](https://github.com/codemirror/language) | `6.10.2` | `6.10.3` |
| [@sentry/react](https://github.com/getsentry/sentry-javascript) | `8.30.0` | `8.31.0` |
| [@uiw/codemirror-theme-vscode](https://github.com/uiwjs/react-codemirror) | `4.23.2` | `4.23.3` |
| [@uiw/react-codemirror](https://github.com/uiwjs/react-codemirror) | `4.23.2` | `4.23.3` |
| [react-select](https://github.com/JedWatson/react-select) | `5.8.0` | `5.8.1` |
| @codecov/vite-plugin | `1.1.0` | `1.2.0` |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.47.1` | `1.47.2` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.5.5` | `22.6.0` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.3.6` | `18.3.8` |
| [nyc](https://github.com/istanbuljs/nyc) | `17.0.0` | `17.1.0` |
| [rollup-plugin-license](https://github.com/mjeanroy/rollup-plugin-license) | `3.5.2` | `3.5.3` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.4.6` | `5.4.7` |



Updates `eslint` from 9.10.0 to 9.11.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.10.0...v9.11.0)

Updates `@codemirror/language` from 6.10.2 to 6.10.3
- [Changelog](https://github.com/codemirror/language/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codemirror/language/compare/6.10.2...6.10.3)

Updates `@sentry/react` from 8.30.0 to 8.31.0
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/8.30.0...8.31.0)

Updates `@uiw/codemirror-theme-vscode` from 4.23.2 to 4.23.3
- [Release notes](https://github.com/uiwjs/react-codemirror/releases)
- [Commits](https://github.com/uiwjs/react-codemirror/compare/v4.23.2...v4.23.3)

Updates `@uiw/react-codemirror` from 4.23.2 to 4.23.3
- [Release notes](https://github.com/uiwjs/react-codemirror/releases)
- [Commits](https://github.com/uiwjs/react-codemirror/compare/v4.23.2...v4.23.3)

Updates `react-select` from 5.8.0 to 5.8.1
- [Release notes](https://github.com/JedWatson/react-select/releases)
- [Changelog](https://github.com/JedWatson/react-select/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/JedWatson/react-select/compare/react-select@5.8.0...react-select@5.8.1)

Updates `@codecov/vite-plugin` from 1.1.0 to 1.2.0

Updates `@playwright/test` from 1.47.1 to 1.47.2
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.47.1...v1.47.2)

Updates `@types/node` from 22.5.5 to 22.6.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@types/react` from 18.3.6 to 18.3.8
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `nyc` from 17.0.0 to 17.1.0
- [Release notes](https://github.com/istanbuljs/nyc/releases)
- [Changelog](https://github.com/istanbuljs/nyc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/istanbuljs/nyc/compare/nyc-v17.0.0...nyc-v17.1.0)

Updates `rollup-plugin-license` from 3.5.2 to 3.5.3
- [Changelog](https://github.com/mjeanroy/rollup-plugin-license/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mjeanroy/rollup-plugin-license/compare/v3.5.2...v3.5.3)

Updates `vite` from 5.4.6 to 5.4.7
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.7/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.7/packages/vite)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@codemirror/language"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@sentry/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@uiw/codemirror-theme-vscode"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@uiw/react-codemirror"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: react-select
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@codecov/vite-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@playwright/test"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: nyc
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: rollup-plugin-license
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-24 13:06:59 +10:00
Oliver
6002103129
Barcode logging (#8150)
* Add model for recording barcode scan results

* Add "admin" interface for new model

* Add API endpoints for barcode scan history

* Add global setting to control barcode result save

* Add frontend API endpoint

* Add PUI table in "admin center"

* Add API filter class

* Enable table filtering

* Update model definition

* Allow more characters for barcode log

* Log results to server

* Add setting to control how long results are stored

* Table updates

* Add background task to delete old barcode scans

* Add detail drawer for barcode scan

* Log messages for BarcodePOReceive

* Add warning message if barcode logging is not enabled

* Add "context" data to BarcodeScanResult

* Display context data (if available)

* Add context data when scanning

* Simplify / refactor BarcodeSOAllocate

* Refactor BarcodePOAllocate

* Limit the number of saved scans

* Improve error message display in PUI

* Simplify barcode logging

* Improve table

* Updates

* Settings page fix

* Fix panel tooltips

* Adjust table

* Add "result" field

* Refactor calls to "log_scan"

* Display result in PUI table

* Updates

* Fix typo

* Update unit test

* Improve exception handling

* Unit test updates

* Enhanced unit test

* Ensure all database key config values are upper case

* Refactor some playwright helpers

* Adds playwright test for barcode scan history table

* Requires some timeout

* Add docs
2024-09-23 23:30:50 +10:00
Oliver
f132970ff3
[PUI] Stocktake (#7704)
* Adjust playwright test

* Add StocktakeReport table in the "admin" section

* Allow deletion of individual stocktake reports

* Add placeholder buttons

* Adds placeholder panel for stocktake data

* Implement <PartStocktakeTable />

* Add modal to generate a new report

* Generate stocktake report from part table

* Adjust table value

* panel display tweaks

* Improve query efficiency for supplier price breaks

* Refator part stocktake detail panel

* Fix role checks

* Cleanup code

* Fix "double loader" in <InvenTreeTable />

* API efficiency improvements

* Bump API version

* Tweak playwright test

* Update playwright test

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-09-21 18:29:59 +10:00
Oliver
0cd493e96e
Ensure DBBACKUP_STORAGE_OPTIONS is a dict (#8153) 2024-09-21 01:29:44 +10:00
Oliver
8514970da5
[PUI] Panels plugin fix (#8147)
* Rename "get_custom_panels" method

- So that PUI plugin does not conflict with CUI plugin

* Update docstrings

* Rename "get_ui_panels" -> "ui_panels"

* Docs fix

* rename "ui_panels" -> "get_ui_panels"
2024-09-19 17:23:09 +10:00
Oliver
6a8875a4a6
Duplicate orders via API (#8145)
* Refactor API endpoint for duplicating line items from a purchase order

- Previously was "hidden" (undocumented)
- Cleanup / refactor code
- Now matches part duplication options
- Generic implementation supports all order types

* Update forms

* Refactor line item duplication

* Implement front-end support for return orders

* Enable duplication of sales orders from PUI

* Bump API version
2024-09-19 13:17:50 +10:00
github-actions[bot]
22929eb0ab
New Crowdin translations by GitHub Action (#8141)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-18 13:59:01 +10:00
github-actions[bot]
9aab352a7e
New Crowdin translations by GitHub Action (#8135)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-17 16:05:56 +10:00
Oliver
45aab46db3
Lithuanian (#8134)
* Add lithuanian support to backend

* Lithuanian support for frontend
2024-09-17 09:55:49 +10:00
github-actions[bot]
280a97816a
New Crowdin translations by GitHub Action (#8108)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-16 23:28:44 +10:00
Oliver
12d2865b59
PUI Plugin Panels (#7470)
* Adds basic API endpoint for requesting plugin panels

* Split PanelType out into own file

* Placeholder for a plugin panel loaded dynamically

* Add some dummy data for the plugin panels

* Example of plugin panel selection based on page

* Expose some global window attributes

* Add new setting

* Disable panel return if plugin integration is not enabled

* Update hook to auto-magically load plugin panels

* Allow custom panel integration for more panel  groups

* Remove debug call

* Tweak query return data

* async fn

* Adds <PluginPanel> component for handling panel render

* Cleanup

* Prevent API requests before instance ID is known

* Pass instance data through

* Framework for a sample plugin which implements custom panels

* offload custom panels to sample plugin

* Load raw HTML content

* Expand custom panel rendering demo

* Adjust API endpoints

* Add function to clear out static files which do not match installed plugin(s)

* Update static files when installing plugins from file

* Update static files when installing or uninstalling a plugin

* Update static files on config change

* Pass more information through to plugin panels

* Prepend hostname to plugin source

* Pass instance detail through

* Cleanup code for passing data through to plugin panels

- Define interface type
- Shorten variable names

* Update docs requirements

* Revert "Update docs requirements"

This reverts commit 63a06d97f58ae15d837babb799b9ed8b22c3802b.

* Add placeholder for documentation

* Fix imports

* Add a broken panel which tries to load a non-existent javascript file

* Render error message if plugin does not load correctly

* Only allow superuser to perform plugin actions

* Code cleanup

* Add "dynamic" contnt - javascript file - to example plugin

* Remove default values

* Cleanup unused code

* PanelGroup updates

* Cleanup hooks for changing panel state

* More work needed...

* Code cleanup

* More updates / refactoring

- Allow dynamic hiding of a particular panel
- Pass target ref as positional argument
- Better handling of async calls

* Documentation

* Bump API version

* Provide theme object to plugin context

* Adjust sample plugin

* Docs updates

* Fix includefile call in docs

* Improve type annotation

* Cleanup

* Enable plugin panels for "purchasing index" and "sales index" pages

* Fix for plugin query check

* Improvements to panel selection

- Code refactor / cleanup
- Ensure that a valid panel is always displayed
- Allow plugin panels to persist, even after reload

* Playwright test fixes

* Update src/frontend/src/hooks/UsePluginPanels.tsx

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>

* Update src/frontend/src/components/plugins/PluginPanel.tsx

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>

* Update src/frontend/src/components/plugins/PluginContext.tsx

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>

* Fix context

* Add more context data

* Docs updates

* Reimplement local state

* Fix mkdocs.yml

* Expose 'colorScheme' to plugin context

* Define CustomPanel type definition

* Add unit testing for user interface plugins

* Add front-end tests for plugin panels

* Add new setting to plugin_settings_keys

* Adds helper function for annotating build line allocations

* Improve query efficiency

- Especially around unit testing
- Ensure all settings are generated
- Do not auto-create settings during registry load

* Improve query efficiency for build order operations

* Reduce max query count for specific test

* Revert query count limit

* playwright test updates

---------

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
2024-09-16 10:36:27 +10:00
Oliver
7fbc1fba72
[PUI] User settings panel updates (#7944)
* Simplify user theme settings

* Cleanup

* Fix permission on user list endpoint

* Update AccountDetailPanel to use modal form

* Update components

* UI updates

* Implement default colors

* Display more user details (read only)

* Add specific "MeUserSerializer"

- Prevent certain attributes from being adjusted

* Add <YesNoUndefinedButton>

* Allow role checks to be bypassed for a given view

- Override the 'get_permission_model' attribute with None

* Enable 'GET' metadata

- Required for extracting field information even if we only have 'read' permissions
- e.g. getting table columns for users without write perms
- use 'GET' action when reading table cols

* Add info on new user account

* Fix boolean expression wrapper

* Ruff fixes

* Adjust icon

* Update unit test

* Bummp API version

* Table layout fix
2024-09-14 12:30:46 +10:00
Oliver
26d7cd3d48
Prevent creation of setting when calculating plugin hash (#8118) 2024-09-13 08:57:40 +10:00
Matthias Mair
83d2624a45
[PUI] Add view of all defined units to Admin center (#8040)
* Add API endpoint for all defined units
Fixes #7858

* render all units in API

* bump API

* Add display for all units

* remove logging

* fix types

* ignore favicon errors

* fix for new pint version

* add tests

* prove against units that are not defined

* append trailing slash to url

* make pagination disableable again
2024-09-13 08:22:04 +10:00
Oliver
c5e3ea537d
Improve logic for automatically updating part pricing (#8090)
* Improve logic for automatically updating part pricing

* Simplify logic

* Update unit tests to ensure pricing flows upwards

* Unit test update

* Add unit tests for handling of "multi level" BOM pricing

* ADjust unit tests

* Improve efficiency of operation

* Adjust testing for pricing

- Only allow pricing updates in testing if TESTING_PRICING flag is set

* Tweak when pricing updates are performed

* More tweaks
2024-09-11 10:26:38 +10:00
github-actions[bot]
e523bd73af
New Crowdin translations by GitHub Action (#8045)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-11 09:40:50 +10:00
dependabot[bot]
30ab365721
Bump the dependencies group across 2 directories with 13 updates (#8100)
* Bump the dependencies group across 2 directories with 13 updates

Bumps the dependencies group with 1 update in the /src/backend directory: [eslint](https://github.com/eslint/eslint).
Bumps the dependencies group with 12 updates in the /src/frontend directory:

| Package | From | To |
| --- | --- | --- |
| [@sentry/react](https://github.com/getsentry/sentry-javascript) | `8.27.0` | `8.29.0` |
| [@tabler/icons-react](https://github.com/tabler/tabler-icons/tree/HEAD/packages/icons-react) | `3.14.0` | `3.15.0` |
| [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.53.3` | `5.55.4` |
| [@uiw/codemirror-theme-vscode](https://github.com/uiwjs/react-codemirror) | `4.23.0` | `4.23.1` |
| [@uiw/react-codemirror](https://github.com/uiwjs/react-codemirror) | `4.23.0` | `4.23.1` |
| [embla-carousel-react](https://github.com/davidjerleke/embla-carousel) | `8.2.0` | `8.2.1` |
| [mantine-datatable](https://github.com/icflorescu/mantine-datatable) | `7.11.3` | `7.12.4` |
| [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) | `6.26.1` | `6.26.2` |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.46.1` | `1.47.0` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.5.2` | `22.5.4` |
| [typescript](https://github.com/microsoft/TypeScript) | `5.5.4` | `5.6.2` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.4.2` | `5.4.3` |



Updates `eslint` from 9.9.1 to 9.10.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.9.1...v9.10.0)

Updates `@sentry/react` from 8.27.0 to 8.29.0
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/8.27.0...8.29.0)

Updates `@tabler/icons-react` from 3.14.0 to 3.15.0
- [Release notes](https://github.com/tabler/tabler-icons/releases)
- [Commits](https://github.com/tabler/tabler-icons/commits/v3.15.0/packages/icons-react)

Updates `@tanstack/react-query` from 5.53.3 to 5.55.4
- [Release notes](https://github.com/TanStack/query/releases)
- [Commits](https://github.com/TanStack/query/commits/v5.55.4/packages/react-query)

Updates `@uiw/codemirror-theme-vscode` from 4.23.0 to 4.23.1
- [Release notes](https://github.com/uiwjs/react-codemirror/releases)
- [Commits](https://github.com/uiwjs/react-codemirror/compare/v4.23.0...v4.23.1)

Updates `@uiw/react-codemirror` from 4.23.0 to 4.23.1
- [Release notes](https://github.com/uiwjs/react-codemirror/releases)
- [Commits](https://github.com/uiwjs/react-codemirror/compare/v4.23.0...v4.23.1)

Updates `embla-carousel-react` from 8.2.0 to 8.2.1
- [Release notes](https://github.com/davidjerleke/embla-carousel/releases)
- [Commits](https://github.com/davidjerleke/embla-carousel/compare/v8.2.0...v8.2.1)

Updates `mantine-datatable` from 7.11.3 to 7.12.4
- [Changelog](https://github.com/icflorescu/mantine-datatable/blob/main/CHANGELOG.md)
- [Commits](https://github.com/icflorescu/mantine-datatable/commits)

Updates `react-router-dom` from 6.26.1 to 6.26.2
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.26.2/packages/react-router-dom)

Updates `@playwright/test` from 1.46.1 to 1.47.0
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.46.1...v1.47.0)

Updates `@types/node` from 22.5.2 to 22.5.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `typescript` from 5.5.4 to 5.6.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.5.4...v5.6.2)

Updates `vite` from 5.4.2 to 5.4.3
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.3/packages/vite)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@sentry/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@tabler/icons-react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@tanstack/react-query"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@uiw/codemirror-theme-vscode"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@uiw/react-codemirror"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: embla-carousel-react
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: mantine-datatable
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@playwright/test"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

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

* fix argument order

* lower typescript version

* bump more deps

---------

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>
2024-09-10 10:17:19 +10:00
Oliver
07fac28b76
Remove references to old setting (#8018)
* Remove references to old setting

- Now offloaded to plugins

* Remove REPORT_ENABLE_TEST_REPORT setting

* Cleanup

* Add new boolean setting to control whether reports are attached automatically

* Attach generated report to model instance

* Update unit testing

* Bump API version
2024-09-06 15:15:16 +10:00
Oliver
9f92475af0
[PUI] Sales order actions (#8086)
* [PUI] Add placeholder action

- "Allocate Serials" action for sales order
- No functionality yet

* Implement form for allocating by serial numbers

* Improve validation of serial numbers in back-end

* Trim serial number string
2024-09-06 14:33:16 +10:00
Matthias Mair
3d9db2543d
Packager: easier to parse debug messages (#8083)
* Add new version to logging

* Add easier to search logging

* shorten appended string

* make migrations that run on fresh installs easier to read
2024-09-06 07:33:59 +10:00
Oliver
f8c53bc9e5
Fix docstring for uploaded_image (#8077) 2024-09-05 14:47:33 +10:00
Oliver
9b272bd60f
Add option for controlling test result uploads (#8076)
* Fix typo

* Add new setting

* Gate creation of new test result template

* Refactor test result template validation

* Update API unit testing
2024-09-05 14:47:22 +10:00
dependabot[bot]
690308d032
Bump cryptography from 43.0.0 to 43.0.1 in /src/backend (#8064)
* Bump cryptography from 43.0.0 to 43.0.1 in /src/backend

Bumps [cryptography](https://github.com/pyca/cryptography) from 43.0.0 to 43.0.1.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/43.0.0...43.0.1)

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

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

* fix req

* 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>
2024-09-05 09:07:16 +10:00
Oliver
fe36e641c1
Fix for part serializer (#8069)
* Fix for part serializer

- Allow "revision" to accept null values
- Matches internal field

* Bump API version
2024-09-04 20:16:34 +10:00
Matthias Mair
38e7a3f0ab
fix typo (#8050) 2024-09-02 06:28:18 +00:00
Matthias Mair
79affbe609
Add more test coverage for backend (#8048)
* add test for asset redirect

* fully cover spa_bundler

* test token api

* check without beeing authed

* not possible to be reached - no cover

* remove unneeded except

* fully test group apis

* move ignore

* add tests for admin site

* add full admin testing

* use output as ref

* ignore admin edge-case

* test display name settings

* refactor admin test

* add more admin testing

* fix tests assertation

* fix assertations

* add test for importer admin

* remove old test for function that will not be re-added for now
see https://github.com/inventree/InvenTree/pull/8018#discussion_r1734011050

* Add stock detail with wrong pk

* add a few stock tests
2024-09-02 10:13:39 +10:00
github-actions[bot]
f725c38804
New Crowdin translations by GitHub Action (#8022)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-29 20:16:58 +10:00
Oliver
3961e48fe8
Test template fix (#8031)
* Fix restriction for PartTestTemplate

- limit_choices_to should be "testable", not "trackable"
- ref: https://github.com/inventree/InvenTree/pull/7888

* Add migration file

* Fix validation check

* Fix API filter

* Fix for test fixture

* Fix another test

* Fixture data

* Fix comment

* More fixes

* More fixes

* Moar fix plz thx
2024-08-29 17:06:14 +10:00
Oliver
99e37de1d8
Update pint library to latest version (#8028)
* Update pint library to latest version

* Fix hash

* Handle AssertionError
2024-08-29 12:37:38 +10:00
Oliver
9afc6cc6cb
Adjust "render_currency" behaviour (#8017)
* Adjust "render_currency" behaviour

- Fixes https://github.com/inventree/InvenTree/issues/7997

* Update docs
2024-08-29 12:21:38 +10:00
github-actions[bot]
bcaf298ce3
New Crowdin translations by GitHub Action (#8016)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-28 11:11:51 +10:00
Matthias Mair
1634258783
Enable more Ruff rules (#7930)
* bump version

* Add more checks

* add simplify rules

* Add RUF rules

* small perf imrpovements

* pylint checks

* more style fixes

* fix a number of A002 cases

* fix A001 cases

* disable unsafe fixes

* remove unneeded branches
fixes SIM102

* re-enable .keys for specific case

* Revert "remove unneeded branches"

This reverts commit f74d41bc0735dcdc7c499776ab0f68d5c54db58f.

* fix reference
2024-08-27 09:04:55 +10:00
dependabot[bot]
2d9cce87fe
Bump the dependencies group across 2 directories with 15 updates (#8001)
Bumps the dependencies group with 1 update in the /src/backend directory: [eslint](https://github.com/eslint/eslint).
Bumps the dependencies group with 14 updates in the /src/frontend directory:

| Package | From | To |
| --- | --- | --- |
| [@codemirror/view](https://github.com/codemirror/view) | `6.32.0` | `6.33.0` |
| [@emotion/react](https://github.com/emotion-js/emotion) | `11.13.0` | `11.13.3` |
| [@mdxeditor/editor](https://github.com/mdx-editor/editor) | `3.11.0` | `3.11.1` |
| [@tabler/icons-react](https://github.com/tabler/tabler-icons/tree/HEAD/packages/icons-react) | `3.12.0` | `3.13.0` |
| [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.51.24` | `5.52.2` |
| [@vanilla-extract/css](https://github.com/vanilla-extract-css/vanilla-extract/tree/HEAD/packages/css) | `1.15.4` | `1.15.5` |
| [axios](https://github.com/axios/axios) | `1.7.4` | `1.7.5` |
| [dayjs](https://github.com/iamkun/dayjs) | `1.11.12` | `1.11.13` |
| [embla-carousel-react](https://github.com/davidjerleke/embla-carousel) | `8.1.8` | `8.2.0` |
| [react-hook-form](https://github.com/react-hook-form/react-hook-form) | `7.52.2` | `7.53.0` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.4.1` | `22.5.0` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.3.3` | `18.3.4` |
| [@vanilla-extract/vite-plugin](https://github.com/vanilla-extract-css/vanilla-extract/tree/HEAD/packages/vite-plugin) | `4.0.14` | `4.0.15` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.4.1` | `5.4.2` |



Updates `eslint` from 9.9.0 to 9.9.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.9.0...v9.9.1)

Updates `@codemirror/view` from 6.32.0 to 6.33.0
- [Changelog](https://github.com/codemirror/view/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codemirror/view/compare/6.32.0...6.33.0)

Updates `@emotion/react` from 11.13.0 to 11.13.3
- [Release notes](https://github.com/emotion-js/emotion/releases)
- [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emotion-js/emotion/compare/@emotion/react@11.13.0...@emotion/react@11.13.3)

Updates `@mdxeditor/editor` from 3.11.0 to 3.11.1
- [Release notes](https://github.com/mdx-editor/editor/releases)
- [Commits](https://github.com/mdx-editor/editor/compare/v3.11.0...v3.11.1)

Updates `@tabler/icons-react` from 3.12.0 to 3.13.0
- [Release notes](https://github.com/tabler/tabler-icons/releases)
- [Commits](https://github.com/tabler/tabler-icons/commits/v3.13.0/packages/icons-react)

Updates `@tanstack/react-query` from 5.51.24 to 5.52.2
- [Release notes](https://github.com/TanStack/query/releases)
- [Commits](https://github.com/TanStack/query/commits/v5.52.2/packages/react-query)

Updates `@vanilla-extract/css` from 1.15.4 to 1.15.5
- [Release notes](https://github.com/vanilla-extract-css/vanilla-extract/releases)
- [Changelog](https://github.com/vanilla-extract-css/vanilla-extract/blob/master/packages/css/CHANGELOG.md)
- [Commits](https://github.com/vanilla-extract-css/vanilla-extract/commits/@vanilla-extract/css@1.15.5/packages/css)

Updates `axios` from 1.7.4 to 1.7.5
- [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.4...v1.7.5)

Updates `dayjs` from 1.11.12 to 1.11.13
- [Release notes](https://github.com/iamkun/dayjs/releases)
- [Changelog](https://github.com/iamkun/dayjs/blob/v1.11.13/CHANGELOG.md)
- [Commits](https://github.com/iamkun/dayjs/compare/v1.11.12...v1.11.13)

Updates `embla-carousel-react` from 8.1.8 to 8.2.0
- [Release notes](https://github.com/davidjerleke/embla-carousel/releases)
- [Commits](https://github.com/davidjerleke/embla-carousel/compare/v8.1.8...v8.2.0)

Updates `react-hook-form` from 7.52.2 to 7.53.0
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.52.2...v7.53.0)

Updates `@types/node` from 22.4.1 to 22.5.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@types/react` from 18.3.3 to 18.3.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Updates `@vanilla-extract/vite-plugin` from 4.0.14 to 4.0.15
- [Release notes](https://github.com/vanilla-extract-css/vanilla-extract/releases)
- [Changelog](https://github.com/vanilla-extract-css/vanilla-extract/blob/master/packages/vite-plugin/CHANGELOG.md)
- [Commits](https://github.com/vanilla-extract-css/vanilla-extract/commits/@vanilla-extract/vite-plugin@4.0.15/packages/vite-plugin)

Updates `vite` from 5.4.1 to 5.4.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.2/packages/vite)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@codemirror/view"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@emotion/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mdxeditor/editor"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@tabler/icons-react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@tanstack/react-query"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@vanilla-extract/css"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: dayjs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: embla-carousel-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: react-hook-form
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@vanilla-extract/vite-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-27 09:01:55 +10:00
Oliver
eec53ffd82
[PUI] Build actions (#7945)
* add table buttons to build line table

* Add deallocate row action

* Restrict row actions

* Add functionality to 'deallocate' stock from build order

* Implement 'auto-allocate'

* Table column cleanup

* Refactor code into new hook:

- Helper function to update a set of selected rows
- Callback function to remove row

* Refactor existing forms to use new hook

* Fix for RelatedModelField

- Handle callback for null value

* Memoize each field instance

* Cleanup dead code

* Define interfac for TableField row properties

* Handle processing of nested errors

* Pass form controller through to table field rows

* Pass row errors through to individual table rows

* Allow Standalone field to render errors

* Allow allocation against build lines

* Adjust quantity value when stock item is changed

* Fix issue related to field name

* Add "available" filter

* Add "remove row" button

* Add field for selecting source location

* Filter out consumable items

* Adjust form success message
2024-08-24 15:17:05 +10:00
Matthias Mair
ed2da62a46
Fix state changes on stock items (#7976)
* Revert changes from https://github.com/inventree/InvenTree/pull/7965

* Add error handling for wrong key

* Add e2e test case for error condition
Fixes #7964

* Better code code / flow

* [BUG] Order of states in schema descriptions is not stable
Fixes #7977
2024-08-24 09:18:09 +10:00
Matthias Mair
d647471588
Chore: Bump python requirements (#7961)
* bump requirements

* lower bound on pydyf
2024-08-23 23:03:31 +00:00
Matthias Mair
8f4929d754
[BUG] Order of states in schema descriptions is not stable (#7978)
Fixes #7977
2024-08-24 08:28:58 +10:00
Oliver
b9b44126de
Revert status fields for stock items (#7965)
* Revert status fields for stock items

* Fix PUI fields too

* Bump API version
2024-08-23 11:00:20 +10:00
Oliver
ca87df3c3d
[PUI] Test result fixes (#7956)
* Prevent template adjustment

* Prevent template from being edited

* Fix 'attachment' field for StockItemTestResultSerializer

- Allow 'null' value

* Bump API version
2024-08-22 13:50:04 +10:00
Matthias Mair
d5086b2fb1
User defined states (#7862)
* Add custom user defined states

* make tests more reliable

* fix list options

* Adapt version

* do not engage if rebuilding

* remove unneeded attr

* remove unneeded attr

* fix enum imports

* adapt cove target

* Add status_custom_key to all other serializers

* fix serializer method

* simplify branching

* remove unneeded imports

* inherit read_only status from leader field

* Add more tests

* fix tests

* add test for function

* refactor for easier testing

* move test to seperate class

* Add options testing

* extend serializer

* add test for all states and refactor to reuse already build functions

* use custom field in PUI too

* reset diff

* style fix

* fix comparison

* Add test for str

* test color exceptions too

* remove user state from tracking

* Add intro from model fields too

* update docs

* simplify implementation

* update tests

* fix name

* rename test

* simplify tags and test fully

* extend test to machine status

* move logic for response formatting over

* extend api response with machine  status

* ensure only direct subclasses are discovered

* test for length of total respone too

* use new fields on PUI too

* fix test assertion with plugins enabled

* also observe rendering in filters

* Add managment endpoints and APIs

* Add contenttypes to PUI renderes

* use filteres instead

* fix import order

* fix api route definition

* move status choices to serializer

* fix lookup

* fix filtering

* remove admin integration

* cleanup migration

* fix migration change

* cleanup code location

* fix imports

* Add docs for custom states

* add links to custom status
2024-08-22 07:33:15 +10:00
dependabot[bot]
0c63e509d2
Bump djangorestframework from 3.14.0 to 3.15.2 in /src/backend (#7520)
* Bump djangorestframework from 3.14.0 to 3.15.2 in /src/backend

Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.14.0 to 3.15.2.
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](https://github.com/encode/django-rest-framework/compare/3.14.0...3.15.2)

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

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

* fix req

* fix deps again

* patch serializer

* bump api version

* Fix "min_value" for DRF decimal fields

* Add default serializer values for 'IPN' and 'revision'

* Add specific serializer for email field

* Bump API version

* code cleanup

* fix tests

* allow null for email too

* fix formatting

---------

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>
Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
2024-08-21 07:43:56 +00:00
Oliver
8474b7bf4c
[Build] Create child builds (#7941)
* Add "create_child_builds" field to BuildOrder serializer

- only when creating a new order
- write only field

* Update serializer field

* Add placeholder task for creating child build orders

* Add field to PUI forms

* Auto-create build orders as required

* Bump API vresion

* Add documentation

* Update unit tests
2024-08-21 16:31:48 +10:00