Compare commits

...

396 Commits

Author SHA1 Message Date
Oliver
cc45c23915
Fix return type of detail queries (#8038) 2024-08-30 10:38:48 +10:00
Matthias Mair
3951b3f56e
Fix package upgrade process (#8034)
* ensure site_url is preserved

* check if clear-generated is available
2024-08-30 09:06:32 +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
368d59ee55
Prevent editing of attachment file on test result after upload (#8032) 2024-08-29 14:34:34 +10:00
Oliver
3911694342
Allow notifications to be opened in new tab or window (#8030) 2024-08-29 13:25:58 +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
Oliver
99e822213d
Fix "sales_order" filter for buildId (#8024) 2024-08-29 08:15:14 +10:00
Oliver
c096f2f43a
Fix for attachment table (#8021)
- Allow bulk deletion of attachments from PUI
2024-08-28 15:42:15 +10:00
Oliver
93e06a0db5
Update for report / label template tables (#8019)
- Pass through extra information
- Specify column titles
2024-08-28 15:15:51 +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
Oliver
d5e8227782
Change target branch for translation (#8015) 2024-08-28 09:34:37 +10:00
Oliver
7d844e02be
Add extra undefined check for table filters (#8008)
* Add extra undefined check for table filters

* Logic fix..

- Do not return early, this is mistake!
- Correctly handle empty activeFilter state
2024-08-28 09:23:56 +10:00
Matthias Mair
450abcd353
Reduce code duplication for QR code scan (#8004)
* Add Link/Unlink Barcode action
Fixes #7920

* remove unneeded imports

* remove duplication

* simplify

* add testing

* refactor type

* wait for reload to add coverage

* Add warning if custom barcode is used

* Add Image based assign

* fix action button size

* fix selection to prevent wrapping

* use left section for button

* Refactor to seperate Input

* Add comment when not scanning

* Fix punctuation

* factor scan area out

* fix readonly arg

* make BarcodeInput more generic

* make button optional

* reduce code duplication by using BarcodeInput

* remove unneeded abstraction
2024-08-28 08:13:22 +10:00
Matthias Mair
313cb4758e
[PUI] Add image based QR code assigment (#7960)
* Add Link/Unlink Barcode action
Fixes #7920

* remove unneeded imports

* remove duplication

* simplify

* add testing

* refactor type

* wait for reload to add coverage

* Add warning if custom barcode is used

* Add Image based assign

* fix action button size

* fix selection to prevent wrapping

* use left section for button
2024-08-27 17:25:34 +10:00
Oliver
594c15b3e3
Allow edit of build allocations from part context (#8007) 2024-08-27 11:03:38 +10:00
Matthias Mair
820a3522da
fix action pin (#8006) 2024-08-27 10:34:55 +10:00
dependabot[bot]
10103e7d76
Bump mkdocs-material from 9.5.32 to 9.5.33 in /docs in the dependencies group across 1 directory (#8002)
* Bump mkdocs-material

Bumps the dependencies group with 1 update in the /docs directory: [mkdocs-material](https://github.com/squidfunk/mkdocs-material).


Updates `mkdocs-material` from 9.5.32 to 9.5.33
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.32...9.5.33)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

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>
2024-08-27 10:04:24 +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
Matthias Mair
bcbbae0a18
fix translatable string (#7999)
* fix translatable string

* do not translate key
2024-08-27 09:03:12 +10:00
dependabot[bot]
7b750dd04f
Bump github/codeql-action in the dependencies group (#8000)
Bumps the dependencies group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.26.3 to 3.26.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](883d8588e5...2c779ab0d0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  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:02:15 +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
d1c8354859
Reset page offset when changing page size (#7994)
- Prevents table rendering an "empty" page
2024-08-26 15:18:46 +10:00
Oliver
881220cdb3
Hide "build orders" tab for inactive parts (#7992)
- Otherwise results in a 400 error
2024-08-26 09:40:45 +10:00
Oliver
d98c396f07
Update crowdin.yml (#7985)
- Add documentation strings
- Attempt to "fix" dest parameters
2024-08-25 13:17:24 +10:00
Oliver
695174810a
Try adding option (#7984) 2024-08-25 12:39:50 +10:00
Oliver
7e6ca121ec
Add git config for CI (#7983) 2024-08-25 11:54:53 +10:00
Oliver
2cf959cb8d
Forms refactor (#7981)
* Refactor "receive stock" table

- Display errors
- Fix infinite rendering loop
- Correctly set values to undefined on close

* Refactor stock operations table

* Fix for "change stock status" form

* Fix default values

* Unit test fix
2024-08-25 11:04:18 +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
ebb01c5e5b
add path (#7979) 2024-08-24 10:28:09 +10:00
Matthias Mair
8a59829ef1
[PUI] Add currency stats (#7971)
* factor out stats overview

* move to panel

* Add currency stas overview
Closes https://github.com/invenhost/InvenTree/issues/115
2024-08-24 09:21:06 +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
df8efa902e
fix: translation action wrong location (#7975)
* set destination

* cleanup files before submitting
2024-08-24 09:14:38 +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
Matthias Mair
cf9dcf0556
[CI] Switch to using Crowdin GitHub Action (#7929)
Fixes #7910
2024-08-23 09:49:57 +10:00
Matthias Mair
58f60d18b6
Add pagination (#7958) 2024-08-22 17:01:25 +10:00
Oliver
1dff94db75
Table borders (#7957)
* Add 'editable' attribute to table column type

* Add "editable" attribute for useTable hook

* Add column borders to tables
2024-08-22 16:08:41 +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
b0c7a1aed5
[PUI] Add Link/Unlink Barcode action (#7939)
* Add Link/Unlink Barcode action
Fixes #7920

* remove unneeded imports

* remove duplication

* simplify

* add testing

* refactor type

* wait for reload to add coverage

* Add warning if custom barcode is used
2024-08-22 11:01:09 +10:00
Matthias Mair
725181be5f
[PUI] fix missing key in currency table (#7953) 2024-08-22 09:43:27 +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
Oliver
7709d8df70
Bug fix for PurchaseOrderCancelSerializer (#7943)
- Fix duplication of "self.order" property
2024-08-21 15:45:58 +10:00
Oliver
e837e5d7d7
Enhance plugin SN validation (#7942)
* Update function signature for 'validate_serial_number'

- Pass through stock item parameter
- Required if we want to exclude a particular item from that test

* Update documentation

* Docs fixes

* Add type annotations
2024-08-21 15:45:47 +10:00
Oliver
f2f90dd1e4
New Crowdin updates (#7936)
* 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

* 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

* 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 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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-21 13:15:12 +10:00
Oliver
bbd432c03f
Build table fix (#7940)
* Remove sales order filter restriction

* Formalize "ancestor" filter

* Bump API version
2024-08-21 10:24:12 +10:00
Oliver
9239c82113
Required quantity display (#7938)
* Add "required" badge to PUI part detail page

* Add "required for orders" to CUI
2024-08-21 10:00:52 +10:00
Oliver
8c6275b845
Fix parameter formatting (#7934) 2024-08-20 18:20:29 +10:00
Oliver
5515e0762e
New Crowdin updates (#7928)
* 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

* 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 django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-20 13:49:21 +10:00
Oliver
dbe12c2c53
[PUI] Fix for hovering in parameteric part table (#7933)
* Fix for hovering in parameteric part table

- Visual glitches are now gone

* Prevent editing of template field
2024-08-20 13:13:36 +10:00
Oliver
7cbaeb159e
[PUI] Sub builds table (#7932)
* Allow table filters to be marked "inactive"

* Allow build orders to be filtering by 'cascading' parent

* Update build order table

* Bump API version
2024-08-20 11:21:38 +10:00
Oliver
6591286e27
Fix columns for build line table (#7931)
Used incorrect accessor string
2024-08-20 10:01:18 +10:00
dependabot[bot]
0c30f7cc99
Bump the dependencies group with 2 updates (#7925)
Bumps the dependencies group with 2 updates: [docker/build-push-action](https://github.com/docker/build-push-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `docker/build-push-action` from 6.6.1 to 6.7.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](16ebe778df...5cd11c3a4c)

Updates `github/codeql-action` from 3.26.0 to 3.26.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](eb055d739a...883d8588e5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github/codeql-action
  dependency-type: direct:production
  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-20 09:38:02 +10:00
dependabot[bot]
9df388da2f
Bump the dependencies group across 1 directory with 2 updates (#7926)
* Bump the dependencies group across 1 directory with 2 updates

Bumps the dependencies group with 2 updates in the /docs directory: [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin) and [mkdocs-material](https://github.com/squidfunk/mkdocs-material).


Updates `mkdocs-git-revision-date-localized-plugin` from 1.2.6 to 1.2.7
- [Release notes](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/releases)
- [Commits](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/compare/v1.2.6...v1.2.7)

Updates `mkdocs-material` from 9.5.31 to 9.5.32
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.31...9.5.32)

---
updated-dependencies:
- dependency-name: mkdocs-git-revision-date-localized-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

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

* fiw 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-08-20 09:37:50 +10:00
dependabot[bot]
9e481ffb0c
Bump the dependencies group across 1 directory with 9 updates (#7927)
Bumps the dependencies group with 9 updates in the /src/frontend directory:

| Package | From | To |
| --- | --- | --- |
| [@sentry/react](https://github.com/getsentry/sentry-javascript) | `8.25.0` | `8.26.0` |
| [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.51.23` | `5.51.24` |
| [@vanilla-extract/css](https://github.com/vanilla-extract-css/vanilla-extract/tree/HEAD/packages/css) | `1.15.3` | `1.15.4` |
| [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) | `6.26.0` | `6.26.1` |
| [zustand](https://github.com/pmndrs/zustand) | `4.5.4` | `4.5.5` |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.46.0` | `1.46.1` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.2.0` | `22.4.1` |
| [@vanilla-extract/vite-plugin](https://github.com/vanilla-extract-css/vanilla-extract/tree/HEAD/packages/vite-plugin) | `4.0.13` | `4.0.14` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.4.0` | `5.4.1` |



Updates `@sentry/react` from 8.25.0 to 8.26.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.25.0...8.26.0)

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

Updates `@vanilla-extract/css` from 1.15.3 to 1.15.4
- [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.4/packages/css)

Updates `react-router-dom` from 6.26.0 to 6.26.1
- [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.1/packages/react-router-dom)

Updates `zustand` from 4.5.4 to 4.5.5
- [Release notes](https://github.com/pmndrs/zustand/releases)
- [Commits](https://github.com/pmndrs/zustand/compare/v4.5.4...v4.5.5)

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

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

Updates `@vanilla-extract/vite-plugin` from 4.0.13 to 4.0.14
- [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.14/packages/vite-plugin)

Updates `vite` from 5.4.0 to 5.4.1
- [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.1/packages/vite)

---
updated-dependencies:
- dependency-name: "@sentry/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-patch
  dependency-group: dependencies
- dependency-name: "@vanilla-extract/css"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: zustand
  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-patch
  dependency-group: dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  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-20 09:37:36 +10:00
Oliver
a7d9600c3d
[PUI] Refactor "notYetImplemented" (#7913)
* Remove default "not yet implemented" action

- Will force us to manually add "not yet implemented"
- Intended to highlight where we still need to work

* Refactor more components

* Fix for onClick
2024-08-19 21:01:05 +10:00
Oliver
4b140aba8d
Update FUNDING.yml (#7924)
Remove kofi / patreon from funding sources
2024-08-19 20:20:16 +10:00
Oliver
6572e64144
Check length before access (#7923) 2024-08-19 17:12:12 +10:00
Oliver
453dac6d00
[PUI] Order Currency (#7918)
* Fix purchase order currency

* Fix for sales order tables

* Fix return order table
2024-08-19 16:52:46 +10:00
Oliver
d6218b76ff
Improve loading of "details" panel (#7921)
- Remove suspenses
- remove global loading lock
- Improves "responsiveness" feel
2024-08-19 16:33:30 +10:00
Oliver
d7d908b74f
Fix for BOM pricing donut chart (#7917)
- Mantine charts tooltip can't handle '.' character.
2024-08-19 16:33:02 +10:00
Oliver
0ee06ec13e
Show warning for insufficient stock (#7916) 2024-08-19 15:11:55 +10:00
Oliver
9fbaeba2ab
Pass sales order through to sub-builds table (#7915) 2024-08-19 15:11:44 +10:00
Oliver
2e10400d7c
Add more columns to BuildLineTable (#7914) 2024-08-19 14:23:44 +10:00
Oliver
48ee876d79
Add "description" column to <UsedInTable /> (#7912) 2024-08-19 12:25:29 +10:00
Oliver
05e234fc49
Cleanup notification drawer (#7911)
- Add "mark all as read" button
- Fix icons
2024-08-19 10:45:53 +10:00
Matthias Mair
e6765fc7df
[PUI] Add AdminCenter to cmd k (#7908)
* Add API bump

* [PUI] Add AdminCenter to cmd k
Closes https://github.com/invenhost/InvenTree/issues/96

* Revert "Add API bump"

This reverts commit 9135e443a9e4fd162c5f03da3b98caf7b5260e04.
2024-08-19 09:52:49 +10:00
Matthias Mair
286091c1e5
[PUI] Add theme changer to navbar (#7907)
* Add API bump

* [PUI] Add theme setting to navbar
Closes https://github.com/invenhost/InvenTree/issues/106

* Rename to the same as ColorToggle

* Change action text
Co-authored-by: @SchrodingersGat
2024-08-19 09:52:23 +10:00
Matthias Mair
5c9f50b43c
[PUI] Fix broken SKU link (#7909)
* Add API bump

* [PUI] Fix SKU link is broken
Closes https://github.com/invenhost/InvenTree/issues/88

* Revert "Add API bump"

This reverts commit 9135e443a9e4fd162c5f03da3b98caf7b5260e04.
2024-08-19 09:25:36 +10:00
Oliver
ea89a4d629
New Crowdin updates (#7895)
* 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

* 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 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 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

* 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-08-19 09:14:22 +10:00
Matthias Mair
8a0d22d15d
[PUI] Fix user detail save on PUI (#7906)
* fix API for user details

* fix allow_blank

* fix saving user details
2024-08-19 07:57:40 +10:00
Matthias Mair
8bf4ce573f
[PUI] Fix settings intenttation (#7905)
Closes https://github.com/invenhost/InvenTree/issues/104
2024-08-19 07:55:56 +10:00
dependabot[bot]
8a52bd60af
Bump the dependencies group across 2 directories with 3 updates (#7861)
* Bump the dependencies group across 2 directories with 3 updates

Bumps the dependencies group with 1 update in the /contrib/dev_reqs directory: [pyyaml](https://github.com/yaml/pyyaml).
Bumps the dependencies group with 3 updates in the /docs directory: [pyyaml](https://github.com/yaml/pyyaml), [mkdocs-include-markdown-plugin](https://github.com/mondeja/mkdocs-include-markdown-plugin) and [neoteroi-mkdocs](https://github.com/Neoteroi/mkdocs-plugins).


Updates `pyyaml` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/main/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0.1...6.0.2)

Updates `pyyaml` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/main/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0.1...6.0.2)

Updates `mkdocs-include-markdown-plugin` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/mondeja/mkdocs-include-markdown-plugin/releases)
- [Commits](https://github.com/mondeja/mkdocs-include-markdown-plugin/compare/v6.2.1...v6.2.2)

Updates `neoteroi-mkdocs` from 1.0.5 to 1.1.0
- [Release notes](https://github.com/Neoteroi/mkdocs-plugins/releases)
- [Changelog](https://github.com/Neoteroi/mkdocs-plugins/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Neoteroi/mkdocs-plugins/compare/v1.0.5...v1.1.0)

---
updated-dependencies:
- dependency-name: pyyaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: pyyaml
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: mkdocs-include-markdown-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: neoteroi-mkdocs
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

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>
2024-08-19 07:54:26 +10:00
Oliver
7178b95657
Improve "issued by" filter for Build list API (#7900)
* Simplify build order filters

* Improve labels for order filters

* Bump API version
2024-08-16 19:56:43 +10:00
dependabot[bot]
ed2ac0f1da
Bump axios from 1.7.3 to 1.7.4 in /src/frontend (#7901)
Bumps [axios](https://github.com/axios/axios) from 1.7.3 to 1.7.4.
- [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.3...v1.7.4)

---
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>
2024-08-16 19:52:20 +10:00
Oliver
8b44dfbc4e
[PUI] Extra line table (#7889)
* Add generic "extra line item" table

* Add "role" as parameter

* Add placeholder actions

* Fix price rendering

* Add forms to create / edit / delete extra line items

* Tweak type annotation
2024-08-16 15:53:29 +10:00
Oliver
09c4710107
[PUI] Report print timeout (#7899)
* Enable printing actions for part

* Increase default timeout for printing
2024-08-16 15:53:15 +10:00
Oliver
e91d741785
Build output table (#7898)
- Display "allocated items" quantity
2024-08-16 15:53:07 +10:00
Oliver
3880e6f07f
[WIP] Testable parts (#7888)
* Add "testable" field to the Part model

- Default = False
- Determines whether a particular part can have tests defined against it

* Adds data migration to set default 'testable' state

* Update part serializers

* CUI: Update table filters

* PUI: Update tables and filters

* CUI: Update part detail page

* PUI: Update part detail page

* Update CUI

* Update build pages

* Update BuildLine serializer

* Bump API version

* Update docs

* Add 'testable' to fieldset
2024-08-16 14:54:33 +10:00
Oliver
70a52c9385
Update default fonts for docker image (#7881)
* Update default fonts for docker image

Ref: https://github.com/inventree/InvenTree/issues/7737

* Remove extra fonts from Dockerfile
2024-08-14 21:16:07 +10:00
Oliver
f14094c1e1
New Crowdin updates (#7882)
* 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

* 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 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 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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-14 21:15:05 +10:00
Oliver
aed5516334
Update Chinese language support (#7878)
* Rename zh_hant to zh_Hant

* Fix front-end language mappings

* Remove "zh" code (is "zh_Hans")

* Remap backend translations

* Update frontend translation files

* Fix locale spec for front-end

* Update pt_BR for frontend translations

* Fix pt_BR for backend

* Rename es-mx to es_MX
2024-08-14 20:19:06 +10:00
Oliver
8369b4a44a
Fix for usePartFields (#7880) 2024-08-14 20:15:01 +10:00
Oliver
19ca7bffae
[PUI] Edit shortcut (#7870)
* Adds shortcut to edit item on <PageDetail>

* Add hooks for shortcut key

* Add unit tests for edit shortcut
2024-08-14 20:12:51 +10:00
Oliver
e1b0efaa12
Build line assembly filter (#7874)
* Fix typo

* Add "assembly" filter to BuildLine API endpoint

- Add filter for table in PUI

* Bump API version
2024-08-14 16:34:22 +10:00
Oliver
697ab1653a
Check before calling schedule_pricing_update (#7871)
Ref: https://github.com/inventree/InvenTree/pull/7807#issuecomment-2287770192
2024-08-14 14:53:52 +10:00
Oliver
2244f5fb27
Fix usePartFields hook (#7868) 2024-08-14 10:49:36 +10:00
Oliver
b0a864a618
Panel tab click fix (#7867)
* Prevent double-loading of panels

* Remove commented code
2024-08-14 10:19:11 +10:00
Oliver
a37d21856e
[PUI] Build detail IPN (#7865)
* Add "IPN" detail to build order page

* Add "IPN" column to build order table
2024-08-13 15:25:05 +10:00
Oliver
27fba9cd02
[PUI] Search preview enhancements (#7864)
- Observe user settings in search preview
2024-08-13 15:23:05 +10:00
Oliver
831b129711
[Bug] Attachment permissions (#7863)
* Add helper func to check user permission against a given model type

* Validate bulk delete of attachments

- Check permissions against linked model type(s)

* Check permission when creating or editing an attachment instance

* Fix typo

* Fix AttachmentSerializer to allow editing

* Update unit tests accordingly

* Remove unused custom permission classs

* Bump API version
2024-08-13 15:22:48 +10:00
Oliver
d3c7698029
New Crowdin updates (#7855)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.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-08-13 11:29:42 +10:00
dependabot[bot]
3f2e47497c
Bump the dependencies group with 4 updates (#7860)
Bumps the dependencies group with 4 updates: [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer), [docker/build-push-action](https://github.com/docker/build-push-action), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `sigstore/cosign-installer` from 3.5.0 to 3.6.0
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](59acb6260d...4959ce089c)

Updates `docker/build-push-action` from 6.5.0 to 6.6.1
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](5176d81f87...16ebe778df)

Updates `actions/upload-artifact` from 4.3.5 to 4.3.6
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](89ef406dd8...834a144ee9)

Updates `github/codeql-action` from 3.25.15 to 3.26.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](afb54ba388...eb055d739a)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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-13 09:43:07 +10:00
dependabot[bot]
6f396eca07
Bump the dependencies group across 2 directories with 25 updates (#7859)
Bumps the dependencies group with 1 update in the /src/backend directory: [eslint](https://github.com/eslint/eslint).
Bumps the dependencies group with 24 updates in the /src/frontend directory:

| Package | From | To |
| --- | --- | --- |
| [@codemirror/view](https://github.com/codemirror/view) | `6.30.0` | `6.32.0` |
| [@lingui/core](https://github.com/lingui/js-lingui) | `4.11.2` | `4.11.3` |
| [@lingui/react](https://github.com/lingui/js-lingui) | `4.11.2` | `4.11.3` |
| [@mantine/carousel](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/carousel) | `7.12.0` | `7.12.1` |
| [@mantine/charts](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/charts) | `7.12.0` | `7.12.1` |
| [@mantine/core](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/core) | `7.12.0` | `7.12.1` |
| [@mantine/dates](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/dates) | `7.12.0` | `7.12.1` |
| [@mantine/dropzone](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/dropzone) | `7.12.0` | `7.12.1` |
| [@mantine/form](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/form) | `7.12.0` | `7.12.1` |
| [@mantine/hooks](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/hooks) | `7.12.0` | `7.12.1` |
| [@mantine/modals](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/modals) | `7.12.0` | `7.12.1` |
| [@mantine/notifications](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/notifications) | `7.12.0` | `7.12.1` |
| [@mantine/spotlight](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/spotlight) | `7.12.0` | `7.12.1` |
| [@mantine/vanilla-extract](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/vanilla-extract) | `7.12.0` | `7.12.1` |
| [@mdxeditor/editor](https://github.com/mdx-editor/editor) | `3.10.1` | `3.11.0` |
| [@sentry/react](https://github.com/getsentry/sentry-javascript) | `8.23.0` | `8.25.0` |
| [@tabler/icons-react](https://github.com/tabler/tabler-icons/tree/HEAD/packages/icons-react) | `3.11.0` | `3.12.0` |
| [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.51.21` | `5.51.23` |
| [qrcode](https://github.com/soldair/node-qrcode) | `1.5.3` | `1.5.4` |
| [@lingui/cli](https://github.com/lingui/js-lingui) | `4.11.2` | `4.11.3` |
| [@lingui/macro](https://github.com/lingui/js-lingui) | `4.11.2` | `4.11.3` |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.45.3` | `1.46.0` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.1.0` | `22.2.0` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.3.5` | `5.4.0` |



Updates `eslint` from 9.7.0 to 9.9.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.7.0...v9.9.0)

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

Updates `@lingui/core` from 4.11.2 to 4.11.3
- [Release notes](https://github.com/lingui/js-lingui/releases)
- [Changelog](https://github.com/lingui/js-lingui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lingui/js-lingui/compare/v4.11.2...v4.11.3)

Updates `@lingui/react` from 4.11.2 to 4.11.3
- [Release notes](https://github.com/lingui/js-lingui/releases)
- [Changelog](https://github.com/lingui/js-lingui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lingui/js-lingui/compare/v4.11.2...v4.11.3)

Updates `@mantine/carousel` from 7.12.0 to 7.12.1
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.1/packages/@mantine/carousel)

Updates `@mantine/charts` from 7.12.0 to 7.12.1
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.1/packages/@mantine/charts)

Updates `@mantine/core` from 7.12.0 to 7.12.1
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.1/packages/@mantine/core)

Updates `@mantine/dates` from 7.12.0 to 7.12.1
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.1/packages/@mantine/dates)

Updates `@mantine/dropzone` from 7.12.0 to 7.12.1
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.1/packages/@mantine/dropzone)

Updates `@mantine/form` from 7.12.0 to 7.12.1
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.1/packages/@mantine/form)

Updates `@mantine/hooks` from 7.12.0 to 7.12.1
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.1/packages/@mantine/hooks)

Updates `@mantine/modals` from 7.12.0 to 7.12.1
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.1/packages/@mantine/modals)

Updates `@mantine/notifications` from 7.12.0 to 7.12.1
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.1/packages/@mantine/notifications)

Updates `@mantine/spotlight` from 7.12.0 to 7.12.1
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.1/packages/@mantine/spotlight)

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

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

Updates `@sentry/react` from 8.23.0 to 8.25.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.23.0...8.25.0)

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

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

Updates `qrcode` from 1.5.3 to 1.5.4
- [Changelog](https://github.com/soldair/node-qrcode/blob/master/CHANGELOG.md)
- [Commits](https://github.com/soldair/node-qrcode/compare/v1.5.3...v1.5.4)

Updates `@lingui/cli` from 4.11.2 to 4.11.3
- [Release notes](https://github.com/lingui/js-lingui/releases)
- [Changelog](https://github.com/lingui/js-lingui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lingui/js-lingui/compare/v4.11.2...v4.11.3)

Updates `@lingui/macro` from 4.11.2 to 4.11.3
- [Release notes](https://github.com/lingui/js-lingui/releases)
- [Changelog](https://github.com/lingui/js-lingui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lingui/js-lingui/compare/v4.11.2...v4.11.3)

Updates `@playwright/test` from 1.45.3 to 1.46.0
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.45.3...v1.46.0)

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

Updates `vite` from 5.3.5 to 5.4.0
- [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/create-vite@5.4.0/packages/vite)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@codemirror/view"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@lingui/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@lingui/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mantine/carousel"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mantine/charts"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mantine/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mantine/dates"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mantine/dropzone"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mantine/form"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mantine/hooks"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mantine/modals"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mantine/notifications"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mantine/spotlight"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mantine/vanilla-extract"
  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-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-patch
  dependency-group: dependencies
- dependency-name: qrcode
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@lingui/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@lingui/macro"
  dependency-type: direct:development
  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-minor
  dependency-group: dependencies
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
  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-13 09:42:46 +10:00
Matthias Mair
41f6dd69b8
Adjust docker labels to modern OCI schema (#7773)
* adapt namespace

* add new labels

* make baseimage available for labels

* remove unneeded ending

* ensure image name is correct for ghcrio

* ensure the right outputs are used

* fix reference

* fix assigment

* only push docker reg image if authd

* swith back to env

this gets provided by the version ci script

* make repo targets changeable

* make readable

* revert ghcr.io change
2024-08-11 11:03:18 +10:00
dependabot[bot]
6cf56845e2
Bump the dependencies group across 1 directory with 41 updates (#7812)
* Bump the dependencies group across 1 directory with 41 updates

Bumps the dependencies group with 41 updates in the /src/frontend directory:

| Package | From | To |
| --- | --- | --- |
| [@codemirror/autocomplete](https://github.com/codemirror/autocomplete) | `6.16.3` | `6.18.0` |
| [@codemirror/view](https://github.com/codemirror/view) | `6.28.3` | `6.30.0` |
| [@emotion/react](https://github.com/emotion-js/emotion) | `11.11.4` | `11.13.0` |
| [@fortawesome/fontawesome-svg-core](https://github.com/FortAwesome/Font-Awesome) | `6.5.2` | `6.6.0` |
| [@fortawesome/free-regular-svg-icons](https://github.com/FortAwesome/Font-Awesome) | `6.5.2` | `6.6.0` |
| [@fortawesome/free-solid-svg-icons](https://github.com/FortAwesome/Font-Awesome) | `6.5.2` | `6.6.0` |
| [@lingui/core](https://github.com/lingui/js-lingui) | `4.11.1` | `4.11.2` |
| [@lingui/react](https://github.com/lingui/js-lingui) | `4.11.1` | `4.11.2` |
| [@mantine/carousel](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/carousel) | `7.11.0` | `7.12.0` |
| [@mantine/charts](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/charts) | `7.11.0` | `7.12.0` |
| [@mantine/core](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/core) | `7.11.0` | `7.12.0` |
| [@mantine/dates](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/dates) | `7.11.0` | `7.12.0` |
| [@mantine/dropzone](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/dropzone) | `7.11.0` | `7.12.0` |
| [@mantine/form](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/form) | `7.11.0` | `7.12.0` |
| [@mantine/hooks](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/hooks) | `7.11.0` | `7.12.0` |
| [@mantine/modals](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/modals) | `7.11.0` | `7.12.0` |
| [@mantine/notifications](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/notifications) | `7.11.0` | `7.12.0` |
| [@mantine/spotlight](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/spotlight) | `7.11.0` | `7.12.0` |
| [@mantine/vanilla-extract](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/vanilla-extract) | `7.11.0` | `7.12.0` |
| [@mdxeditor/editor](https://github.com/mdx-editor/editor) | `3.6.1` | `3.10.1` |
| [@sentry/react](https://github.com/getsentry/sentry-javascript) | `8.13.0` | `8.23.0` |
| [@tabler/icons-react](https://github.com/tabler/tabler-icons/tree/HEAD/packages/icons-react) | `3.7.0` | `3.11.0` |
| [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.49.2` | `5.51.21` |
| [@uiw/codemirror-theme-vscode](https://github.com/uiwjs/react-codemirror) | `4.22.2` | `4.23.0` |
| [@uiw/react-codemirror](https://github.com/uiwjs/react-codemirror) | `4.22.2` | `4.23.0` |
| [axios](https://github.com/axios/axios) | `1.7.2` | `1.7.3` |
| [dayjs](https://github.com/iamkun/dayjs) | `1.11.11` | `1.11.12` |
| [embla-carousel-react](https://github.com/davidjerleke/embla-carousel) | `8.1.6` | `8.1.8` |
| [mantine-datatable](https://github.com/icflorescu/mantine-datatable) | `7.11.2` | `7.11.3` |
| [react-hook-form](https://github.com/react-hook-form/react-hook-form) | `7.51.5` | `7.52.2` |
| [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) | `6.24.0` | `6.26.0` |
| [styled-components](https://github.com/styled-components/styled-components) | `6.1.11` | `6.1.12` |
| [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.24.7` | `7.25.2` |
| [@lingui/cli](https://github.com/lingui/js-lingui) | `4.11.1` | `4.11.2` |
| [@lingui/macro](https://github.com/lingui/js-lingui) | `4.11.1` | `4.11.2` |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.45.0` | `1.45.3` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.14.9` | `22.1.0` |
| [@vanilla-extract/vite-plugin](https://github.com/vanilla-extract-css/vanilla-extract/tree/HEAD/packages/vite-plugin) | `4.0.12` | `4.0.13` |
| [rollup-plugin-license](https://github.com/mjeanroy/rollup-plugin-license) | `3.5.1` | `3.5.2` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.5.2` | `5.5.4` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.3.2` | `5.3.5` |



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

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

Updates `@emotion/react` from 11.11.4 to 11.13.0
- [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.11.4...@emotion/react@11.13.0)

Updates `@fortawesome/fontawesome-svg-core` from 6.5.2 to 6.6.0
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.5.2...6.6.0)

Updates `@fortawesome/free-regular-svg-icons` from 6.5.2 to 6.6.0
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.5.2...6.6.0)

Updates `@fortawesome/free-solid-svg-icons` from 6.5.2 to 6.6.0
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.5.2...6.6.0)

Updates `@lingui/core` from 4.11.1 to 4.11.2
- [Release notes](https://github.com/lingui/js-lingui/releases)
- [Changelog](https://github.com/lingui/js-lingui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lingui/js-lingui/compare/v4.11.1...v4.11.2)

Updates `@lingui/react` from 4.11.1 to 4.11.2
- [Release notes](https://github.com/lingui/js-lingui/releases)
- [Changelog](https://github.com/lingui/js-lingui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lingui/js-lingui/compare/v4.11.1...v4.11.2)

Updates `@mantine/carousel` from 7.11.0 to 7.12.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.0/packages/@mantine/carousel)

Updates `@mantine/charts` from 7.11.0 to 7.12.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.0/packages/@mantine/charts)

Updates `@mantine/core` from 7.11.0 to 7.12.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.0/packages/@mantine/core)

Updates `@mantine/dates` from 7.11.0 to 7.12.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.0/packages/@mantine/dates)

Updates `@mantine/dropzone` from 7.11.0 to 7.12.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.0/packages/@mantine/dropzone)

Updates `@mantine/form` from 7.11.0 to 7.12.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.0/packages/@mantine/form)

Updates `@mantine/hooks` from 7.11.0 to 7.12.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.0/packages/@mantine/hooks)

Updates `@mantine/modals` from 7.11.0 to 7.12.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.0/packages/@mantine/modals)

Updates `@mantine/notifications` from 7.11.0 to 7.12.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.0/packages/@mantine/notifications)

Updates `@mantine/spotlight` from 7.11.0 to 7.12.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.12.0/packages/@mantine/spotlight)

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

Updates `@mdxeditor/editor` from 3.6.1 to 3.10.1
- [Release notes](https://github.com/mdx-editor/editor/releases)
- [Commits](https://github.com/mdx-editor/editor/compare/v3.6.1...v3.10.1)

Updates `@sentry/react` from 8.13.0 to 8.23.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.13.0...8.23.0)

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

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

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

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

Updates `axios` from 1.7.2 to 1.7.3
- [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.2...v1.7.3)

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

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

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

Updates `react-hook-form` from 7.51.5 to 7.52.2
- [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.51.5...v7.52.2)

Updates `react-router-dom` from 6.24.0 to 6.26.0
- [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.0/packages/react-router-dom)

Updates `styled-components` from 6.1.11 to 6.1.12
- [Release notes](https://github.com/styled-components/styled-components/releases)
- [Commits](https://github.com/styled-components/styled-components/compare/v6.1.11...v6.1.12)

Updates `@babel/core` from 7.24.7 to 7.25.2
- [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.25.2/packages/babel-core)

Updates `@lingui/cli` from 4.11.1 to 4.11.2
- [Release notes](https://github.com/lingui/js-lingui/releases)
- [Changelog](https://github.com/lingui/js-lingui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lingui/js-lingui/compare/v4.11.1...v4.11.2)

Updates `@lingui/macro` from 4.11.1 to 4.11.2
- [Release notes](https://github.com/lingui/js-lingui/releases)
- [Changelog](https://github.com/lingui/js-lingui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lingui/js-lingui/compare/v4.11.1...v4.11.2)

Updates `@playwright/test` from 1.45.0 to 1.45.3
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.45.0...v1.45.3)

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

Updates `@vanilla-extract/vite-plugin` from 4.0.12 to 4.0.13
- [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.13/packages/vite-plugin)

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

Updates `typescript` from 5.5.2 to 5.5.4
- [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.2...v5.5.4)

Updates `vite` from 5.3.2 to 5.3.5
- [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.3.5/packages/vite)

---
updated-dependencies:
- dependency-name: "@codemirror/autocomplete"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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-minor
  dependency-group: dependencies
- dependency-name: "@fortawesome/fontawesome-svg-core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@fortawesome/free-regular-svg-icons"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@fortawesome/free-solid-svg-icons"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@lingui/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@lingui/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@mantine/carousel"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/charts"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/dates"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/dropzone"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/form"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/hooks"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/modals"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/notifications"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/spotlight"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/vanilla-extract"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mdxeditor/editor"
  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-minor
  dependency-group: dependencies
- dependency-name: "@uiw/react-codemirror"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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-patch
  dependency-group: dependencies
- dependency-name: mantine-datatable
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: react-hook-form
  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-minor
  dependency-group: dependencies
- dependency-name: styled-components
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@lingui/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@lingui/macro"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  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-major
  dependency-group: dependencies
- dependency-name: "@vanilla-extract/vite-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: rollup-plugin-license
  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-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>

* Fix playwright tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
2024-08-10 18:13:06 +10:00
Oliver
e6873d2871
New Crowdin updates (#7841)
* 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

* 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 django.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 django.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-08-10 15:16:10 +10:00
Oliver
7a97ecfc3d
[PUI] Placeholder panels (#7850)
* Remove unused import

* Add "homepage" settings for user

Note: These will be replaced with "dashboard" settings in the future
2024-08-10 11:55:47 +10:00
Oliver
42183a3a3f
Build order rules (#7842)
* Add new global setting

* Check if there are open children before completing a build

* Adds management command to export settings definition

* Fix settings export

* Extract settings data into documentation

* Add global settings spec

* User settings

* Revert strict mode

* Tweak unit test

* Remove unreachable code

* Always export settings first

* Remove unused macro

* Remove old images

* Re-add missing docs strings

* Tweak docs

* Remove unused import
2024-08-10 09:26:03 +10:00
Oliver
556a3161e8
[PUI] Part po table (#7844)
* Implement table for part purchase orders

* Add filters

* Improve table

* Adjust PO actions based on status

* Bump API version
2024-08-10 09:19:32 +10:00
dependabot[bot]
3733e8a417
Bump the dependencies group across 1 directory with 5 updates (#7811)
Bumps the dependencies group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.5.0` | `3.6.1` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.3.4` | `4.3.5` |
| [oasdiff/oasdiff-action](https://github.com/oasdiff/oasdiff-action) | `205ce7e2c5ae1511e720cbd307cae79fd7d4a909` | `a2ff6682b27d175162a74c09ace8771bd3d512f8` |
| [ossf/scorecard-action](https://github.com/ossf/scorecard-action) | `2.3.3` | `2.4.0` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.25.13` | `3.25.15` |



Updates `docker/setup-buildx-action` from 3.5.0 to 3.6.1
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](aa33708b10...988b5a0280)

Updates `actions/upload-artifact` from 4.3.4 to 4.3.5
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](0b2256b8c0...89ef406dd8)

Updates `oasdiff/oasdiff-action` from 205ce7e2c5ae1511e720cbd307cae79fd7d4a909 to a2ff6682b27d175162a74c09ace8771bd3d512f8
- [Release notes](https://github.com/oasdiff/oasdiff-action/releases)
- [Commits](205ce7e2c5...a2ff6682b2)

Updates `ossf/scorecard-action` from 2.3.3 to 2.4.0
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](dc50aa9510...62b2cac7ed)

Updates `github/codeql-action` from 3.25.13 to 3.25.15
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2d790406f5...afb54ba388)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: oasdiff/oasdiff-action
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github/codeql-action
  dependency-type: direct:production
  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>
Co-authored-by: Matthias Mair <code@mjmair.com>
2024-08-10 08:13:43 +10:00
Matthias Mair
8eea8812e4
Add more liniting rules (mostly for imports) (#7846)
* remove unused imports

* enable pyflake checks

* various fixes

* fix assert
2024-08-10 08:12:58 +10:00
Oliver
d68d52ba88
[PUI] Tweaks (#7843)
* Part test template table updates

* Allow export from part test template table

* Allow actions for build lines

* Updates to BuildLine table
2024-08-09 18:24:19 +10:00
Oliver
21f623eea8
[PUI] Sales order actions (#7837)
* Create build order from sales order table

* Allow creation of child build order from build page

* Add production and purcahse order quantitres to sales order item serializer

* Bump API version

* Fix playwright test
2024-08-08 20:01:56 +10:00
dependabot[bot]
a5564090bb
Bump django from 4.2.14 to 4.2.15 in /src/backend (#7827)
* Bump django from 4.2.14 to 4.2.15 in /src/backend

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

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

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

* fix formatting

* bump everywhere

---------

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-08-08 17:17:51 +10:00
Oliver
90a918e6d2
[PUI] Allocation Tables (#7836)
* Skeleton panel and placeholder tables

* Implement build order allocation table

* Refactor and repurpose existing table

* Add allocations table to stock item page

* Skeleton for <SalesOrderAllocationTable />

* Implement sales order allocation table(s)
2024-08-08 15:43:11 +10:00
Oliver
dce6cf6b01
[PUI] Admin tables (#7835)
* Check user permission for tables

* Update permissions for user table

* Fix permission checks for group table

* Permission check for group detail

* Add divider

* Fix permission for template tables
2024-08-08 12:16:36 +10:00
Oliver
09bc06108c
[PUI] Active user filter (#7833)
* Fix status label renderer colors

* Add "active" filters to forms

* Fix "is_active" filter

* Limit filters to active users / owners
2024-08-08 11:19:55 +10:00
Oliver
5d64279e1e
New Crowdin updates (#7828)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.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-08-08 11:19:24 +10:00
dependabot[bot]
f236e01cc3
Bump mkdocs-material from 9.5.30 to 9.5.31 in /docs in the dependencies group across 1 directory (#7813)
* Bump mkdocs-material

Bumps the dependencies group with 1 update in the /docs directory: [mkdocs-material](https://github.com/squidfunk/mkdocs-material).


Updates `mkdocs-material` from 9.5.30 to 9.5.31
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.30...9.5.31)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

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

* fix format

---------

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 <oliver.henry.walters@gmail.com>
2024-08-08 11:18:54 +10:00
Oliver
e0a878467b
Update docs around demo accounts (#7832) 2024-08-08 09:42:58 +10:00
Oliver
1d19196632
Metadata api fix (#7829)
* Fix for plugin metadata view

* Add simple unit test

* Bump API version
2024-08-08 09:27:10 +10:00
Oliver
5a98d1e239
[PUI] Make filter choice drop-down searchable (#7830) 2024-08-08 09:27:00 +10:00
Oliver
0e8c2973b2
Adds "ON HOLD" status to order models (#7807)
* Add "ON_HOLD" status code for orders

* Add placeholder buttons for purchase order status change

* Adds hooks for introspecting status code enumerations

* Refactor status codes for import session

- Remove hard-coded values

* Refactor into <PrimaryActionButton />

* Cleanup

* more permission checks

* Add placeholder actions for SalesOrder

* Placeholder actions for ReturnOrder

* Placeholder actions for build order

* Actions for "return order"

* Update actions for return order

- Add "on hold" transition

* Implement transitions for SalesOrder

* Allow control over SalesOrderLineItemTable

* Implement PurchaseOrder actions

* Improve API query lookup efficiency

* UI cleanup

* CUI cleanup

* Build Order Updates

- Implement StateTransitionMixin for BuildOrder model
- Add BuildIssue API endpoint
- Add BuildHold API endpoint
- API query improvements
- PUI actions

* Increase timeout

* Bump API version

* Fix API version

* Fix sales order actions

* Update src/backend/InvenTree/order/serializers.py

Co-authored-by: Matthias Mair <code@mjmair.com>

* Adjust build filters

* PUI updates

* CUI refactoring for purchase orders

* Refactor CUI sales order page

* Refactor for return order

* Refactor CUI build page

* Playwright tests for build order

* Add playwright test for sales orders

* Add playwright test for purchase orders

* js linting

* Refactor return order page

* Add missing functions from previous commit

* Fix for "on order" badge on PartDetail page

* UI tweaks

* Fix unit tests

* Update version check script

* Fix typo

* Enforce integer conversion for BaseEnum class

* Unit test updates

- Includes improvement for equality comparison for enums

* Update documentation

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-08-07 20:34:54 +10:00
Oliver
25f162f4b2
Update version to 0.17.0 dev (#7820) 2024-08-07 11:11:11 +10:00
Oliver
6937b3a268
[PUI] Fix for part detail display (#7809)
- Template display was incorrect
2024-08-05 11:55:08 +10:00
dependabot[bot]
5144b7733a
Bump the dependencies group across 2 directories with 7 updates (#7769)
* Bump the dependencies group across 2 directories with 7 updates

Bumps the dependencies group with 2 updates in the /contrib/dev_reqs directory: [jc](https://github.com/kellyjonbrazil/jc) and [requests](https://github.com/psf/requests).
Bumps the dependencies group with 6 updates in the /docs directory:

| Package | From | To |
| --- | --- | --- |
| [requests](https://github.com/psf/requests) | `2.32.2` | `2.32.3` |
| [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin) | `1.2.5` | `1.2.6` |
| [mkdocs-include-markdown-plugin](https://github.com/mondeja/mkdocs-include-markdown-plugin) | `6.0.6` | `6.2.1` |
| [mkdocs-material](https://github.com/squidfunk/mkdocs-material) | `9.5.24` | `9.5.30` |
| [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) | `0.25.1` | `0.25.2` |
| [regex](https://github.com/mrabarnett/mrab-regex) | `2024.5.15` | `2024.7.24` |



Updates `jc` from 1.25.2 to 1.25.3
- [Release notes](https://github.com/kellyjonbrazil/jc/releases)
- [Changelog](https://github.com/kellyjonbrazil/jc/blob/master/CHANGELOG)
- [Commits](https://github.com/kellyjonbrazil/jc/compare/v1.25.2...v1.25.3)

Updates `requests` from 2.32.2 to 2.32.3
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.2...v2.32.3)

Updates `requests` from 2.32.2 to 2.32.3
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.2...v2.32.3)

Updates `mkdocs-git-revision-date-localized-plugin` from 1.2.5 to 1.2.6
- [Release notes](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/releases)
- [Commits](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/compare/v1.2.5...v1.2.6)

Updates `mkdocs-include-markdown-plugin` from 6.0.6 to 6.2.1
- [Release notes](https://github.com/mondeja/mkdocs-include-markdown-plugin/releases)
- [Commits](https://github.com/mondeja/mkdocs-include-markdown-plugin/compare/v6.0.6...v6.2.1)

Updates `mkdocs-material` from 9.5.24 to 9.5.30
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.24...9.5.30)

Updates `mkdocstrings[python]` from 0.25.1 to 0.25.2
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.25.1...0.25.2)

Updates `regex` from 2024.5.15 to 2024.7.24
- [Changelog](https://github.com/mrabarnett/mrab-regex/blob/hg/changelog.txt)
- [Commits](https://github.com/mrabarnett/mrab-regex/compare/2024.5.15...2024.7.24)

---
updated-dependencies:
- dependency-name: jc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: requests
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: requests
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: mkdocs-git-revision-date-localized-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: mkdocs-include-markdown-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: mkdocstrings[python]
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: regex
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

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>
2024-08-04 11:18:57 +10:00
Niclas Hedhman
463e81d88c
Note about the wrong invoke being called. (#7801) 2024-08-03 21:54:25 +00:00
Matthias Mair
3e5b1a012b
fix repo caps (#7800)
fixes error introduced in https://github.com/inventree/InvenTree/pull/7785
2024-08-03 21:44:19 +10:00
Oliver
abe9b19ead
[PUI] Sales order tables (#7793)
* Add placeholder for more sales order actions

* Add <SalesOrderShipmentTable />

* Allow filtering by date fields

* Add <ReturnOrderLineItemTable />

- Add label rendering for ReturnOrderLineItem

* Add placeholder actions

* Edit / delete / add line items for return order

* Fix for duplicate action

* Cleanup unused code

* Bump API version

* Update playwright tests
2024-08-03 18:49:09 +10:00
Oliver
dee519e848
[API] Improvements for API endpoints (#7794)
* Build allocation API updates

- Improve API query efficiency
- Add extra export fields to the BuildItemSerializer

* Remove commented code

* Improve query efficiency for BuildLine serializer

* Further improvements

* Improve StockList API endpoint

- Reduce from ~700ms to ~300ms with 250 results

* Improve query efficiency when fetching part parameter data

* Bump API version
2024-08-03 16:13:38 +10:00
Oliver
85fc709fc7
Fix permission checks for bulk delete actions (#7796) 2024-08-03 16:13:28 +10:00
Oliver
6fd5a9941b
Fix for holdoff threshold checks (#7795)
- Don't use the "day" portion of date?
2024-08-02 21:16:05 +10:00
Matthias Mair
6f67fb2c9a
Make versions_check more reliable in forks (#7785)
* discover repo
only run in GH actions
use discovered api
this is usefull for GHES enviroments
style fixes

* Fix wrong env name
2024-08-02 19:57:23 +10:00
Lukas
32db71cabb
Make Tree Path searchable (#7786)
* make tree searchable by pathstring

* fix related model field colors in dark mode

* remove unused import

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-08-02 12:17:34 +10:00
Oliver
66d1c77d19
Migration cleanup (#7792)
* Add new "ON_HOLD" status code to order models

* Update legacy migration for build status

- Pin it to the "live" build status codes

* Fix legacy migrations for order status codes

* Revert "ON_HOLD" status codes

- Just limiting this PR to cleanup
2024-08-02 12:17:00 +10:00
Oliver
964096aedf
New Crowdin updates (#7788)
* 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

* 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-08-02 11:17:47 +10:00
Matthias Mair
dcc351be11
Add provenance to releases and publish SBOMs (#7784)
* Add more names

* split build and publish

* add attestation and SBOM

* format file

* Add toplevel permissions

* fix missing path

* move provenance down

* fix release workflow

* simplify steps
2024-08-02 10:54:19 +10:00
Lavissa
2cb8f4128e
Add limit to default location annotation (#7771)
* Add limit to default location annotation

Limits the number of results from the default_location filter to 1

* Add unit test to verify annotation functionality
2024-08-02 09:15:57 +10:00
Oliver
e5fabc6788
[PUI] Table Updates (#7783)
* Refactor part display in tables

- Remove legacy code

* Remove unused function

* Refactoring for PurchaseOrderLineItemTable

* Implement sales order line item table

* Add placeholders for row actions

* Implement table actions

* Add placeholder action to allocate stock
2024-08-02 09:13:50 +10:00
Oliver
21511c74ff
[PUI] Update template tables (#7781)
- Allow template files to be downloaded
2024-08-01 15:44:26 +10:00
Oliver
8708028bcc
Improve row click handling for tables (#7779)
- Prevent clicks around "actions" icon from navigating away from table
2024-08-01 15:44:17 +10:00
Oliver
97bef77d56
[PUI] Build test results (#7777)
* Skeleton for "test results" panel on build detail page

* Generate table columns based on test templates

* Fill out test result table in build panel

* Fix for form submission with files attached

- Better determination of "hasFiles"
- Ignore undefined values

* Add modal form to create a new test result

* Add button for creating a new test result

* Fix for build output table

* Add extra API filtering options to BuildLine API endpoint

* Improve table rendering

* Adjust form fields

* Account for multiple test results

* Add "location" column

* Docs updates

* playwright tests
2024-08-01 14:58:26 +10:00
Miklós Márton
3cbfcc11cb
Added test statistics (#7164)
* Added test statistics

Fixed #5995

* Bump API version

* Fix javascript varible scopes

* Fix javascript exports

* Remove duplicated import

* Add files modified by the pre-commit scripts

* Move test statistics API urls to a separate endpoint

* Merge test-statistics urls

* Undo unrelated changes

* Formatting fix

* Fix API urls for test statistics in PUI

* Fix prefixing in test statistic functions

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-07-31 16:23:00 +10:00
Oliver
fdd9b7c77b
Fix permissions for importing data (#7776) 2024-07-31 15:49:30 +10:00
Oliver
efda47d2cd
Add extra fields to BOM export (#7775)
* Add extra fields to BOM export

* Bump API version
2024-07-31 15:49:21 +10:00
Oliver
f7323d1e50
[PUI] Bug fix for API forms (#7758)
* [PUI] Bug fix for API forms

- Ensure that "blank" data does not get overriden with previous fields
- Better logic for form data fetching

* Playwright test fixes
2024-07-31 15:49:11 +10:00
Matthias Mair
c8870c4ade
Pin OAS action (#7767) 2024-07-31 00:33:39 +10:00
Matthias Mair
3e5972e918
fix style issue (#7768) 2024-07-31 00:33:21 +10:00
Josip Medved
c33e91a42b
Removed obsoleted version element from docker-compose examples (#7760) 2024-07-30 21:12:02 +10:00
Matthias Mair
930356f32b
Add option to disable MFA (#7757)
* Add changes from https://github.com/inventree/InvenTree/pull/7747

* disable addition of factors

* rename variable
2024-07-30 20:56:47 +10:00
Matthias Mair
6c089d3869
fix path to CI dependencies (#7755) 2024-07-30 20:53:02 +10:00
Lukas
648cb12b5c
Plugin static files (#7763)
* add plugin_static template tag

* don't load plugins for collectstatic anymore as they are now collected seperatly

* fix clear plugin staic files bug with nested folder path
2024-07-30 20:51:27 +10:00
Lukas
e3ccd3a682
Add how to install custom packages to the docker image section (#7752) 2024-07-30 20:31:16 +10:00
Matthias Mair
413cc0ce20
Add detection of curroent commit / branch (#7745)
this ensures runs are reproducible/replacable and doc contents stay up
2024-07-30 12:28:36 +10:00
Matthias Mair
06a95f944e
update ruff settings to new preference (#7756) 2024-07-30 12:27:55 +10:00
Oliver
637a7fee9d
New Crowdin updates (#7708)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.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

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.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

* 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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-27 20:39:52 +10:00
Oliver
f92d734d80
[PUI] Add more barcode actions (#7741)
- Add to ReturnOrder
- Add to SalesOrder
- Refactor for BuildOrder
2024-07-26 15:28:44 +10:00
mredpath2
86fb9f0a8c
Add substitute details to BOM export (#7563)
* Included substitute IPN to BOM export

* Added Part Revision to BOM export

* removed trailing whitespace

* Update test_bom_export.py

Added Part Revision to test

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-07-26 10:27:53 +10:00
Matthias Mair
49a0f871d6
Disable blank issues (#7732) 2024-07-26 10:26:51 +10:00
Lukas
43656d66d9
try to fix tests (#7730)
* debug migration

* update django-test-migration

* update django-test-migration

* Revert debug changes to test_migrations.py

* trigger: ci
2024-07-26 10:21:09 +10:00
Matthias Mair
4edea65e00
Make libffi version more flexible (#7734)
* Make libffi version more flexible
Can not install on debian 12
Fixes #6036

* target v11 packaging on v12 install
we are only targeting one version per debian / ubuntu channel. This should not present a problem
2024-07-25 21:55:49 +10:00
dependabot[bot]
b10a20d1ef
Bump the dependencies group with 5 updates (#7712)
Bumps the dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3.1.0` | `3.2.0` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.4.0` | `3.5.0` |
| [docker/login-action](https://github.com/docker/login-action) | `3.2.0` | `3.3.0` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `6.4.0` | `6.5.0` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.25.12` | `3.25.13` |


Updates `docker/setup-qemu-action` from 3.1.0 to 3.2.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](5927c834f5...49b3bc8e6b)

Updates `docker/setup-buildx-action` from 3.4.0 to 3.5.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](4fd812986e...aa33708b10)

Updates `docker/login-action` from 3.2.0 to 3.3.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](0d4c9c5ea7...9780b0c442)

Updates `docker/build-push-action` from 6.4.0 to 6.5.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](a254f8ca60...5176d81f87)

Updates `github/codeql-action` from 3.25.12 to 3.25.13
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4fa2a79536...2d790406f5)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github/codeql-action
  dependency-type: direct:production
  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-07-24 14:09:36 +10:00
dependabot[bot]
3599a04cbf
Bump eslint from 9.5.0 to 9.7.0 in /src/backend (#7710)
Bumps [eslint](https://github.com/eslint/eslint) from 9.5.0 to 9.7.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.5.0...v9.7.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-24 14:09:14 +10:00
Lukas
96abd0898c
Migrate Icons to Tabler icons and integrate into PUI (#7684)
* add icon backend implementation

* implement pui icon picker

* integrate icons in PUI

* Bump API version

* PUI: add icon to detail pages top header

* CUI: explain icon format and change link to tabler icons site

* CUI: use new icon packs

* move default icon implementation to backend

* add icon template tag to use in report printing

* add missing migrations

* fit to previous schema with part category icon

* fit to previous schema with part category icon

* add icon pack plugin integration

* Add custom command to migrate icons

* add docs

* fix: tests

* fix: tests

* add tests

* fix: tests

* fix: tests

* fix: tests

* fix tests

* fix sonarcloud issues

* add logging

* remove unneded pass

* significantly improve performance of icon picker component
2024-07-24 12:36:02 +10:00
Oliver
d5afc37264
Revert postgres version to 13 (#7717)
* Adjust playwright test

* Update docker compose for devcontainer

* Revert docker container changes

* Update notes

* Revert base alpine version
2024-07-24 11:02:25 +10:00
Matthias Mair
d46ed4af6f
[FR] Add Tokens to PUI (#7693)
* [FR] Add Tokens to PUI
Fixes #6500

* fix name / call pattern

* cleanup

* add "revoke" action

* Lock currently used token

* Update serializers.py

* bump api version
2024-07-22 20:25:45 +10:00
Oliver
69298c365a
Fix tooltip location for panel icon (#7703) 2024-07-22 14:46:41 +10:00
Oliver
01fe26e15f
[PUI] Remember state of table sorting (#7702)
- Remember table ordering information
2024-07-22 13:27:16 +10:00
Matthias Mair
ffd55cf164
[PUI] Add permissions to groups (#7621)
* Add permissions to group API

* factor out permission formatting

* add group permission details to UI

* add nicer accordions with permissions

* add group to models

* Add Admin button to change permissions

* add missing instance renderer

* turn off default view permission to everything

* add  migration

* fix rule assigment

* Add now missing view permissions

* Adjust test for the now new default permission count

* add missing view permission

* fix permissions for search test

* adjust search testing to also account for missing permissions

* adjust to new defaults

* expand role testing

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-07-22 13:21:59 +10:00
Lukas
16e535f45f
Add barcode generation capabilities to plugins (#7648)
* initial implementation of barcode generation using plugins

* implement short QR code scanning

* add PUI qrcode preview

* use barcode generation for CUI show barcode modal

* remove short qr prefix validators and fix short qr detection regex

* catch errors if model with pk is not found for scanning and generating

* improve qrcode templatetag

* fix comments

* fix for python 3.9

* add tests

* fix: tests

* add docs

* fix: tests

* bump api version

* add docs to BarcodeMixin

* fix: test

* added suggestions from code review

* fix: tests

* Add MinLengthValidator to short barcode prefix setting

* fix: tests?

* trigger: ci

* try custom cache

* try custom cache ignore all falsy

* remove debugging

* Revert "Add MinLengthValidator to short barcode prefix setting"

This reverts commit 76043ed96b1700ae50f9cfda7997629efa8d97e2.

* Revert "fix: tests"

This reverts commit 3a2d46ff720c35b51e21aedaa22357d71bd120e1.
2024-07-22 11:52:45 +10:00
Matthias Mair
0f6551d70f
cI: Test color theme again (#7700)
* Adjust caching key to be numeric for user

* Add strong usermodel to colortheme

* switch to using user model everywhere for colortheme

* re-enable ColorTheme tests

* fix call

* remove old migratin

* fix directory discovery
2024-07-22 09:53:16 +10:00
Matthias Mair
0effb44402
Bump docker image alpine base from 3.18 to 3.20 (#7699)
* bump docker image from 3.18 to 3.20

* bump postgres from 13 to 14
2024-07-22 07:46:41 +10:00
Matthias Mair
77693c18a1
bump node to 20 (#7698) 2024-07-22 07:44:42 +10:00
Oliver
afad866d1d
[PUI] form error fix (#7689)
* Make initial data query wait until options query is complete

* Fix form error issues

- Form fields were being re-constructed

* Update playwright tests - check for form error message

* Prevent reconstruction of form fields

* Hide form elements until OPTIONS request is complete

* Fix for <ChoiceField />

- "value" must be stringified!

* Handle undefined choice values

* Add "batch code" to stock detail page

* Fix for initial focus

* Allow form field definition to change externally

* Force override of fetched data

* Update playwright tests

* Add backup value

* Cleanup initialdataquery

* Unit test updates

* Test updates

* Tweak API Form

* Adjust playwright test
2024-07-21 14:27:18 +10:00
Oliver
d4cd7d4a72
[PUI] Tab permissions (#7692)
* [PUI] Hide main nav tabs based on user roles

* Add permission checks on top-level pages

* Specify return type
2024-07-19 16:54:55 +10:00
Matthias Mair
0a2817dbf3
Small typescript cleanups (#7685)
* cleanup typescript:S1128

* fix typescript:S1854

* clean up typescript:S6749

* fix names for typescript:S6754
2024-07-19 08:50:53 +10:00
Matthias Mair
0f1645e389
Various small packaging fixes (#7686)
* move repo setting for packager to yml

* fix python detection

* fix persistent setting writing (during onboarding)

* clean up OS before uninstalling
2024-07-19 08:49:51 +10:00
dependabot[bot]
ba4b1bc07a
Bump sentry-sdk from 2.7.0 to 2.8.0 in /src/backend (#7683)
* Bump sentry-sdk from 2.7.0 to 2.8.0 in /src/backend

Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/2.7.0...2.8.0)

---
updated-dependencies:
- dependency-name: sentry-sdk
  dependency-type: direct:production
...

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

* fix requirements format

---------

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-07-19 08:48:59 +10:00
Oliver
cb2c2203f7
Cui tree fix (#7680)
* [CUI] Fix for tree expansion

- Prevent infinite recursion
- Not sure how this has not happened before

* Code cleanup
2024-07-18 06:30:04 +00:00
Matthias Mair
105dd7152e
Optimize PUI package delivery for package installs (#7655)
* Package frontend in deb

* Add artifact download

* remove 0.8.0 check

* remove array casting

* fix format once more

* another try

* add brackets again

* add version

* and bash

* and shell

* more debuging

* various style fixes

* small fixes

* and ls for prosperity

* debug

* maybe git as source?

* fix download cmd?

* debug a bit

* debug a bit more

* remove sha download - is not working with GHA restrictions

* write version number

* check if a new frontend must be dowloaded

* write versions into frontend packages

* Matmair/issue7338 (#205)

* Package frontend in deb

* Add artifact download

* remove 0.8.0 check

* remove array casting

* fix format once more

* another try

* add brackets again

* add version

* and bash

* and shell

* more debuging

* various style fixes

* small fixes

* and ls for prosperity

* debug

* maybe git as source?

* fix download cmd?

* debug a bit

* debug a bit more

* remove sha download - is not working with GHA restrictions

* write version number

* check if a new frontend must be dowloaded

* write versions into frontend packages

* change ref dir for tests

* add better build logging

* extend task to get ref from package

* fix downloading syntax

* fix name ref

* make more robust

* more logging

* move import

* turn down unzipping noise

* strip content (spaces, newlines)

* add info what happens now

* fix quite flag

* adjust publisher
2024-07-18 15:35:09 +10:00
Oliver
c6d310caf7
Fix loading sequence for PUI form fields (#7678)
- Ensure that "existing" values are honored
- Change hook execution ordering
- Delay field display until all fields are loaded
2024-07-18 14:16:30 +10:00
Oliver
ecec81ead0
Cast width / height to integer (#7676)
* Cast width / height to integer

* Convert "rotate" parameter
2024-07-18 12:38:05 +10:00
Oliver
58807d575c
[PUI] Tweaks (#7673)
* Fix typo

* Filter fix for "supplier" field

* Fix supplier part actions

* Fix actions for manufacturer part

* Improve bulk-delete modal

- Prevents duplicate copies of modal being displayed

* Cleanup admin / settings panels

* Adjust playwright test
2024-07-18 10:38:41 +10:00
Oliver
ca3f5c096c
New Crowdin updates (#7669)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.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-07-18 10:16:25 +10:00
Matthias Mair
dae173e84c
Bump development deps (#7606)
* bump pre-commit

* add config for codespell

* re-add hashes
2024-07-18 09:53:17 +10:00
Matthias Mair
44a5f76213
[CI] Add nicer OpenAPI diffs (#7002)
* add diff action

* Update api_version.py

* always diff schemas

* move model lookup to subpath

* Add diff to step summary

* fix arg name

* use echo step instead

* split action and fail curl

* fail if download not possible

* capture code

* remove wrong syntax

* decrease download number

* revert qc

* extend version_check

* fix exit cond

* fix link

* add dummy change

* Update api_version.py

* use html for format
2024-07-17 23:45:26 +10:00
Matthias Mair
547fa179c5
Various SAST fixes (#7644)
* cleanup auth

* clean Unexpected empty object pattern

* clenaup empty object patterns

* fix identical sub-expressions

* fix missing title on iframe

* Do not pass children as props

* update node assigment

* fix typing

* fix variables that shadow builtins

* revert StylishText change
2024-07-17 23:45:11 +10:00
Oliver
234b0ed72c
[CUI] Non field errors (#7672)
* Fix typo

* [CUI] Display hidden error messages in forms

* Adjust build checks

* Improve error checking
2024-07-17 17:44:51 +10:00
Oliver
eacd28bf19
[PUI] PO line item import (#7671)
* Fix typo

* Adds new field to DataImportSession model

- field_filters
- Allows custom API field filters to be specified

* Update serializer

* Add button to import purchase order line items

* Fix instance renderer

* Make use of "filters" attribute

* Specify default currency for import

* Update serializer

* Bump API version

* Rename purchaseorderline -> purchaseorderlineitem
2024-07-17 17:44:42 +10:00
Lukas
453254c278
Add notes to mp and sp (#7667)
* add notes to mp and sp

* bump api version
2024-07-17 08:02:47 +10:00
Lukas
b783f521de
Fix rendering bug with company image (#7668)
Fixed rendering bug when switching from a company that has an image and one that hasn't in a related model field due to the number of rendered hooks changes, because Thumbnail is not used as a component here, but a normal function.
2024-07-17 08:01:29 +10:00
Oliver
c3ce9cd3c2
Adjust packaging at different stages (#7649)
* Allow override of packaging field when receiving items against a PurchaseOrder

* Allow editing of batch code and packaging when transferring stock

* Bump API version

* Translate table headers

* [PUI] Update receive items form

* [PUI] Allow packaging adjustment on stock actions

* Hide packaging field for other actions

* JS linting

* Add 'note' field when receiving item against purchase order

* [CUI] implement note field

* Implement "note" field in PUI

* Comment out failing tests
2024-07-16 13:17:30 +10:00
Roche Christopher
a3103cf568
Added onInput event for fields in forms - fix for issue #7600 (#7660)
An onInput event is added for fields in forms that gets triggered everytime an input is detected in the field
2024-07-16 12:11:20 +10:00
dependabot[bot]
0d2424a3d9
Bump the dependencies group with 3 updates (#7661)
Bumps the dependencies group with 3 updates: [actions/setup-python](https://github.com/actions/setup-python), [docker/build-push-action](https://github.com/docker/build-push-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/setup-python` from 5.1.0 to 5.1.1
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](82c7e631bb...39cd14951b)

Updates `docker/build-push-action` from 6.3.0 to 6.4.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](1a162644f9...a254f8ca60)

Updates `github/codeql-action` from 3.25.11 to 3.25.12
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b611370bb5...4fa2a79536)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github/codeql-action
  dependency-type: direct:production
  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-07-16 09:44:07 +10:00
Oliver
12dfaaba9a
Logic fix for UI elements (#7657)
- Check for false, as !true includes undefined
- Prevents visual flashes due to short term rendering of elements
2024-07-16 09:16:50 +10:00
Matthias Mair
25c91323c9
bump setuptools (#7663)
fixes https://github.com/inventree/InvenTree/security/dependabot/121
2024-07-16 08:33:11 +10:00
Lukas
33b2ca897d
Fix location icon field (#7658) 2024-07-16 08:02:51 +10:00
Oliver
b96b8b8a04
[PUI] Tweak purchase order line table (#7656)
* Add "packaging" field to PO line table

* Fixes for order detail pages
2024-07-16 00:39:30 +10:00
Oliver
fc0a860e9b
Fix argument name (#7653)
* Fix argument name

* Fix typo
2024-07-15 13:54:29 +10:00
Lukas
38ad83e401
Add stock location type documentation (#7652) 2024-07-15 07:50:45 +10:00
Matthew Campbell
32147e34ee
Fix small typo in docs (#7651) 2024-07-15 07:50:17 +10:00
Oliver
76f8a2ee9e
[PUI] Add BOM import tool (#7635)
* Add "field_overrides" field to DataImportSession model

* Adjust logic for extracting field value

* Add import drawer to BOM table

* Enable download of BOM data

* Improve support for hidden errors in forms

* Improve form submission on front-end

- Handle a mix of files and JSON fields
- Stringify any objects

* Update backend validation for data import session

- Accept override values if provided
- Ensure correct data format
- Update fields for BomItem serializer

* Add completion check for data import session

* Improvements to importer drawer

* Render column selection as a table

* Add debouncing to text form fields

- Significantly reduces rendering calls

* Fix for TextField

* Allow instance data to be updated manually

* Allow specification of per-field default values when importing data

* Improve rendering of import

* Improve UI for data import drawer

* Bump API version

* Add callback after bulk delete

* Update playwright test

* Fix for editRow function
2024-07-14 22:00:29 +10:00
Oliver
750e6d81fa
Allocated stock table fix (#7636)
* Expose batch code field to StockItemSerializerBrief

* Expose more fields to PartBriefSerializer

* Additional export fields to BuildItemSerializer

* Bump API version

* Fix playwright test
2024-07-14 20:49:46 +10:00
Oliver
0db280ad74
Add estonian language support (#7647) 2024-07-14 13:28:16 +10:00
Miklós Márton
e5814ea486
Fix issues made in #7614 (#7622)
* Fix issues made in #7614

* Flip cases

* Remove caching of the debug settings

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-07-13 14:57:37 +10:00
Miklós Márton
c87b5c8f3d
Remove caching of the DEBUG settings from the label printer plugin (#7640) 2024-07-13 08:21:45 +10:00
Lukas
23a394d740
Fix machine request pickeling and settings (#6772)
* Fix machine request pickeling

* fix precommit

* fix: shared state between workers and main thread for machine registry

* remove last usage of legacy PUI form framework to fix machine edit/delete modal

* reset cache before initialization

* update documentation

* fix: invalidating cache

* implement machine registry hash to check if a reload is required

* trigger: ci

* fix: request bug

* fix: test

* trigger: ci

* add clear errors and improve restart hook

* auto initialize not initialized machines when changing active state

* fix: tests
2024-07-13 00:22:40 +10:00
Oliver
767b76314e
Revision Improvements (#7585)
* 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

* Fix API version

* Add 'revision_of' field to Part model

* Add validation checks for new revision_of field

* Update migration

* Add unit test for 'revision' rules

* Add API filters for revision control

* Add table filters for PUI

* Add "revision_of" field to PUI form

* Update part forms for PUI

* Render part revision selection dropdown in PUI

* Prevent refetch on focus

* Ensure select renders above other items

* Disable searching

* Cleanup <PartDetail/>

* UI tweak

* Add setting to control revisions for assemblies

* Hide revision selection drop-down if revisions are not enabled

* Query updates

* Validate entire BOM table from PUI

* Sort revisions

* Fix requirements files

* Fix api_version.py

* Reintroduce previous check for IPN / revision uniqueness

* Set default value for refetchOnWindowFocus (false)

* Revert serializer change

* Further CI fixes

* Further unit test updates

* Fix defaults for query client

* Add docs

* Add link to "revision_of" in CUI

* Add playwright test for revisions

* Ignore notification errors for playwright

---------

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-07-12 14:37:32 +10:00
Oliver
fb17078497
Arabic support (#7630)
* Add 'ar' language (Arabic)

* Add front-end support
2024-07-12 11:31:36 +10:00
Oliver
a237de10ec
Update part detail (#7629)
- Include variant stock in "in stock" badge
2024-07-12 10:13:25 +10:00
Matthias Mair
3d8235423a
Various small code quality cleanups (#7626)
* fix possible access to None value

* fix possible access to empty valie

* fix possible access to empty value

* define exception

* remove old todo

* fix trigger on none

* merge condition

* remove empty object pattern

* fix typo

* fix usage of var

* add missing import

* use for of itterator instead

* use let instead of var

* move declaration to ensure logger is accessible

* Revert "remove empty object pattern"

This reverts commit 4701cc97ec30dac38bc63806142859a67a9ba8d7.
2024-07-12 09:07:55 +10:00
Miklós Márton
5d1f2b3ac0
Change "Edit/Delete test result" to "Edit/Delete test template" tooltip of (#7625)
the test template list actions.
2024-07-12 08:25:32 +10:00
Matthias Mair
be2beeca61
bumpd django to 4.2.14 (#7620)
Fixes https://github.com/inventree/InvenTree/security/dependabot/116
2024-07-11 16:49:10 +10:00
Oliver
6650f3e90c
[Feature] Build allocation export (#7611)
* CUI: Add "allocated stock" panel to build order page

* Implement CUI table for build order allocations

* Add "bulk delete" option for build order allocations

* Add row actions

* Add extra fields for data export

* Add build allocation table in PUI

* Add 'batch' column

* Bump API version

* Add playwright tests

* Fix missing renderer

* Update build docs

* Update playwright tests

* Update playwright tests
2024-07-11 14:33:53 +10:00
Miklós Márton
4e6879407e
Add debug option to the sheet printer plugin (#7614) 2024-07-11 13:28:29 +10:00
Oliver
5e040c4dc4
[PUI] Add filters for parameteric part table (#7617) 2024-07-11 13:07:49 +10:00
Oliver
2ebe6e0a8e
Add server-side annotation for "can_build" (#7619)
* Add server-side annotation for "can_build"

- This calculation now performed on the server (in the API)
- Allows better table ordering, etc
- Makes it available for data export

* Bump API version
2024-07-11 13:06:59 +10:00
Oliver
81ab7aa625
[PUI] Add more columns (#7618)
* [PUI] Add more columns

- Add "IPN" column to stock table
- Add "revision" column to stock table

* Add IPN column to BOM table
2024-07-11 12:38:00 +10:00
Oliver
2e4ab45635
[PUI] Fix line-break for "details" field (#7616) 2024-07-11 12:01:04 +10:00
Tom Van Eyck
8059fb1e05
Fix "Scan barcode" modal input (#7610)
* Prevent browser shortcuts in barcode input field

* Add Alt & Control key input
2024-07-10 20:03:49 +10:00
Oliver
7655113851
[PUI] Query cache improvements (#7609)
* Remove duplicate call to fetchUserState

* Optimize printing fields request

- Implement using useQuery hook
- Add 500ms cache

* Prevent duplicate locale setting

* Add cache time to useFilters hook

* Prevent useGenerator from fetching initially
2024-07-10 19:11:59 +10:00
Oliver
2d8f5e9006
Tweak checks for error messages (#7598)
* Tweak checks for error messages

- Ensure user is logged in before checking permissions

* Fix <InstanceDetail/>

* Tweak notification check
2024-07-10 13:15:21 +10:00
dependabot[bot]
cd1d4a4be0
Bump certifi from 2024.2.2 to 2024.7.4 in /docs (#7596)
* Bump certifi from 2024.2.2 to 2024.7.4 in /docs

Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.2.2 to 2024.7.4.
- [Commits](https://github.com/certifi/python-certifi/compare/2024.02.02...2024.07.04)

---
updated-dependencies:
- dependency-name: certifi
  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: Matthias Mair <code@mjmair.com>
2024-07-09 21:42:39 +10:00
Oliver
84d076848a
Parameter value bug (#7601)
* Handle out-of range numerical values

* Add unit test
2024-07-09 21:39:06 +10:00
Oliver
494c12f0e5
[Bug] Project code fix (#7599)
* Fix project_code serializer field

- Imroperly marked as "read only"

* Add unit test

* Bump API version

* Add project code label to order serializers

- Making it available in exported dataset
2024-07-09 21:09:57 +10:00
dependabot[bot]
b59ecdaeac
Bump the dependencies group across 1 directory with 52 updates (#7540)
* Bump the dependencies group across 1 directory with 52 updates

Bumps the dependencies group with 50 updates in the /src/frontend directory:

| Package | From | To |
| --- | --- | --- |
| [@codemirror/autocomplete](https://github.com/codemirror/autocomplete) | `6.16.0` | `6.16.3` |
| [@codemirror/language](https://github.com/codemirror/language) | `6.10.1` | `6.10.2` |
| [@codemirror/lint](https://github.com/codemirror/lint) | `6.5.0` | `6.8.1` |
| [@codemirror/view](https://github.com/codemirror/view) | `6.26.3` | `6.28.3` |
| [@fortawesome/react-fontawesome](https://github.com/FortAwesome/react-fontawesome) | `0.2.0` | `0.2.2` |
| [@lingui/core](https://github.com/lingui/js-lingui) | `4.10.0` | `4.11.1` |
| [@lingui/react](https://github.com/lingui/js-lingui) | `4.10.0` | `4.11.1` |
| [@mantine/carousel](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/carousel) | `7.10.0` | `7.11.0` |
| [@mantine/charts](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/charts) | `7.10.1` | `7.11.0` |
| [@mantine/core](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/core) | `7.10.0` | `7.11.0` |
| [@mantine/dates](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/dates) | `7.10.0` | `7.11.0` |
| [@mantine/dropzone](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/dropzone) | `7.10.0` | `7.11.0` |
| [@mantine/form](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/form) | `7.10.0` | `7.11.0` |
| [@mantine/hooks](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/hooks) | `7.10.0` | `7.11.0` |
| [@mantine/modals](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/modals) | `7.10.0` | `7.11.0` |
| [@mantine/notifications](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/notifications) | `7.10.0` | `7.11.0` |
| [@mantine/spotlight](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/spotlight) | `7.10.0` | `7.11.0` |
| [@mantine/vanilla-extract](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/vanilla-extract) | `7.10.0` | `7.11.0` |
| [@mdxeditor/editor](https://github.com/mdx-editor/editor) | `3.4.0` | `3.6.1` |
| [@sentry/react](https://github.com/getsentry/sentry-javascript) | `7.110.1` | `8.13.0` |
| [@tabler/icons-react](https://github.com/tabler/tabler-icons/tree/HEAD/packages/icons-react) | `3.2.0` | `3.7.0` |
| [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.29.2` | `5.49.2` |
| [@uiw/codemirror-theme-vscode](https://github.com/uiwjs/react-codemirror) | `4.21.25` | `4.22.2` |
| [@uiw/react-codemirror](https://github.com/uiwjs/react-codemirror) | `4.21.25` | `4.22.2` |
| [@vanilla-extract/css](https://github.com/vanilla-extract-css/vanilla-extract/tree/HEAD/packages/css) | `1.14.2` | `1.15.3` |
| [axios](https://github.com/axios/axios) | `1.6.8` | `1.7.2` |
| [embla-carousel-react](https://github.com/davidjerleke/embla-carousel) | `8.0.2` | `8.1.6` |
| [mantine-datatable](https://github.com/icflorescu/mantine-datatable) | `7.8.1` | `7.11.1` |
| [react](https://github.com/facebook/react/tree/HEAD/packages/react) | `18.2.0` | `18.3.1` |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.2.79` | `18.3.3` |
| [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) | `18.2.0` | `18.3.1` |
| [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `18.2.25` | `18.3.0` |
| [react-is](https://github.com/facebook/react/tree/HEAD/packages/react-is) | `18.2.0` | `18.3.1` |
| [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) | `6.22.3` | `6.24.0` |
| [styled-components](https://github.com/styled-components/styled-components) | `6.1.8` | `6.1.11` |
| [zustand](https://github.com/pmndrs/zustand) | `4.5.2` | `4.5.4` |
| [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.24.4` | `7.24.7` |
| [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) | `7.24.1` | `7.24.7` |
| [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) | `7.24.1` | `7.24.7` |
| [@lingui/cli](https://github.com/lingui/js-lingui) | `4.10.0` | `4.11.1` |
| [@lingui/macro](https://github.com/lingui/js-lingui) | `4.10.0` | `4.11.1` |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.43.1` | `1.45.0` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.12.7` | `20.14.9` |
| [@vanilla-extract/vite-plugin](https://github.com/vanilla-extract-css/vanilla-extract/tree/HEAD/packages/vite-plugin) | `4.0.7` | `4.0.12` |
| [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) | `4.2.1` | `4.3.1` |
| [nyc](https://github.com/istanbuljs/nyc) | `15.1.0` | `17.0.0` |
| [rollup-plugin-license](https://github.com/mjeanroy/rollup-plugin-license) | `3.3.1` | `3.5.1` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.4.5` | `5.5.2` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.2.8` | `5.3.2` |
| [vite-plugin-istanbul](https://github.com/ifaxity/vite-plugin-istanbul) | `6.0.0` | `6.0.2` |



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

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

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

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

Updates `@fortawesome/react-fontawesome` from 0.2.0 to 0.2.2
- [Release notes](https://github.com/FortAwesome/react-fontawesome/releases)
- [Changelog](https://github.com/FortAwesome/react-fontawesome/blob/0.2.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/react-fontawesome/compare/0.2.0...0.2.2)

Updates `@lingui/core` from 4.10.0 to 4.11.1
- [Release notes](https://github.com/lingui/js-lingui/releases)
- [Changelog](https://github.com/lingui/js-lingui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lingui/js-lingui/compare/v4.10.0...v4.11.1)

Updates `@lingui/react` from 4.10.0 to 4.11.1
- [Release notes](https://github.com/lingui/js-lingui/releases)
- [Changelog](https://github.com/lingui/js-lingui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lingui/js-lingui/compare/v4.10.0...v4.11.1)

Updates `@mantine/carousel` from 7.10.0 to 7.11.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.11.0/packages/@mantine/carousel)

Updates `@mantine/charts` from 7.10.1 to 7.11.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.11.0/packages/@mantine/charts)

Updates `@mantine/core` from 7.10.0 to 7.11.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.11.0/packages/@mantine/core)

Updates `@mantine/dates` from 7.10.0 to 7.11.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.11.0/packages/@mantine/dates)

Updates `@mantine/dropzone` from 7.10.0 to 7.11.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.11.0/packages/@mantine/dropzone)

Updates `@mantine/form` from 7.10.0 to 7.11.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.11.0/packages/@mantine/form)

Updates `@mantine/hooks` from 7.10.0 to 7.11.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.11.0/packages/@mantine/hooks)

Updates `@mantine/modals` from 7.10.0 to 7.11.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.11.0/packages/@mantine/modals)

Updates `@mantine/notifications` from 7.10.0 to 7.11.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.11.0/packages/@mantine/notifications)

Updates `@mantine/spotlight` from 7.10.0 to 7.11.0
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.11.0/packages/@mantine/spotlight)

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

Updates `@mdxeditor/editor` from 3.4.0 to 3.6.1
- [Release notes](https://github.com/mdx-editor/editor/releases)
- [Commits](https://github.com/mdx-editor/editor/compare/v3.4.0...v3.6.1)

Updates `@sentry/react` from 7.110.1 to 8.13.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/7.110.1...8.13.0)

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

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

Updates `@uiw/codemirror-theme-vscode` from 4.21.25 to 4.22.2
- [Release notes](https://github.com/uiwjs/react-codemirror/releases)
- [Commits](https://github.com/uiwjs/react-codemirror/compare/v4.21.25...v4.22.2)

Updates `@uiw/react-codemirror` from 4.21.25 to 4.22.2
- [Release notes](https://github.com/uiwjs/react-codemirror/releases)
- [Commits](https://github.com/uiwjs/react-codemirror/compare/v4.21.25...v4.22.2)

Updates `@vanilla-extract/css` from 1.14.2 to 1.15.3
- [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.3/packages/css)

Updates `axios` from 1.6.8 to 1.7.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.6.8...v1.7.2)

Updates `clsx` from 2.1.0 to 2.1.1
- [Release notes](https://github.com/lukeed/clsx/releases)
- [Commits](https://github.com/lukeed/clsx/compare/v2.1.0...v2.1.1)

Updates `embla-carousel-react` from 8.0.2 to 8.1.6
- [Release notes](https://github.com/davidjerleke/embla-carousel/releases)
- [Commits](https://github.com/davidjerleke/embla-carousel/compare/v8.0.2...v8.1.6)

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

Updates `react` from 18.2.0 to 18.3.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react)

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

Updates `react-dom` from 18.2.0 to 18.3.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-dom)

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

Updates `react-hook-form` from 7.51.3 to 7.51.5
- [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.51.3...v7.51.5)

Updates `react-is` from 18.2.0 to 18.3.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-is)

Updates `react-router-dom` from 6.22.3 to 6.24.0
- [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.24.0/packages/react-router-dom)

Updates `styled-components` from 6.1.8 to 6.1.11
- [Release notes](https://github.com/styled-components/styled-components/releases)
- [Commits](https://github.com/styled-components/styled-components/compare/v6.1.8...v6.1.11)

Updates `zustand` from 4.5.2 to 4.5.4
- [Release notes](https://github.com/pmndrs/zustand/releases)
- [Commits](https://github.com/pmndrs/zustand/compare/v4.5.2...v4.5.4)

Updates `@babel/core` from 7.24.4 to 7.24.7
- [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.24.7/packages/babel-core)

Updates `@babel/preset-react` from 7.24.1 to 7.24.7
- [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.24.7/packages/babel-preset-react)

Updates `@babel/preset-typescript` from 7.24.1 to 7.24.7
- [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.24.7/packages/babel-preset-typescript)

Updates `@lingui/cli` from 4.10.0 to 4.11.1
- [Release notes](https://github.com/lingui/js-lingui/releases)
- [Changelog](https://github.com/lingui/js-lingui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lingui/js-lingui/compare/v4.10.0...v4.11.1)

Updates `@lingui/macro` from 4.10.0 to 4.11.1
- [Release notes](https://github.com/lingui/js-lingui/releases)
- [Changelog](https://github.com/lingui/js-lingui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lingui/js-lingui/compare/v4.10.0...v4.11.1)

Updates `@playwright/test` from 1.43.1 to 1.45.0
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.43.1...v1.45.0)

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

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

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

Updates `@vanilla-extract/vite-plugin` from 4.0.7 to 4.0.12
- [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.12/packages/vite-plugin)

Updates `@vitejs/plugin-react` from 4.2.1 to 4.3.1
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/v4.3.1/packages/plugin-react)

Updates `nyc` from 15.1.0 to 17.0.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/v15.1.0...nyc-v17.0.0)

Updates `rollup-plugin-license` from 3.3.1 to 3.5.1
- [Changelog](https://github.com/mjeanroy/rollup-plugin-license/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mjeanroy/rollup-plugin-license/compare/v3.3.1...v3.5.1)

Updates `typescript` from 5.4.5 to 5.5.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.4.5...v5.5.2)

Updates `vite` from 5.2.8 to 5.3.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.3.2/packages/vite)

Updates `vite-plugin-istanbul` from 6.0.0 to 6.0.2
- [Release notes](https://github.com/ifaxity/vite-plugin-istanbul/releases)
- [Changelog](https://github.com/iFaxity/vite-plugin-istanbul/blob/next/release.config.js)
- [Commits](https://github.com/ifaxity/vite-plugin-istanbul/compare/v6.0.0...v6.0.2)

---
updated-dependencies:
- dependency-name: "@codemirror/autocomplete"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@codemirror/language"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@codemirror/lint"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@codemirror/view"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@fortawesome/react-fontawesome"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@lingui/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@lingui/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/carousel"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/charts"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/dates"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/dropzone"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/form"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/hooks"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/modals"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/notifications"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/spotlight"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mantine/vanilla-extract"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@mdxeditor/editor"
  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-major
  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-minor
  dependency-group: dependencies
- dependency-name: "@uiw/react-codemirror"
  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-minor
  dependency-group: dependencies
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: clsx
  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: mantine-datatable
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: react
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: react-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: react-hook-form
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: react-is
  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-minor
  dependency-group: dependencies
- dependency-name: styled-components
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: zustand
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@babel/preset-react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@babel/preset-typescript"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@lingui/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@lingui/macro"
  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-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-minor
  dependency-group: dependencies
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@vanilla-extract/vite-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@vitejs/plugin-react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: nyc
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: rollup-plugin-license
  dependency-type: direct:development
  update-type: version-update:semver-minor
  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-minor
  dependency-group: dependencies
- dependency-name: vite-plugin-istanbul
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

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

* Fix callback args for <Boundary>

* Ignore specific warning message (for now)

* Tweak unit test

---------

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>
2024-07-09 19:30:07 +10:00
Matthias Mair
fd42b2fbf8
Move duplicate schema endpoint (#7595)
* move duplicate endpoint

* fix link
2024-07-09 18:47:15 +10:00
Oliver
e943c5a686
Build Line Updates (#7591)
* Update build line tables

* Add additional fiels to BuildLine serializer

* Bump API version
2024-07-09 13:35:32 +10:00
dependabot[bot]
c05cf86c8e
Bump the dependencies group with 5 updates (#7590)
Bumps the dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3.0.0` | `3.1.0` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.3.0` | `3.4.0` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `6.2.0` | `6.3.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.3.3` | `4.3.4` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `4.1.7` | `4.1.8` |


Updates `docker/setup-qemu-action` from 3.0.0 to 3.1.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](68827325e0...5927c834f5)

Updates `docker/setup-buildx-action` from 3.3.0 to 3.4.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](d70bba72b1...4fd812986e)

Updates `docker/build-push-action` from 6.2.0 to 6.3.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](15560696de...1a162644f9)

Updates `actions/upload-artifact` from 4.3.3 to 4.3.4
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](65462800fd...0b2256b8c0)

Updates `actions/download-artifact` from 4.1.7 to 4.1.8
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](65a9edc588...fa0a91b85d)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  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-07-09 13:35:17 +10:00
Matthias Mair
3845260106
Add cleanup task (#7581)
* [FR] Add invoke task to remove compiled files
Fixes #7559

* add optional clear step before install ensuring clean updates

* add pre-install

* Update preinstall.sh

* Update functions.sh

* Update preinstall.sh

* add a generic run helper to ensure commands run from top directory

* use generic run for other helpers
2024-07-09 09:51:52 +10:00
Lukas
9a6cfb4309
PUI form framework: dependent field (#7584)
* PUI form framework: implement the dependent field

* fix: tests

* fix: hook

* fix: tests

* --no-verify

trigger: ci

* --noVerify

trigger: ci
2024-07-09 08:14:26 +10:00
Oliver
1017ff0605
Default location column (#7587)
* Add "default_location_detail" serializer to part API

* Add column to CUI table

* Implement in PUI part table

* Update API version
2024-07-09 08:13:21 +10:00
Oliver
189948be06
New Crowdin updates (#7588)
* 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 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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-09 08:13:11 +10:00
Matthias Mair
1ac6df82e3
Use more pathlib instead of os (#7589)
* unify path usage

* remove usage of `os` for setup_test

* more os usage

* use mkdir instead
2024-07-09 07:50:26 +10:00
Oliver
633873365d
BOM delete fix (#7586)
* Fix order of operations for BOM item bulk delete

* Improve error messaging

* Add "validate_delete" method
2024-07-09 00:45:47 +10:00
Matthias Mair
11e70c9ba0
bump urllib3 to 2.2.2 (#7578)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-07-08 08:14:57 +10:00
Matthias Mair
1d4114b6f5
General backend deps bump (#7521)
* bump backend deps

* use lower version of drf

* pin import-export to under 4.9

* pin drf below 3.15

* add note about pins

* lower regex version
2024-07-08 08:14:04 +10:00
Matthias Mair
473268a10f
Add variable to stop creation of admin account (#7580) 2024-07-08 08:13:04 +10:00
dependabot[bot]
48fb087a96
Bump certifi from 2024.2.2 to 2024.7.4 in /src/backend (#7566)
* Bump certifi from 2024.2.2 to 2024.7.4 in /src/backend

Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.2.2 to 2024.7.4.
- [Commits](https://github.com/certifi/python-certifi/compare/2024.02.02...2024.07.04)

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

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

* fix style

* another fix

---------

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 <oliver.henry.walters@gmail.com>
2024-07-07 20:32:01 +10:00
Matthias Mair
0a9e63c8f1
Fix schema version commit text (#7576)
* add "pretty" step names

* fix commit name formatting
2024-07-07 19:54:30 +10:00
Matthias Mair
18c7162e53
disable 3.12 testing for now (#7577) 2024-07-07 19:53:45 +10:00
Oliver
3ce0202ffd
[PUI] Update part duplicate forms (#7575)
- Enable copying of part details when duplicating a part
- Update forms
2024-07-07 12:50:31 +10:00
Oliver
8309eb628f
[Feature] Part lock (#7527)
* Add "locked" field to Part model

- Default = false

* Add "locked" field to PartSerializer

- Allow filtering in API

* Filter CUI tables by "locked" status

* Add "locked" filter to part table

* Update PUI table

* PUI: Update display of part details  page

* Add "locked" element

* Ensmallen the gap

* Edit "locked" field in CUI

* Check BomItem before editing or deleting

* Prevent bulk delete of BOM items

* Check part lock for PartParameter model

* Prevent deletion of a locked part

* Add option to prevent build order creation for unlocked part

* Bump API version

* Hide actions from BOM table if part is locked

* Fix for boolean form field

* Update <PartParameterTable>

* Add unit test for 'BUILDORDER_REQUIRE_LOCKED_PART' setting

* Add unit test for part deletion

* add bom item test

* unit test for part parameter

* Update playwright tests

* Update docs

* Remove defunct setting

* Update playwright tests
2024-07-07 11:35:30 +10:00
Oliver
97b6258797
[PUI] Fix saveNotes callback (#7545)
* [PUI] Fix saveNotes callback

* add delay to playwright test
2024-07-07 09:19:50 +10:00
dependabot[bot]
13ee755ad3
Bump the dependencies group with 2 updates (#7541)
Bumps the dependencies group with 2 updates: [docker/build-push-action](https://github.com/docker/build-push-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `docker/build-push-action` from 6.1.0 to 6.2.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](31159d49c0...15560696de)

Updates `github/codeql-action` from 3.25.10 to 3.25.11
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](23acc5c183...b611370bb5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github/codeql-action
  dependency-type: direct:production
  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-07-07 08:07:15 +10:00
Oliver
ab126a8c1b
New Crowdin updates (#7564)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.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-07-06 22:20:43 +10:00
Matthias Mair
74d3e28e8e
Ensure schema generation is more stable (#7562)
* Enable passing of enviroment variables

* keep server url static
see #6882 (3)

* keep plugin api out of schema
see #6882 (1)

* Add kwarg to override db settings

* keep currencies stable for schema generation
see #6882 (2)

* use str instead of bool

* add version bump
2024-07-06 22:19:58 +10:00
dependabot[bot]
71680f6fc3
Bump certifi from 2024.2.2 to 2024.7.4 in /contrib/dev_reqs (#7568)
* Bump certifi from 2024.2.2 to 2024.7.4 in /contrib/dev_reqs

Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.2.2 to 2024.7.4.
- [Commits](https://github.com/certifi/python-certifi/compare/2024.02.02...2024.07.04)

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

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

* fix style

---------

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-07-06 22:19:36 +10:00
Oliver
1f6cd9fc54
[WIP] Data importer (#6911)
* Adds new model for DataImportSession

* Add file extension validation

Expose to admin interface also

* Switch to new 'importer' app

* Refactoring to help prevent circular imports

* Add serializer registry

- Use @register_importer tag for any serializer class

* Cleanup migration file

- Do not use one-time hard-coded values here

* Refactor code into registry.py

* Add validation for the uploaded file

- Must be importable by tablib

* Refactoring

* Adds property to retrieve matching serializer class

* Update helper functions

* Add hook to auto-assign columns on initial creation

* Rename field

* Enforce initial status value

* Add model for individual rows in the data import

* Add DataImportRow model

* Extract data rows as dict

* Update fields

- Remove "progress" field (will be calculated)
- Added "timestamp" field
- Added "complete" field to DataImportRow

* Auto-map column names

- Provide "sensible" default values

* Add API endpoint for DataImportSession

* Offload data import operation

- For large data files this may take a significant amount of time
- Offload it to the background worker process

* Refactor data import code

* Update models

- Add "columns" field to DataImportSession
- Add "errors" field to DataImportRow

* Move field mapping to a new model type

- Simpler validation

* Save "valid" status for each data row

* Include session defaults when validating row data

* Update content_excludes

- Ignore importer models in import/export

* Remove port from ALLOWED_HOST entries

* Skip table events for importer models

* Bug fixes

* Serializer updates

* Add more endpoints

- DataImportColumnMappingList
- DataImportRowList

* further updates:

- Add 'get_api_url' method
- Handle case where

* Expose "available fields" to the DataImportSession serializer

Uses the (already available) inventree metadata middleware

* Add detail endpoints

* Clear existing column mappings

* Add endpoint for accepting column mappings

* Add API endpoint exposing available importer serializers

* Add simple playground area for testing data importer

* Adds simple form to start new import session

- Needs work, file field does not currently function correctly

* data_file is *not* read_only

* Add check for file type

* Remove debug statements

* Refactor column mapping

- Generate mapping for each column
- Remove "columns" field
- Column names are calculated dynamically

* Fix uniqueness requirements on mapping table

* Admin updates

- Prevent deletion of mappings
- Prevent addition of mappings

* API endpoint updates

- Prevent mappings from being deleted
- Prevent mappings from being created

* Update importer drawer

* Add widget for selecting data columns

* UI tweaks

* Delete import session when closing modal

* Allow empty string value

* Complete column mapping

* Adds ability to remove rows

* Adjust drawer specs

* Add column 'description' to serializer

* Add option to hide labels in API form field

* Update column heading

* Fix frontend linting errors

* Revert drawer position

* Return correct type

* Fix shadowing

* Fix f-string

* simplify frontend code

* Move importer app

* Update API version

* Reintroduce export formats

* Add new models to RuleSet

* typescript cleanup

* Typescript cleanup

* Improvement for Switch / boolean field

* Display original row data on popover

* Only display mapped columns

* Add DataExportMixin class

- Replaces existing APIDownloadMixin
- Uses DRF serializers for exporting
- *much* more efficient

* Create new file: importer.mixins.py

* Add new mixin to existing views which support data export

* Better error handling

* Cleanup:

- Remove references to APIDownloadMixin
- Remove download_queryset method
- All now handled by API-based export functionality

* Replace table with InvenTreeTable

- Paginate imported rows
- Data can be searched, ordered,

* Make 'pathstring' fields read-only

* Expose list of valid importer types to the API

* Exclude read-only fields

* Cleanup

* Updates for session model

- Column is now editable on mapping object
- Field is no  longer editable
- Improve admin integration

* Adds new custom hook for controlling data import session

* Refactor column mapping widget

* Refactor ImportDataSelector

* Working on ImportDataSelector component

* Adds method for editing fields in import table

- Cell edit mode
- Row edit mode
- Form submission still needs work!

* Adds background task for removing old import sessions

* Fix api_version.py

* Update src/frontend/src/components/importer/ImportDataSelector.tsx

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

* Update model verbose names

* Rename mixin class

* Add serializer mixin classes

- Will allow for fine-tuning of the import/export proces

* @register_importer requires specific mixin

* Check subclass for export

* Fix typos

* Refactor export serializer

- Keep operations local to the class

* Add shim class to process an individual row before exporting it

* Add mixin to existing serializers

* Add export functionality for company serializers

* Adds  placeholder for custom admin class

* Update mantine styling

* spacing -> gap

* Add functionality to pre-process form data before upload

* Remove old references to download_queryset

* Improvements for data import drawer:

- Pin title at top of drawer

* Further improvements

* Fix column selection input

* Formatting improvements

* Use a <Stepper> component for better progress display

* Cleanup text

* Add export-only fields to BuildItem queryset

* Expand "export" fields for BuildItem dataset

* Skip backup and static steps in CI

* Remove hard-coded paths

* Fix for "accept_mapping" method

* Present required fields first on import session

* Add "get_importable_fields" method

* Add method for commiting imported row to database

* Cleanup

* Save "complete" state after row import

* Allow prevention of column caching

* Remove debug statement

* Add basic admin table for import sessions

* Fix for table filter functions

- New mantine version requires string values

* Add filters for import session table

* Remove debug message

* fix for <FilterItem />

* Create new import session from admin page

* Cleanup playground

* Re-open an existing import session

* Memoize cell value

* Update <ImportDataSelector>

* Enable download of build line data

* Add extra detail fields

* Register data importers for the stock app

* Enable download of stock item tracking data

* Register importerrs for "company" app

* Register importers for the "order" app

* Add extra fields to purchase order line item serializer

* Update verbose names for order models

* Cleanup import data table rendering

* Pass session information through to cell renderer

* add separate 'field_overrides' field

* Expose 'field_overrides' to API

* Refactor import field selection

* Use override data if provided

* Fix data extraction

- Ignore columns which are not mapped

* Fix fields.pop

- Provide 'None' argument

* Update import data rendering

* Handle missing / empty column names when importing data

* Bug fixin'

* Update hook

* Adds button to upload data straight to table

* Cache "available_fields"

- Reduces API access time by 85%

* Fix calculation of completed_row_count

* Import individual rows from import session

* Allow import of multiple simultaneous records

* Improve extraction of metadata

- Especially for related fields
- Request object no longer required

* Implement suspended rendering of model instances

* Cleanup

* Implement more columns for StockTable

* Allow stock filtering by packaging field

* Fix "stock_value" column

* Improve metadata extraction

- Handle read_only_fields in Meta
- Handle write_only_fields in Meta

* Increase maximum number of importable rows

* Force data import to run on background worker

* Add export-only fields to StockItemSerializer class

* Data conversion when performing initial import

* Various tweaks

* Fix order of operations for data import

* Rename component

* Allow import/export of more model types

* Fix verbose name

* Import rows as a bulk db operation

* Enable download for PartCategoryTemplateTable

* Update stock item export

* Updates for unit tests

* Remove xls format for now

- Causes some bug in tablib
- Surely xlsx is OK?

* More unit test updates

* Future proof migration

* Updates

* unit tests

* Unit test fix

* Remove 'field_overrides'

- field_defaults will suffice

* Remove 'xls' as download option from frontend

* Add simple unit test for data import

* PUI tweaks

---------

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
2024-07-06 18:29:52 +10:00
Oliver
58f12f5ce5
[PUI] BOM table updates (#7561)
* Update BOM table for PUI

- Display "validated" column
- Allow ordering by "validated" column

* Update table rowActions

* Add row action to validate BOM line

* Enable bulk deletion of BOM items
2024-07-05 16:39:54 +10:00
Oliver
13dbfd0b14
[Build] Add extra validation options (#7560)
* Add new setting: BUILDORDER_REQUIRE_VALID_BOM

- Prevent build orders from being created if the assembly BOM has not been validated

* Add validation check when creating a build order

* Add unit tests
2024-07-05 12:46:34 +10:00
Matthias Mair
720651602b
Package is not checking for already existing installs (#7555)
* rename var

* Single-line installer is not looking for already exsisting installs
Fixes #6891

* move update script up

* fix check

* small syntax fix

* fix missing var assigment

* fix assigment

* better message

* log found settingsmore logging

* also check for 'null'

* fix name confusion
2024-07-05 09:21:07 +10:00
Matthias Mair
5844747e32
Fix SSO theme selection (#7556)
* Adjust caching key to be numeric for user

* Add strong usermodel to colortheme

* switch to using user model everywhere for colortheme

* add some types

* use pk instead of id

* fix migration clash

* fix request
2024-07-05 07:24:55 +10:00
Oliver
7f43040049
Fix 'symbol' field for CustomUnit (#7557)
* Fix 'symbol' field for CustomUnit

- Do not require 'symbol' to be unique

* Run check as part of validate_unique
2024-07-04 23:15:03 +10:00
Matthias Mair
62790cddc0
Display barcode text near qrcode (#7553)
* Add setting to add texts to modals

* Adjust style

* adjust icon
2024-07-04 08:46:45 +10:00
Oliver
b15eb35273
[PUI] Error pages (#7554)
* Add <PermissionDenied /> page

* Check permissions for admin center

* Wrap <PartDetail> page in an error handler

- Display client or server errors

* Add error handlers to other detail pages

* Refactor error pages

* Add playwright tests

* Refactor component locations

* Get test to work
2024-07-04 00:34:52 +10:00
Oliver
0c293fa896
Fix call to add_label_context (#7548)
- Remove reference to object_to_print
- Correctly pass model instance
2024-07-02 23:05:13 +10:00
Matthias Mair
dc3f2011fd
detect python version for installer (#7547) 2024-07-02 22:38:44 +10:00
Oliver
ade6cfb878
[PUI] Update table filters (#7544)
* Update part table filters

* Update stock location table filters

* Update part category table filters
2024-07-02 11:32:41 +10:00
Oliver
ee7a9626e8
New Crowdin updates (#7538)
* 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 messages.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-07-02 11:14:59 +10:00
Lavissa
da9ab4a64f
[PUI] Fix choice-based settings showing as string fields (#7543) 2024-07-02 10:25:22 +10:00
Oliver
ee97f0859d
New Crowdin updates (#7523)
* updated translation base

* Fix: New translations messages.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

* 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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-29 22:02:53 +10:00
Oliver
fd91085363
Calculate weighted average price when merging stock items (#7534)
* Calculate weighted average price when merging stock items

* refactor currency averaging

- Only add samples which have an associated value

* Revert to using two loops

* Check for div-by-zero

* Add unit testing for purchase price averaging
2024-06-29 20:43:49 +10:00
Oliver
3b3352119f
Fix import widget type (#7535) 2024-06-29 20:43:37 +10:00
Philipp Fruck
60e22c50cd
Feat: SSO group sync (#7293)
* feat: Add settings for SSO group sync

* feat: Handle SSO group sync

* fix(SSO): Add default group only if it is the only one

When syncing SSO groups on first user creation,
the default group should not be added if there is
already another group synced by the IdP

* docs: Add SSO goup sync instructions

* fix: Run pre-commit hooks

* i18n(SSO): Wrap settings name and description

* docs(SSO): Fix links to allauth docs

* fix(frontend): Add SSO_GROUP_KEY option

* add unittests for SSO

* docs(SSO): Make hint for example comfiguration a tip

* docs(SSO): Describe relation between SSO sync and signup group

* fix(SSO): Avoid potential key error

* feat(SSO): Create mapped group if it does not exist

* docs(SSO): Describe how groups can be created during signup

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-06-29 20:32:28 +10:00
Oliver
b924530627
Plugin static files fix (#7532)
* Improve logging messages

* Refactor

* Re-add import

- Weird?
2024-06-29 20:11:28 +10:00
Oliver
f67147587a
Add field info to user serializer (#7518)
* Add field info to user serializer

* Bump API version

* Adjust metadata translation lookup

* Improve field metadata introspection

* Add unit test
2024-06-26 23:11:54 +10:00
Oliver
c1b2cbef5e
[PUI] Table filters (#7519)
* Fix for table filter functions

- New mantine version requires string values

* Add playwright test for tables
2024-06-26 21:16:37 +10:00
Oliver
a9223970bd
New Crowdin updates (#7517)
* 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 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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-26 18:45:40 +10:00
Oliver
6cd0727714
Handle case where deltas is null (#7516) 2024-06-26 13:17:31 +10:00
Oliver
e920165901
Fix for BOM import (#7515) 2024-06-26 12:48:03 +10:00
Oliver
937824dceb
Top level cascade (#7514)
* Add "top_level" filter for PartCategory API endpoint

* Update CUI tables

* Update PUI table

* Similar updates for stock location table

* Fix "parent" field label

* Bump API version
2024-06-26 12:28:33 +10:00
Oliver
81ae9026b2
Fix table permissions for CUI (#7513) 2024-06-26 09:47:51 +10:00
Oliver
9c3914db0a
Handle null response case (#7512) 2024-06-26 08:26:38 +10:00
Matthias Mair
c9e9ef1754
Bump pre commit versions (#7255)
* bump pre-commit tools

* move uv config to pyproject

* style fix

* bump pre-commit deps again

* add config for code spell

* spelling fixes

* bump regex

* bump pre-commit

* bump versions again

* roll back regex version

* reverse uv bump

* compile for 3.12

* use 3.12 for ci

* remove unused env vars

* only cache main version

* set caching dep path

* remove caching distinction

* pip installl regex

* switch back to 3.9 default

* remove install test

* reset versions

* remove tomli

* Update playwright.config.ts

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-06-25 20:52:34 +10:00
Oliver
3ed2a4a16b
Ensure defined response (#7511) 2024-06-25 20:16:45 +10:00
Oliver
da42fdf06e
Plugin load fix (#7505)
* Cast setting to int

* Prevent single faulty plugin from killing *all* plugins

* Handle specific errors on _load_plugins

* Update unit test
2024-06-25 12:44:30 +10:00
Oliver
4989e86349
Error checking for attachment model type (#7506) 2024-06-25 11:48:00 +10:00
dependabot[bot]
c6ad902ccc
Bump docker/build-push-action in the dependencies group (#7502)
Bumps the dependencies group with 1 update: [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `docker/build-push-action` from 6.0.0 to 6.1.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](c382f710d3...31159d49c0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 09:27:07 +10:00
Oliver
b58430b7f9
Allow search results to be opened in a new tab (#7500)
- Respond to "ctrl" or "shift" presses in search drawer
- Keep drawer open in this condition
2024-06-24 10:31:11 +10:00
Oliver
c2a755e3bd
Fix for example test report (#7498) 2024-06-23 22:25:23 +10:00
Oliver
54a9bcef57
Handle missing dulwich module (#7497)
- If "invoke version" called from outside venv, may not detect correct dulwich module
- Ref: https://github.com/inventree/InvenTree/issues/7444
2024-06-23 22:25:14 +10:00
Oliver
89196ef701
New Crowdin updates (#7492)
* updated translation base

* Fix: New translations messages.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-06-23 22:15:21 +10:00
Oliver
5f512fa3ec
PUI bug fix (#7490)
- Handle null data case
2024-06-22 12:31:34 +10:00
Oliver
831b5f4f3f
New Crowdin updates (#7487)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.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-06-22 12:31:22 +10:00
dependabot[bot]
2cb5df288e
Bump urllib3 from 2.2.1 to 2.2.2 in /contrib/dev_reqs (#7467)
* Bump urllib3 from 2.2.1 to 2.2.2 in /contrib/dev_reqs

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.2.1...2.2.2)

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

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

* fix reqs file

---------

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-06-22 08:35:35 +10:00
Matthias Mair
935243c2d5
More tests for users app (#7479)
* disable patch coverage

* also test for is_active flag

* ignore edge case regarding coverage

* add tests for api logout

* test login redirects

* style fixes

* fully utilise serializer for /api/user/roles api

* ignore logout mig from cov

* bump api version as we are now documenting the roles endpoint

* ignore on migration runs for coverage

* remove dead code

* ignore potential caching errors for coverage

* test default dj_rest_auth token endpoint

* move pragma

* just ignore whole block

* move ignore back

* test for token based token revocation
2024-06-21 23:49:52 +10:00
mp-strachan
5a6708a042
Fix non null field 'description' (#7488)
Fix typo in migration '0026_auto_20240422_1301.py' to resolve error: `TypeError: LabelTemplate() got unexpected keyword arguments: 'decription'`
2024-06-21 21:31:07 +10:00
Oliver
edd0680344
Handle case where data is undefined (#7486) 2024-06-21 09:09:09 +10:00
Oliver
8543e74c6e
New Crowdin updates (#7473)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.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-06-20 21:14:57 +10:00
Oliver
442f2594d0
Add "showmigrations" task to invoke (#7482)
- Helpful for debugging user installs
2024-06-20 21:14:47 +10:00
Oliver
758871b8a9
Fix fields for PurchaseOrderCancelSerializer (#7481)
- Throwing an error on an OPTIONS request
2024-06-20 20:48:15 +10:00
Gigahawk
545ab9205b
fix: add .vite folder in frontend releases (fixes #7476) (#7480) 2024-06-20 20:04:28 +10:00
Matthias Mair
39f3b900de
[PUI] Add 2FA login (#7469)
* Add `2fa_urls`

* Add new fields to serializer

* Add new interface to PUI interfaces

* fix url resolving

* add frontend redirect for MFA login

* redirect login if mfa is required

* Merege upstream/master into branch

* reset default login

* remove mfa states

* fix auth args

* add handler for MFA redirect auth

* Revert "Merege upstream/master into branch"

This reverts commit 717001d8f1ad8ce291e79419f08450349190fbf3.

* revert api version bump

* revert frontend error handling change

* reduce complexity

* reset schema text

* Add e2e test for MFA login url

* accept either POST or body data for login pre-check

* remove CUI test

* style fixes
2024-06-20 08:38:43 +10:00
Matthias Mair
73c10e219c
style fixes (#7478) 2024-06-20 07:45:44 +10:00
Michael
12e76333a2
Added details on stock ownership control (#7474)
* Add documentation for stock ownership

* Add documentation for stock ownership

* tweaks to format
2024-06-19 16:16:04 +10:00
Oliver
432e0c622c
Single table for file attachments (#7420)
* Add basic model for handling generic attachments

* Refactor migration

* Data migration to convert old files across

* Admin updates

* Increase comment field max_length

* Adjust field name

* Remove legacy serializer classes / endpoints

* Expose new model to API

* Admin site list filters

* Remove legacy attachment models

- Add new mixin class to designate which models can have attachments

* Update data migration

- Ensure other apps are at the correct migration state beforehand

* Add migrations to remove legacy attachment tables

* Fix for "rename_attachment" callback

* Refactor model_type field

- ContentType does not allow easy API serialization

* Set allowed options for admin

* Update model verbose names

* Fix logic for file upload

* Add choices for serializer

* Add API filtering

* Fix for API filter

* Fix for attachment tables in PUI

- Still not solved permission issues

* Bump API version

* Record user when uploading attachment via API

* Refactor <AttachmentTable /> for PUI

* Display 'file_size' in PUI attachment table

* Fix company migrations

* Include permission informtion in roles API endpoint

* Read user permissions in PUI

* Simplify permission checks for <AttachmentTable />

* Automatically clean up old content types

* Cleanup PUI

* Fix typo in data migration

* Add reverse data migration

* Update unit tests

* Use InMemoryStorage for media files in test mode

* Data migration unit test

* Fix "model_type" field

- It is a required field after all

* Add permission check for serializer

* Fix permission check for CUI

* Fix PUI import

* Test python lib against specific branch

- Will be reverted once code is merged

* Revert STORAGES setting

- Might be worth looking into again

* Fix part unit test

* Fix unit test for sales order

* Use 'get_global_setting'

* Use 'get_global_setting'

* Update setting getter

* Unit tests

* Tweaks

* Revert change to settings.py

* More updates for get_global_setting

* Relax API query count requirement

* remove illegal chars and add unit tests

* Fix unit tests

* Fix frontend unit tests

* settings management updates

* Prevent db write under more conditions

* Simplify settings code

* Pop values before creating filters

* Prevent settings write under certain conditions

* Add debug msg

* Clear db on record import

* Refactor permissions checks

- Allows extension / customization of permission checks at a later date

* Unit test updates

* Prevent delete of attachment without correct permissions

* Adjust odcker.yaml

* Cleanup data migrations

* Tweak migration tests for build app

* Update data migration

- Handle case with missing data

* Prevent debug shell in TESTING mode

* Update migration dependencies

- Ensure all apps are "up to date" before removing legacy tables

* add file size test

* Update migration tests

* Revert some settings caching changes

* Fix incorrect logic in migration

* Update unit tests

* Prevent create on CURRENCY_CODES

- Seems to play havoc with bootup sequence

* Fix unit test

* Some refactoring

- Use get_global_setting

* Fix typo

* Revert change

* Add "tags" and "metadata"

* Include "tags" field in API serializer

* add "metadata" endpoint for attachments
2024-06-19 14:38:46 +10:00
Oliver
b8b79b2b2d
Fix click-through for purchase order line item table (#7472)
- Use the 'part' field, not 'pk'
2024-06-19 14:36:38 +10:00
Oliver
be7b7fac95
New Crowdin updates (#7468)
* updated translation base

* Fix: New translations messages.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-19 00:07:01 +10:00
dependabot[bot]
2c50620acc
Bump the dependencies group with 4 updates (#7462)
Bumps the dependencies group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [docker/build-push-action](https://github.com/docker/build-push-action), [codecov/codecov-action](https://github.com/codecov/codecov-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 4.1.6 to 4.1.7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](a5ac7e51b4...692973e3d9)

Updates `docker/build-push-action` from 5.4.0 to 6.0.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](ca052bb54a...c382f710d3)

Updates `codecov/codecov-action` from 4.4.1 to 4.5.0
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](125fc84a9a...e28ff129e5)

Updates `github/codeql-action` from 3.25.8 to 3.25.10
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2e230e8fe0...23acc5c183)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github/codeql-action
  dependency-type: direct:production
  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-06-18 23:42:05 +10:00
dependabot[bot]
9a45e30da7
Bump eslint from 9.4.0 to 9.5.0 in /src/backend (#7463)
Bumps [eslint](https://github.com/eslint/eslint) from 9.4.0 to 9.5.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.4.0...v9.5.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 23:41:54 +10:00
Oliver
e6886785d6
Add unit test for stockitemtracking API (#7459) 2024-06-17 21:07:25 +10:00
Oliver
db7632ecb9
Update data migration (#7455)
- Handle case with missing data
2024-06-17 08:16:56 +10:00
Oliver
946390a4a3
small code tweaks (#7454) 2024-06-16 23:38:33 +10:00
Oliver
79ea6897ea
Improve stock item tracking API query (#7451)
* Improve stock item tracking API query

- Cache related model lookups into single DB queries
- Significant improvements to query speed
- Ref: https://github.com/inventree/InvenTree/issues/7429

* Handle case where item does not exist in DB
2024-06-16 17:06:09 +10:00
Oliver
49f6981f46
Fix for gunicorn command (#7450)
* Fix for gunicorn command

* Allow override of worker count
2024-06-16 16:23:28 +10:00
Oliver
20e48e5f20
Small refactor for stock item post-save signals (#7449) 2024-06-16 12:36:15 +10:00
Oliver
2d234e2831
Allow build line list to be searched by IPN (#7442)
- Closes https://github.com/inventree/InvenTree/issues/7434
2024-06-14 23:22:29 +10:00
Oliver
f36534d558
New Crowdin updates (#7433)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.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 django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-14 19:52:19 +10:00
Matthias Mair
960c27b142
fix: Add installer check for python version (#7440)
* fix: Add installer check for python version

Closes #7439
Closes #7437
Closes #7377

* fix error message

* Add color
2024-06-14 08:25:58 +10:00
Oliver
129975adc6
Setting refactor (#7404)
* Add helper functions to set/get settings

* Refactor instances of get_setting

* UPdates

* Fix for task

* Add debug messages

- Work out what is going on in CI

* add more debug

- Cannot reproduce locally?

* More debug...

* Remove debug prints

* Add better debug msg

* Simplify unit test

* Increase timeout for plugin tests

* Update validator code
2024-06-13 12:14:43 +10:00
Oliver
4c7a74ef05
Fix for report migration (#7438)
- Check that non-nullable fields are not null
2024-06-13 11:34:58 +10:00
Michael
06ad599e90
Remove the New Stock Item button from Stock view in case the user has no Stock write mermission (#7435)
* Add location type to location overview

* Remove the New Stock Item button from Stock view in case the user has not rights

* Remove the New Stock Item button from Stock view in case the user has not rights
2024-06-13 10:55:59 +10:00
dependabot[bot]
4631c88a87
Bump braces from 3.0.2 to 3.0.3 in /src/frontend (#7430)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-12 09:14:24 +10:00
dependabot[bot]
3bedfad733
Bump eslint from 9.3.0 to 9.4.0 in /src/backend (#7395)
Bumps [eslint](https://github.com/eslint/eslint) from 9.3.0 to 9.4.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.3.0...v9.4.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-12 00:04:39 +10:00
dependabot[bot]
1a57973b4d
Bump the dependencies group across 1 directory with 3 updates (#7427)
Bumps the dependencies group with 3 updates in the / directory: [docker/login-action](https://github.com/docker/login-action), [docker/build-push-action](https://github.com/docker/build-push-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `docker/login-action` from 3.1.0 to 3.2.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](e92390c5fb...0d4c9c5ea7)

Updates `docker/build-push-action` from 5.3.0 to 5.4.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](2cdde995de...ca052bb54a)

Updates `github/codeql-action` from 3.25.6 to 3.25.8
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](9fdb3e4972...2e230e8fe0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github/codeql-action
  dependency-type: direct:production
  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-06-11 23:30:09 +10:00
Oliver
c834759f07
Adds support for Romanian locale tranaslations (#7428) 2024-06-11 12:03:46 +10:00
Oliver
9962d85570
[plugins] allow static files for plugins (#7425)
* Add 'clear' option to 'invoke static'

* Add functions for copying static files from installed plugins

* Collect plugin static files as part of 'invoke static'

* Add 'activate' method for PluginConfig

* Run as part of `invoke plugins`
2024-06-10 21:05:40 +10:00
Oliver
66b2976d33
New Crowdin updates (#7424)
* 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

* 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-06-10 15:41:36 +10:00
Oliver
713d2ac925
Mantine charts (#7419)
* Install @mantine/charts

* Import charts styles

* Refactor <PricingOverviewPanel />

* Refactor internal price panel

* Refactor variant price panel

* BOM bar chart

* BOM donut

* Refactor supplier pricing panel

* More refaactoring

* Cleanup unused imports

* Fix typo

* playwright test updates
2024-06-10 08:24:38 +10:00
Oliver
9f35971db1
Stock SKU export (#7418)
* Add "choices" field to PartTestTemplate

- Will allow validation of "value" field on StockItemTestResult

* Run validation against StockItemTestResult

* Export SKU in stock item resource
2024-06-08 14:33:30 +10:00
Oliver
a90b05add5
Test result choices (#7417)
* Add "choices" field to PartTestTemplate

- Will allow validation of "value" field on StockItemTestResult

* Run validation against StockItemTestResult

* Expose 'choices' to serializer

* Update unit test

* Add unit test for test result validation

* Add 'choices' field for CUI forms

* Add "choices" field to PUI form

* Add 'choices' column to PartTestTemplateTable

* memoize stockitemtestresult fields

- Adjust field type of "value" field based on template choices

* Bump API version
2024-06-08 11:21:27 +10:00
Oliver
bae5dcdbdc
New Crowdin updates (#7394)
* 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 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

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.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-06-08 10:17:24 +10:00
Oliver
8f3a8b0f7e
Panel placeholders (#7405)
* PanelType.content is now required

* Make panel content non-optional

- Makes it easier to see which panels still need to be implemented

* Implement a panel
2024-06-08 10:17:12 +10:00
Matthias Mair
6b11c940bb
Provide setup keys for two-factor authentication alongside QR codes (#7406)
* Bump word-wrap from 1.2.3 to 1.2.4

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

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

* Bump pillow from 9.5.0 to 10.0.1 (#8)

Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.5.0 to 10.0.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.5.0...10.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* added coveralls report

* jsut do it

* Revert "jsut do it"

This reverts commit da27a34c885ec6292e0cac1133f873debaaaa49e.

* fix reqs

* Bump cryptography from 41.0.5 to 41.0.6 (#14)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump jinja2 from 3.1.2 to 3.1.3 (#17)

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>

* Bump vite from 4.4.11 to 4.5.2 in /src/frontend (#18)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.11 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>

* Bump pillow from 10.1.0 to 10.2.0 (#19)

Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.1.0...10.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump cryptography from 41.0.6 to 42.0.0 (#20)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump django from 3.2.23 to 3.2.24 (#21)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump cryptography from 42.0.0 to 42.0.2 (#22)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [FR] Provide setup keys for two-factor authentication alongside QR codes
Fixes #6132

* add margin

---------

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>
2024-06-08 09:21:41 +10:00
Oliver
3ecbd64bf7
Null url fix (#7408)
* RelatedModelField fix

Handle edge case where URL evaluates as null

* Handle undefined field
2024-06-05 10:40:05 +10:00
Matthias Mair
7b179aaf95
[Docs] Add more info on branching (#7407)
* Add some docs regarding branching
https://github.com/inventree/org/issues/45

* remove refs to release candiate branches

* Update docs/docs/develop/contributing.md

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

---------

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
2024-06-05 07:31:29 +10:00
Oliver
2b8e8e52a8
[PUI] Notes editor (#7284)
* Install mdxeditor

* Setup basic toolbar

* Refactoring

* Add placeholder for image upload

* Add fields to link uploaded notes to model instances

* Add custom delete method for InvenTreeNotesMixin

* Refactor CUI notes editor

- Upload model type and model ID information

* Enable image uplaod for PUI editor

* Update <NotesEditor> component

* Fix import

* Add button to save notes

* Prepend the host name to relative image URLs

* Disable image resize

* Add notifications

* Add playwright tests

* Enable "read-only" mode for notes

* Typo fix

* Styling updates to the editor

* Update yarn.lock

* Bump API version

* Update migration

* Remove duplicated value

* Improve toggling between edit mode

* Fix migration

* Fix migration

* Unit test updates

- Click on the right buttons
- Add 'key' properties

* Remove extraneous key prop

* fix api version

* Add custom serializer mixin for 'notes' field

- Pop the field for 'list' endpoints
- Keep for detail

* Update to NotesEditor

* Add unit test
2024-06-04 21:53:44 +10:00
Oliver
a5fa5f8ac3
Currency format fix (#7398)
* Fix for currency rendering

- Handle case where max digits less than min digits

* Add validators for settings
2024-06-04 10:44:59 +10:00
Oliver
0cb762d6b2
Global Cache Fix (#7393)
* Adjust situations in which cache is disabled

- Prevent cache when running a number of housekeeping commands

* Add 'spectacular' to list of excluded commands

* Generate codes as list

- Ensure consistent ordering (for CI)

* Debug currency codes list

* Bump API version
2024-06-03 21:38:47 +10:00
Oliver
e83feb9414
Currency setting (#7390)
* Add new global setting for currency options

- Moving away from external configuration
- Refactor currency support code into new file

* Refactoring

- Move functions into currency.py

* Limit choices for default currency

* Improve validation

* Adds data migration for existing currency selection

* Docs updates

* Remove currency config from external settings

* bump api version

* Add debug message

* Add unit tests

* Fix after_change_currency func

* Fix after_change_currency func

* Revert change to after_chance_currency

* Revert other change
2024-06-03 12:53:30 +10:00
Oliver
7108bc48bd
Template permission fix (#7391)
* Update API permissions for report templates

- Allow reading for any authenticated user
- Write permissions for staff users

* Update unit tests
2024-06-03 12:05:09 +10:00
Oliver
cdac7465b2
Cache updates (#7388)
* Add redis container to development setup

* Improve configurability of global cache:

- Push configuration into separate file

* Settings cache default depends on global cache configuration

* Update docker compose file

* Remove debug flag

* Allow caching for registry checks

* Cleanup docstring

* Adjust defautl behaviour

* Update docs for caching

* Adjust default docker compose file

* Update docs for devcontainer

* Cleanup config template file

* Update docker docs

* Update cache behaviour
2024-06-02 21:43:31 +10:00
Oliver
df619ec17d
New Crowdin updates (#7382)
* updated translation base

* 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-06-02 10:05:35 +10:00
Oliver
80c317435b
Fix parameter dialog for parametericparttable (#7380) 2024-05-31 17:07:22 +10:00
Oliver
dc8d77bdea
Migration fix (#7379)
- Handle missing template file
2024-05-31 17:07:12 +10:00
Oliver
74f4b85dfd
Update link for mobile app docs (#7378) 2024-05-31 17:06:12 +10:00
Oliver
9fa2735f7a
Catch edge case for merge_stock_items: (#7373)
* Catch edge case for merge_stock_items:

- Use current location as backup
- Handle null location

* Fix deltas
2024-05-30 20:03:16 +10:00
Oliver
798c0ed322
PO shipped complete (#7367)
* Add new setting to bypass "shipped" status

* Bypass "shipped" status optionally

* Update setting description string

* Update unit tests

* Refactor location of status_codes

* Link source code into docs

* Add stock status codes

* And the build order too

* Fix import
2024-05-30 12:44:57 +10:00
Oliver
fb193cae3d
Query count test (#7157)
* Enforce query count middleware for testing

* Cache "DISPLAY_FULL_NAMES" setting

- Much better API performance

* Update unit_test.py

- Add default check for max query count

* Rework unit_test.py

- x-django-query-count header does not get passed through testing framework

* Adjust middleware settings

* Fix debug print

* Refactoring unit_test.py

* Adjust defaults

* Increase default query threshold

- We can work to reduce this further

* Remove outdated comment

* Install django-middleware-global-request

- Makes the request object globally available
- Cache plugin information against it

* Cache "plugins_checked" against global request

- reduce number of times we need to recalculate plugin data

* Cache plugin information to the request

- Prevent duplicate reloads if not required

* Simplify caching of settings

* Revert line

* Allow higher default counts for POST requests

* Remove global request middleware

- Better to implement proper global cache

* increase CI query thresholds

* Fix typo

* API updates

* Unit test updates

* Increase default MAX_QUERY_TIME

* Increase max query time for plugin functions

* Cleanup barcode unit tests

* Fix part test

* Update more tests

* Further unit test updates

* Updates for unit test code

* Fix for unit testing framework

* Fix

* Reduce default query time

* Increase time allowance
2024-05-29 13:18:33 +10:00
Oliver
c196511327
Update mantine components (#7369) 2024-05-28 20:35:50 +10:00
Oliver
4cf395c06f
Add new "available" badge to stock page (#7368) 2024-05-28 17:01:21 +10:00
Oliver
f3223c6d7f
[PUI] Mantine tree (#7357)
* Refactor part category tree

- New "NavigationTree" using native mantine components
- Make it generic, too

* Replace existing <StockLocationTree /> component

* Adjust API filtering for location tree endpoint

* Added playwright tests

* Update api filter classes

* Fix for DetailsImage

- Update to @mantine/core had changed the <AspectRatio> component

* fix for identifierString function

* Adjust playwright tests
2024-05-28 14:24:21 +10:00
Oliver
c90ee43808
New Crowdin updates (#7356)
* 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 messages.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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-28 14:19:48 +10:00
Oliver
30e1924e8e
Add option to hide active sessions from settings panel (#7366) 2024-05-28 09:35:01 +10:00
Oliver
5577a086c9
Plugin reload fix (#7361)
- call registry.check_reload when registering an event
- ensure that latest versions of plugins are loaded
2024-05-28 01:06:08 +10:00
Oliver
eb3c8dd255
Handle case where serializer does not have 'Meta' class (#7360) 2024-05-28 00:34:59 +10:00
Oliver
b7b666b7f0
Include "config template" in docs (#7355)
- Extract data from file
- Add in "collapse" section
- Cleanup template file
2024-05-27 22:25:23 +10:00
Oliver
89cea3045a
[PUI] Open links in new window (#7354)
* Breadcrumbs can be opened in a new tab

* Support tab nav for top header items

* Open panel tab in new window
2024-05-27 21:31:08 +10:00
Oliver
b402836dc4
Label printing bug fixes (#7329)
* Hide printing actions button for top level stock location

* Fix typo

* Add another check for null

* Remove debug statement

* Prevent display of multiple form-error notifications

* Fix pickling for print offloading

* Reset selected plugin

* Exclude the entire 'context' object when pickling a printing job
2024-05-27 09:12:29 +00:00
Oliver
9047e325a9
Bug fix for label printing with plugin on CUI (#7324)
* Bug fix for label printing with plugin on CUI

- Missed edge case in recent refactor

* Fix typo

* Support non-pk fields

* fix a number of typos

* js fixes
2024-05-27 19:08:19 +10:00
Matthias Mair
bdebf878c3
Fixes for installer (#7344)
* - move reqs file to contrib
- detect previously used python version
- safe extra requirements to INSTALLER_EXTRA

* add missing fi

* move site setting
2024-05-27 17:49:05 +10:00
Oliver
bda237a13f
Fix for 'restore' command (#7348)
- Fix typo
2024-05-27 17:07:57 +10:00
Oliver
ea6bdd3ca6
Updates for metadata information (#7343)
* Updates for metadata information

- Override 'label' values with 'verbose_name' values
- Only if 'label' is *not* translated, but 'verbose_name' is
- Allows the translated model fields name to be pushed through to the metadata framework

* Remove unused import

* Add unit testing for metadata lookup

* Update serializer: allow 'category' to be blank

* Bump API version

* Fix for unit test
2024-05-27 16:55:08 +10:00
Oliver
797a0c10df
Docs code links (#7342)
* Update docs

- Add note about permission denied error

* Add macro for generating link to github code

* Implement similar feature for source directory links

* Adds helper function for link checking

* Allow for specification of "raw" file links

* Remove debug statement

* Generate list of available invoke tasks
2024-05-26 22:09:08 +10:00
Oliver
9f95dbed94
New Crowdin updates (#7333)
* updated translation base

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-26 21:43:47 +10:00
Oliver
5f9348f56d
Update docs (#7339)
- Add note about permission denied error
2024-05-26 21:43:12 +10:00
Oliver
e8e64616da
PUI: Don't load stock test results for non-trackable part (#7327) 2024-05-26 20:50:18 +10:00
Oliver
0c56bd8dfa
Handle exception on migration (#7322)
* Handle exception on migration

* Make migration non-atomic
2024-05-24 23:31:23 +10:00
Matthias Mair
0e1b78d88b
Merge pull request from GHSA-2crp-q9pc-457j
* ensure API login only works if mfa is not required

* add migration to log out users

* add migration to clear users
2024-05-24 21:24:24 +10:00
Zanie Blue
ed1717942d
Use UV_SYSTEM_PYTHON to allow the system Python interpreter instead of VIRTUAL_ENV (#7317) 2024-05-24 13:42:09 +10:00
Oliver
0d46af7a74
Add Meta subclass for build serializers (#7315)
Ref: https://github.com/inventree/InvenTree/discussions/7314
2024-05-24 09:13:57 +10:00
Oliver
2fafb7f21c
Add clearer error message for invalid SITE_URL (#7311) 2024-05-23 23:39:25 +10:00
Oliver
f2ab3bdca2
New Crowdin updates (#7310)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.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-05-23 23:39:12 +10:00
Oliver
bc566c513f
Fix sales order shipment / completed buttons (#7305)
* Fix sales order shipment / completed buttons

- Template logic needed tweaks

* Adjust logic for completing a sales order

* Tweak UV version

- Trying to get CI to run properly

* Pin version

* Ignore uv

* Cleanup

* Fix another --uv command
2024-05-23 21:24:38 +10:00
dependabot[bot]
b36bd5c35d
Bump requests from 2.32.1 to 2.32.2 in /.github (#7295)
* ---
updated-dependencies:
- dependency-name: requests
  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>
2024-05-22 17:01:48 +10:00
Oliver
afa4bb5b96
[PUI] Dynamic PartParameter field (#7298)
* Add 'adjustValue' callback for form field

* Cast checkbox values to boolean

* Call "onChange" callbacks

* Implement dynamic "data" field for PartParameter dialog

- Type of field changes based on selected template

* Add playwright unit tests

* Add labels to table row actions

* linting fixes

* Adjust playwright tests
2024-05-22 15:24:35 +10:00
Oliver
190c100fcb
Add initial part data to manufacturer part table (#7299) 2024-05-22 15:24:20 +10:00
Oliver
cc423e9143
Report Migration Fix (#7296)
* Fix "unique" attribute on "name" field in ReportTemplate

- Already covered by "unique_together"

* Fix label migration file
2024-05-22 11:16:00 +10:00
Oliver
aa39582d89
Report printing refactor (#7074)
* Adds a new "generic" ReportTemplate model

* expose API endpoints

* Update model / migrations / serializer

* Add new mixin class to existing database models

* - Add detail view for report template
- Revert filters field behaviour

* Filter report list by provided item IDs

- Greatly simplify filtering logic compared to existing implemetation
- Expose to API schema

* Create data migration for converting *old* report templates

* Ignore internal reports for data migration

* Add report mixin to StockLocation model

* Provide model choices in admin interface

* Offload context data generation to the model classes

* Remove old report template models

* Refactor JS code in CUI

* Fix for API filtering

* Add data migration to delete old models

* Remove dead URL

* Updates

* Construct sample report templates on app start

* Bump API version

* Typo fix

* Fix incorrect context calls

* Add new LabelTemplate model

- ReportTemplate and LabelTemplate share common base
- Refactor previous migration

* Expose to admin interface

* Add in extra context from existing label models

* Add migration to create LabelTemplate instances from existing labels

* Add API endpoints for listing and updating LabelTemplate objects

* Adjust 'upload_to' path

* Refactor label printing

* Move default label templates

* Update API endpoints

* Update migrations

* Handle LookupError in migration

* Redirect the "label" API endpoint

* Add new model for handling result of template printing

* Refactor LabelPrinting mixin

* Unlink "labels" app entirely

* Fix typo

* Record 'plugin' used to generate a particular output

* Fix imports

* Generate label print response

- Still not good yet

* Refactoring label printing in CUI

* add "items" count to TemplateOutput model

* Fix for InvenTreeLabelSheetPlugin

* Remove old "label" app

* Make request object optional

* Fix filename generation

* Add help text for "model_type"

* Simplify TemplateTable

* Tweak TemplateTable

* Get template editor to display template data again

* Stringify template name

- Important, otherwise you get a TypeError instead of TemplateDoesNotExist

* Add hooks to reset plugin state

* fix context for StockLocation model

* Tweak log messages

* Fix incorrect serializer

* Cleanup TemplateTable

* Fix broken import

* Filter by target model type

* Remove manual file operations

* Update old migrations

- Remove references to functions that no longer exist

* Refactor asset / snippet uploading

* Update comments

* Retain original filename when editing templatese

* Cleanup

* Refactor model type filter to use new hook

* Add placeholder actions for printing labels and reports

* Improve hookiness

* Add new ReportOutput class

* Report printing works from PUI now!

* More inspired filename pattern for generated reports

* Fix template preview window

- Use new "output" response field across the board

* Remove outdated task

* Update data migration to use raw SQL

- If the 'labels' app is no longer available, this will fail
- So, use raw SQL instead

* Add more API endpoint defs

* Adds placeholder API endpoint for label printing

* Expose plugin field to the printing endpoint

* Adds plugin model type

* Hook to print labels

* Refactor action dropdown items

* Refactor report printing for CUI

* Refactor label print for CUI

- Still needs to handle custom printing options for plugin

* Fix migration

* Update ModelType dict

* playwright test fix

* Unit test fixes

* Fix model ruleset associations

* Fix for report.js

* Add support for "dynamic" fields in metadata.py

* Add in custom fields based on plugin

* Refactoring

* Reset plugin on form close

* Set custom timeout values

* Update migration

- Not atomic

* Cleanup

* Implement more printing actions

* Reduce timeout

* Unit test updates

* Fix part serializers

* Label printing works in CUI again

* js linting

* Update <ActionDropdown>

* Fix for label printing API endpoint

* Fix filterselectdrawer

* Improve button rendering

* Allow printing from StockLocationTable

* Add aria-labels to modal form fields

* Add test for printing stock item labels from table

* Add test for report printing

* Add unit testing for report template editing / preview

* Message refactor

* Refactor InvenTreeReportMixin class

* Update playwright test

* Update 'verbose_name' for a number of models

* Additional admin filtering

* Playwright test updates

* Run checks against new python lib branch

(temporary, will be reverted)

* remove old app reference

* fix testing ref

* fix app init

* remove old tests

* Revert custom target branch

* Expose label and report output objects to API

* refactor

* fix a few tests

* factor plugin_ref out

* fix options testing

* Update table field header

* re-enable full options testing

* fix missing plugin matching

* disable call assert

* Add custom related field for PluginConfig

- Uses 'key' rather than 'pk'
- Revert label print plugin to use slug

* Add support for custom pk field in metadata

* switch to labels for testing

* re-align report testing code

* disable version check

* fix url

* Implement lazy loading

* Allow blank plugin for printing

- Uses the builtin label printer if not specified

* Add printing actions for StockItem

* Fix for metadata helper

* Use key instead of pk in printing actions

* Support non-standard pk values in RelatedModelField

* pass context data to report serializers

* disable template / item discovery

* fix call

* Tweak unit test

* Run python checks against specific branch

* Add task for running docs server

- Option to compile schema as part of task

* Custom branch no longer needed

* Starting on documentation updates

* fix tests for reports

* fix label testing

* Update template context variables

* Refactor report context documentation

* Documentation cleanup

* Docs cleanup

* Include sample report files

* Fix links

* Link cleanup

* Integrate plugin example code into docs

* Code cleanup

* Fix type annotation

* Revert deleted variable

* remove templatetype

* remove unused imports

* extend context testing

* test if plg can print

* re-enable version check

* Update unit tests

* Fix test

* Adjust unit test

* Add debug statement to test

* Fix unit test

- Labels get printed against LabelTemplate items, duh

* Unit test update

* Unit test updates

* Test update

* Patch fix for <PartColumn> component

* Fix ReportSerialierBase class

- Re-initialize field options if not already set

* Fix unit test for sqlite

* Fix kwargs for non-blocking label printing

* Update playwright tests

* Tweak unit test

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-05-22 10:17:01 +10:00
dependabot[bot]
d99b6ae81b
Bump requests from 2.31.0 to 2.32.1 in /.github (#7282)
* ---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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>
2024-05-22 09:39:02 +10:00
dependabot[bot]
38a96e0352
Bump requests from 2.31.0 to 2.32.0 in /src/backend (#7283)
* ---
updated-dependencies:
- dependency-name: requests
  dependency-type: indirect
...

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-05-22 09:38:55 +10:00
Oliver
8df04cb916
Test result table tweaks (#7290)
* Update initialData for new build output

* Table updates
2024-05-22 09:30:14 +10:00
dependabot[bot]
acdf7f5ec0
Bump mkdocstrings[python] from 0.25.0 to 0.25.1 in /docs (#7212)
* Bump mkdocstrings[python] from 0.25.0 to 0.25.1 in /docs

Bumps [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) from 0.25.0 to 0.25.1.
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.25.0...0.25.1)

---
updated-dependencies:
- dependency-name: mkdocstrings[python]
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* fix req

* bump rest of docs reqs

* group dependabot settings

---------

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-05-22 09:29:51 +10:00
Oliver
bb93c915ee
Performance improvement for notifications API endpoint (#7154)
* Prefecth notifications queryset

* Apply prefetch to detail endpoint also

* Improve prefetch fields
2024-05-21 22:24:33 +10:00
Oliver
76b298c43e
[PUI] StockTrackingTable (#7273)
* Bare bones <StockTrackingTable /> component

* Implement details panel for StockTrackingTable

* Remove unused userState hook

* Expand RenderInstance to include link

* Allow inline renderers to display links
2024-05-21 21:06:02 +10:00
Oliver
c1def12203
Add documentation on 'validate_model_deletion' (#7280)
* Add documentation on 'validate_model_deletion'

* Update code inclusion

* Set type annotation

* docstring updates

* Cleanup

* Hide summary

* Remove duplicated code
2024-05-21 18:50:56 +10:00
dependabot[bot]
1328c3d103
--- (#7274)
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 15:10:22 +10:00
dependabot[bot]
1c6e81eae5
--- (#7276)
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github/codeql-action
  dependency-type: direct:production
  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-05-21 15:10:06 +10:00
Oliver
921bf91500
Fix wrapping for <AttachmentLink /> (#7272) 2024-05-21 09:07:06 +10:00
Oliver
e93d9c4a74
Batch code generation (#7000)
* Refactor framework for generating batch codes

- Provide additional kwargs to plugin
- Move into new file
- Error handling

* Implement API endpoint for generating a new batch code

* Fixes

* Refactor into stock.generators

* Fix API endpoint

* Pass time context through to plugins

* Generate batch code when receiving items

* Create useGenerator hook

- Build up a dataset and query server whenever it changes
- Look for result in response data
- For now, just used for generating batch codes
- may be used for more in the future

* Refactor PurchaseOrderForms to use new generator hook

* Refactor StockForms implementation

* Remove dead code

* add OAS diff

* fix ref

* fix ref again

* wrong branch, sorry

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

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

* Bump API version

* Do not override batch code if already generated

* Add serial number generator

- Move to /generate/ API endpoint
- Move batch code generator too

* Update PUI endpoints

* Add debouncing to useGenerator hook

* Refactor useGenerator func

* Add serial number generator to stock form

* Add batch code genereator to build order form

* Update buildfields

* Use build batch code when creating new output

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
2024-05-20 23:56:45 +10:00
Oliver
5cb61d5ad0
Update part filters (#7264)
* Expose filter for "bom_valid" status

* Expose part filter for "starred" status

* Bump API version

* Add simple unit test

* Add unit test for "starred" filtering
2024-05-20 20:24:20 +10:00
Oliver
2ebe785a75
Remove dead code (#7265)
* Remove dead code

- Previously custom LIST was required
- Improvements render this unnecessary now

* Remove unused imports
2024-05-20 19:30:35 +10:00
Philipp Fruck
442bb73262
Docs: Update plugins and compose (#7263)
* docs: Update docker compose dev setup

* docs: Fix example plugin date

Date must be iso formatted, otherwise exception is raised

* docs: Update plugin paths to new folder structure

* docs: fix typo, remove temporary containers afterwards
2024-05-20 14:02:27 +10:00
Oliver
c540b12c97
Prevent deletion of part which is used in an assembly (#7260)
* Prevent deletion of part which is used in an assembly

* add 'validate_model_deletion' option to ValidationMixin plugun

* Add global setting to control part delete behaviour

* Update settings location

* Unit test updates

* Further unit test updates

* Fix typos
2024-05-20 12:51:56 +10:00
Philipp Fruck
b26640fb36
fix: SELinux labels for Caddyfile (#7261) 2024-05-20 07:56:31 +10:00
Oliver
e4dedb63f4
Plugin setting fix (#7258)
* Fix CUI URLs

* Fix for plugin setting API

- Fix conflict between "key" for PluginConfig and "key" for setting
- Needs to be "plugin" for plugin lookup, which accesses the "key" field in the PluginConfig model

* Fix for editing setting in PUI

* Add 'r' back in

* Remove debug code

* Update unit tests

* Bump API version

* Another unit test fix
2024-05-19 18:00:26 +10:00
Oliver
2431fc6d58
Fix for email template (#7249)
- Use `line.part` instead of `part`
2024-05-17 13:31:02 +10:00
Oliver
dc741b6183
Admin tweaks (#7248)
* Update admin site

- Implement 'autocomplete' for more fields
- Improves admin loading time

* Add "admin" buttons to the PUI interface

* Only allow superuser access
2024-05-17 12:25:47 +10:00
Oliver
acb1ec4c83
[PUI] Column Refactoring (#7242)
* Refactor column helpers

* Make reference column switchable in BomTable

* Make 'accessor' a required field againt

* Update props

* Fix c0d3
2024-05-17 11:38:55 +10:00
Oliver
2a83c19208
[PUI] Attachment table fix (#7232)
* Use modal hook for creating new attachments

* Add "edit" and "delete" modals for attachment table

* Fix for drag-and-drop zone

- Update to match mantine v7

* Fix link clicking

* Fix call to cancelEvent

* Add placeholder for more unit tests
2024-05-16 12:34:44 +10:00
Simon Quigley
e8f8f3b3ec
Add support for a Completed status (Fixes: #6434) (#6449)
* Add support for a Completed status (Fixes: #6434)

* Remove unnecessary validator

* Update sales order tests for the new model functions
2024-05-16 12:30:29 +10:00
Oliver
b7b320cf61
[PUI] Refactoring forms (#7239)
* Refactor "plugin activate" dialog

- Use hooked modal

* Remove actions from drawer

- Used dynamic modal code which is super buggy

* Update plugin drawer / table

* Refactor settings management:

- Use proper hooked form
- Reduce code duplication
- Run single callback for each <SettingList>

* Add error boundary

* Update ErrorTable

- Use useDeleteApiFormModal

* Refactor ManufacturerPartParameter table

- Use hooked modals

* Refactor existing tables

- Pass table state to forms

* Ensure table is reloaded

* Refactor ManufacturerPartTable

* Code cleanup

* More cleanup
2024-05-16 11:58:50 +10:00
Lukas
548ecf58a2
PUI location type (#7238)
* add location type to PUI

* fix add form bug where it contains the previous editing data when reusing the same fields

* fix sonarcloud issues
2024-05-16 08:57:11 +10:00
Michael
20dc0380bd
Add location type to location overview (#7202) 2024-05-16 08:35:32 +10:00
Oliver
516466bc50
[PUI] Test table tweaks (#7231)
* Adjust table columns

* Tweak for FilterSelectDrawer
2024-05-15 14:12:55 +10:00
Oliver
f8ef12f7bc
Plugin API lookup key (#7224)
* Lookup plugin by slug

- Adjust plugin API to use plugin key and not (variable) pk value

* Fix for plugin table in CUI (legacy interface)

* Fix API endpoint layout:

- Move special endpoints first
- Fix "metadata" endpoint
- Allow custom "lookup_field" attribute for MetadataView

* Add "active_plugins" count to RegistryStatusView

* Updates for PUI

- Plugin management now uses slug rather than pk

* Bump API version

* Remove unused code

* Adds index on 'key' field for PluginConfig model

* Fix URL structure

* Unit test updates

* Unit test updates

* More unit test fixes
2024-05-15 14:12:37 +10:00
Oliver
2265055785
Docker fix (#7228)
* Copy requirements file

* Test more files when building docker image

* Refactor install task

* Raise exception

* Run install task

* Fix typos

- The tests work!
2024-05-15 09:19:35 +10:00
Oliver
d99bc0bcf9
New Crowdin updates (#7206)
* 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

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.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-05-15 08:49:23 +10:00
Oliver
3eae5096e3
Fix permissions for release.yaml (#7220)
* Fix permissions for release.yaml

- 0.15.0 release currently borked

* Move permissions to individual job targets
2024-05-14 22:04:03 +10:00
Oliver
5c0cd23bed
Mark as 0.16.0 dev version (#7218) 2024-05-14 21:45:50 +10:00
917 changed files with 426433 additions and 261474 deletions

View File

@ -1,5 +1,3 @@
version: "3"
services: services:
db: db:
image: postgres:13 image: postgres:13
@ -13,6 +11,12 @@ services:
POSTGRES_USER: inventree_user POSTGRES_USER: inventree_user
POSTGRES_PASSWORD: inventree_password POSTGRES_PASSWORD: inventree_password
redis:
image: redis:7.0
restart: always
expose:
- 6379
inventree: inventree:
build: build:
context: .. context: ..
@ -31,6 +35,8 @@ services:
INVENTREE_DB_HOST: db INVENTREE_DB_HOST: db
INVENTREE_DB_USER: inventree_user INVENTREE_DB_USER: inventree_user
INVENTREE_DB_PASSWORD: inventree_password INVENTREE_DB_PASSWORD: inventree_password
INVENTREE_CACHE_HOST: redis
INVENTREE_CACHE_PORT: 6379
INVENTREE_PLUGINS_ENABLED: True INVENTREE_PLUGINS_ENABLED: True
INVENTREE_SITE_URL: http://localhost:8000 INVENTREE_SITE_URL: http://localhost:8000
INVENTREE_CORS_ORIGIN_ALLOW_ALL: True INVENTREE_CORS_ORIGIN_ALLOW_ALL: True

4
.github/FUNDING.yml vendored
View File

@ -1,5 +1,3 @@
github: inventree
ko_fi: inventree
patreon: inventree
polar: inventree polar: inventree
github: inventree
custom: [paypal.me/inventree] custom: [paypal.me/inventree]

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1 @@
blank_issues_enabled: false

View File

@ -13,5 +13,5 @@ runs:
invoke export-records -f data.json invoke export-records -f data.json
python3 ./src/backend/InvenTree/manage.py flush --noinput python3 ./src/backend/InvenTree/manage.py flush --noinput
invoke migrate invoke migrate
invoke import-records -f data.json invoke import-records -c -f data.json
invoke import-records -f data.json invoke import-records -c -f data.json

View File

@ -44,14 +44,20 @@ runs:
with: with:
python-version: ${{ env.python_version }} python-version: ${{ env.python_version }}
cache: pip cache: pip
cache-dependency-path: |
src/backend/requirements.txt
src/backend/requirements-dev.txt
contrib/container/requirements.txt
contrib/dev_reqs/requirements.txt
- name: Install Base Python Dependencies - name: Install Base Python Dependencies
if: ${{ inputs.python == 'true' }} if: ${{ inputs.python == 'true' }}
shell: bash shell: bash
run: | run: |
python3 -m pip install -U pip python3 -m pip install -U pip
pip3 install invoke wheel uv pip3 install -U invoke wheel
- name: Set the VIRTUAL_ENV variable for uv to work pip3 install 'uv<0.3.0'
run: echo "VIRTUAL_ENV=${Python_ROOT_DIR}" >> $GITHUB_ENV - name: Allow uv to use the system Python by default
run: echo "UV_SYSTEM_PYTHON=1" >> $GITHUB_ENV
shell: bash shell: bash
- name: Install Specific Python Dependencies - name: Install Specific Python Dependencies
if: ${{ inputs.pip-dependency }} if: ${{ inputs.pip-dependency }}
@ -82,7 +88,7 @@ runs:
# Invoke commands # Invoke commands
- name: Install dev requirements - name: Install dev requirements
if: ${{ inputs.dev-install == 'true' ||inputs.install == 'true' }} if: ${{ inputs.dev-install == 'true' || inputs.install == 'true' }}
shell: bash shell: bash
run: uv pip install --require-hashes -r src/backend/requirements-dev.txt run: uv pip install --require-hashes -r src/backend/requirements-dev.txt
- name: Run invoke install - name: Run invoke install
@ -92,4 +98,4 @@ runs:
- name: Run invoke update - name: Run invoke update
if: ${{ inputs.update == 'true' }} if: ${{ inputs.update == 'true' }}
shell: bash shell: bash
run: invoke update --uv run: invoke update --uv --skip-backup --skip-static

View File

@ -15,22 +15,11 @@ updates:
interval: weekly interval: weekly
- package-ecosystem: pip - package-ecosystem: pip
directory: /contrib/container directories:
schedule: - /contrib/container
interval: weekly - /docs
- /contrib/dev_reqs
- package-ecosystem: pip - /src/backend
directory: /docs
schedule:
interval: weekly
- package-ecosystem: pip
directory: /.github
schedule:
interval: weekly
- package-ecosystem: pip
directory: /src/backend
schedule: schedule:
interval: weekly interval: weekly
groups: groups:
@ -39,16 +28,9 @@ updates:
- "*" # Include all dependencies - "*" # Include all dependencies
- package-ecosystem: npm - package-ecosystem: npm
directory: /src/backend directories:
schedule: - /src/frontend
interval: weekly - /src/backend
groups:
dependencies:
patterns:
- "*" # Include all dependencies
- package-ecosystem: npm
directory: /src/frontend
schedule: schedule:
interval: weekly interval: weekly
groups: groups:

View File

@ -1,4 +0,0 @@
# Packages needed for CI/packages
requests==2.31.0
pyyaml==6.0.1
jc==1.25.2

View File

@ -71,7 +71,7 @@ def check_prohibited_tags(data):
for filename in pathlib.Path(js_i18n_dir).rglob('*.js'): for filename in pathlib.Path(js_i18n_dir).rglob('*.js'):
print(f"Checking file 'translated/{os.path.basename(filename)}':") print(f"Checking file 'translated/{os.path.basename(filename)}':")
with open(filename, 'r') as js_file: with open(filename, encoding='utf-8') as js_file:
data = js_file.readlines() data = js_file.readlines()
errors += check_invalid_tag(data) errors += check_invalid_tag(data)
@ -81,7 +81,7 @@ for filename in pathlib.Path(js_dynamic_dir).rglob('*.js'):
print(f"Checking file 'dynamic/{os.path.basename(filename)}':") print(f"Checking file 'dynamic/{os.path.basename(filename)}':")
# Check that the 'dynamic' files do not contains any translated strings # Check that the 'dynamic' files do not contains any translated strings
with open(filename, 'r') as js_file: with open(filename, encoding='utf-8') as js_file:
data = js_file.readlines() data = js_file.readlines()
invalid_tags = ['blocktrans', 'blocktranslate', 'trans', 'translate'] invalid_tags = ['blocktrans', 'blocktranslate', 'trans', 'translate']

View File

@ -20,9 +20,9 @@ for line in str(out.decode()).split('\n'):
if len(migrations) == 0: if len(migrations) == 0:
sys.exit(0) sys.exit(0)
print('There are {n} unstaged migration files:'.format(n=len(migrations))) print(f'There are {len(migrations)} unstaged migration files:')
for m in migrations: for m in migrations:
print(' - {m}'.format(m=m)) print(f' - {m}')
sys.exit(len(migrations)) sys.exit(len(migrations))

View File

@ -10,6 +10,7 @@ tagged branch:
""" """
import itertools
import json import json
import os import os
import re import re
@ -18,8 +19,11 @@ from pathlib import Path
import requests import requests
REPO = os.getenv('GITHUB_REPOSITORY', 'inventree/inventree')
GITHUB_API_URL = os.getenv('GITHUB_API_URL', 'https://api.github.com')
def get_existing_release_tags():
def get_existing_release_tags(include_prerelease=True):
"""Request information on existing releases via the GitHub API.""" """Request information on existing releases via the GitHub API."""
# Check for github token # Check for github token
token = os.getenv('GITHUB_TOKEN', None) token = os.getenv('GITHUB_TOKEN', None)
@ -28,9 +32,7 @@ def get_existing_release_tags():
if token: if token:
headers = {'Authorization': f'Bearer {token}'} headers = {'Authorization': f'Bearer {token}'}
response = requests.get( response = requests.get(f'{GITHUB_API_URL}/repos/{REPO}/releases', headers=headers)
'https://api.github.com/repos/inventree/inventree/releases', headers=headers
)
if response.status_code != 200: if response.status_code != 200:
raise ValueError( raise ValueError(
@ -50,6 +52,9 @@ def get_existing_release_tags():
print(f"Version '{tag}' did not match expected pattern") print(f"Version '{tag}' did not match expected pattern")
continue continue
if not include_prerelease and release['prerelease']:
continue
tags.append([int(x) for x in match.groups()]) tags.append([int(x) for x in match.groups()])
return tags return tags
@ -73,7 +78,7 @@ def check_version_number(version_string, allow_duplicate=False):
version_tuple = [int(x) for x in match.groups()] version_tuple = [int(x) for x in match.groups()]
# Look through the existing releases # Look through the existing releases
existing = get_existing_release_tags() existing = get_existing_release_tags(include_prerelease=False)
# Assume that this is the highest release, unless told otherwise # Assume that this is the highest release, unless told otherwise
highest_release = True highest_release = True
@ -84,12 +89,17 @@ def check_version_number(version_string, allow_duplicate=False):
if release > version_tuple: if release > version_tuple:
highest_release = False highest_release = False
print(f'Found newer release: {str(release)}') print(f'Found newer release: {release!s}')
return highest_release return highest_release
if __name__ == '__main__': if __name__ == '__main__':
# Ensure that we are running in GH Actions
if os.environ.get('GITHUB_ACTIONS', '') != 'true':
print('This script is intended to be run within a GitHub Action!')
sys.exit(1)
if 'only_version' in sys.argv: if 'only_version' in sys.argv:
here = Path(__file__).parent.absolute() here = Path(__file__).parent.absolute()
version_file = here.joinpath( version_file = here.joinpath(
@ -97,16 +107,18 @@ if __name__ == '__main__':
) )
text = version_file.read_text() text = version_file.read_text()
results = re.findall(r"""INVENTREE_API_VERSION = (.*)""", text) results = re.findall(r"""INVENTREE_API_VERSION = (.*)""", text)
# If 2. args is true lower the version number by 1
if len(sys.argv) > 2 and sys.argv[2] == 'true':
results[0] = str(int(results[0]) - 1)
print(results[0]) print(results[0])
exit(0) exit(0)
# GITHUB_REF_TYPE may be either 'branch' or 'tag' # GITHUB_REF_TYPE may be either 'branch' or 'tag'
GITHUB_REF_TYPE = os.environ['GITHUB_REF_TYPE'] GITHUB_REF_TYPE = os.environ['GITHUB_REF_TYPE']
# GITHUB_REF may be either 'refs/heads/<branch>' or 'refs/heads/<tag>' # GITHUB_REF may be either 'refs/heads/<branch>' or 'refs/heads/<tag>'
GITHUB_REF = os.environ['GITHUB_REF'] GITHUB_REF = os.environ['GITHUB_REF']
GITHUB_REF_NAME = os.environ['GITHUB_REF_NAME'] GITHUB_REF_NAME = os.environ['GITHUB_REF_NAME']
GITHUB_BASE_REF = os.environ['GITHUB_BASE_REF'] GITHUB_BASE_REF = os.environ['GITHUB_BASE_REF']
# Print out version information, makes debugging actions *much* easier! # Print out version information, makes debugging actions *much* easier!
@ -122,7 +134,7 @@ if __name__ == '__main__':
version = None version = None
with open(version_file, 'r') as f: with open(version_file, encoding='utf-8') as f:
text = f.read() text = f.read()
# Extract the InvenTree software version # Extract the InvenTree software version
@ -163,10 +175,7 @@ if __name__ == '__main__':
print(f"Version number '{version}' does not match tag '{version_tag}'") print(f"Version number '{version}' does not match tag '{version_tag}'")
sys.exit sys.exit
if highest_release: docker_tags = [version_tag, 'stable'] if highest_release else [version_tag]
docker_tags = [version_tag, 'stable']
else:
docker_tags = [version_tag]
elif GITHUB_REF_TYPE == 'branch': elif GITHUB_REF_TYPE == 'branch':
# Otherwise we know we are targeting the 'master' branch # Otherwise we know we are targeting the 'master' branch
@ -187,10 +196,13 @@ if __name__ == '__main__':
print(f"Version check passed for '{version}'!") print(f"Version check passed for '{version}'!")
print(f"Docker tags: '{docker_tags}'") print(f"Docker tags: '{docker_tags}'")
target_repos = [REPO.lower(), f'ghcr.io/{REPO.lower()}']
# Ref: https://getridbug.com/python/how-to-set-environment-variables-in-github-actions-using-python/ # Ref: https://getridbug.com/python/how-to-set-environment-variables-in-github-actions-using-python/
with open(os.getenv('GITHUB_ENV'), 'a') as env_file: with open(os.getenv('GITHUB_ENV'), 'a', encoding='utf-8') as env_file:
# Construct tag string # Construct tag string
tags = ','.join([f'inventree/inventree:{tag}' for tag in docker_tags]) tag_list = [[f'{r}:{t}' for t in docker_tags] for r in target_repos]
tags = ','.join(itertools.chain(*tag_list))
env_file.write(f'docker_tags={tags}\n') env_file.write(f'docker_tags={tags}\n')

View File

@ -30,7 +30,7 @@ jobs:
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:

View File

@ -39,7 +39,7 @@ jobs:
docker: ${{ steps.filter.outputs.docker }} docker: ${{ steps.filter.outputs.docker }}
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3.0.2
id: filter id: filter
with: with:
@ -66,14 +66,14 @@ jobs:
steps: steps:
- name: Check out repo - name: Check out repo
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Set Up Python ${{ env.python_version }} - name: Set Up Python ${{ env.python_version }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # pin@v5.1.0 uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # pin@v5.1.1
with: with:
python-version: ${{ env.python_version }} python-version: ${{ env.python_version }}
- name: Version Check - name: Version Check
run: | run: |
pip install --require-hashes -r .github/requirements.txt pip install --require-hashes -r contrib/dev_reqs/requirements.txt
python3 .github/scripts/version_check.py python3 .github/scripts/version_check.py
echo "git_commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV echo "git_commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "git_commit_date=$(git show -s --format=%ci)" >> $GITHUB_ENV echo "git_commit_date=$(git show -s --format=%ci)" >> $GITHUB_ENV
@ -85,12 +85,17 @@ jobs:
docker run --rm inventree-test invoke --list docker run --rm inventree-test invoke --list
docker run --rm inventree-test gunicorn --version docker run --rm inventree-test gunicorn --version
docker run --rm inventree-test pg_dump --version docker run --rm inventree-test pg_dump --version
docker run --rm inventree-test test -f /home/inventree/init.sh
docker run --rm inventree-test test -f /home/inventree/tasks.py
docker run --rm inventree-test test -f /home/inventree/gunicorn.conf.py
docker run --rm inventree-test test -f /home/inventree/src/backend/requirements.txt
docker run --rm inventree-test test -f /home/inventree/src/backend/InvenTree/manage.py docker run --rm inventree-test test -f /home/inventree/src/backend/InvenTree/manage.py
- name: Build Docker Image - name: Build Docker Image
# Build the development docker image (using docker-compose.yml) # Build the development docker image (using docker-compose.yml)
run: docker compose --project-directory . -f contrib/container/dev-docker-compose.yml build --no-cache run: docker compose --project-directory . -f contrib/container/dev-docker-compose.yml build --no-cache
- name: Update Docker Image - name: Update Docker Image
run: | run: |
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run inventree-dev-server invoke install
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run inventree-dev-server invoke update docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run inventree-dev-server invoke update
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run inventree-dev-server invoke setup-dev docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run inventree-dev-server invoke setup-dev
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml up -d docker compose --project-directory . -f contrib/container/dev-docker-compose.yml up -d
@ -110,39 +115,40 @@ jobs:
- name: Run Unit Tests - name: Run Unit Tests
run: | run: |
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> contrib/container/docker.dev.env echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> contrib/container/docker.dev.env
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run inventree-dev-server invoke test --disable-pty docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run --rm inventree-dev-server invoke test --disable-pty
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run inventree-dev-server invoke test --migrations --disable-pty - name: Run Migration Tests
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml down run: |
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run --rm inventree-dev-server invoke test --migrations
- name: Clean up test folder - name: Clean up test folder
run: | run: |
rm -rf InvenTree/_testfolder rm -rf InvenTree/_testfolder
- name: Set up QEMU - name: Set up QEMU
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # pin@v3.0.0 uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # pin@v3.2.0
- name: Set up Docker Buildx - name: Set up Docker Buildx
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # pin@v3.3.0 uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # pin@v3.6.1
- name: Set up cosign - name: Set up cosign
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # pin@v3.5.0 uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # pin@v3.6.0
- name: Check if Dockerhub login is required - name: Check if Dockerhub login is required
id: docker_login id: docker_login
run: | run: |
if [ -z "${{ secrets.DOCKER_USERNAME }}" ]; then if [ -z "${{ secrets.DOCKER_USERNAME }}" ]; then
echo "skip_dockerhub_login=true" >> $GITHUB_ENV echo "skip_dockerhub_login=true" >> $GITHUB_OUTPUT
else else
echo "skip_dockerhub_login=false" >> $GITHUB_ENV echo "skip_dockerhub_login=false" >> $GITHUB_OUTPUT
fi fi
- name: Login to Dockerhub - name: Login to Dockerhub
if: github.event_name != 'pull_request' && steps.docker_login.outputs.skip_dockerhub_login != 'true' if: github.event_name != 'pull_request' && steps.docker_login.outputs.skip_dockerhub_login != 'true'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # pin@v3.1.0 uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pin@v3.3.0
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log into registry ghcr.io - name: Log into registry ghcr.io
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # pin@v3.1.0 uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pin@v3.3.0
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
@ -160,7 +166,7 @@ jobs:
- name: Push Docker Images - name: Push Docker Images
id: push-docker id: push-docker
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # pin@v5.3.0 uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # pin@v6.7.0
with: with:
context: . context: .
file: ./contrib/container/Dockerfile file: ./contrib/container/Dockerfile

View File

@ -10,11 +10,9 @@ on:
env: env:
python_version: 3.9 python_version: 3.9
node_version: 18 node_version: 20
# The OS version must be set per job # The OS version must be set per job
server_start_sleep: 60 server_start_sleep: 60
requests_version: 2.31.0
pyyaml_version: 6.0.1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INVENTREE_DB_ENGINE: sqlite3 INVENTREE_DB_ENGINE: sqlite3
@ -40,7 +38,7 @@ jobs:
force: ${{ steps.force.outputs.force }} force: ${{ steps.force.outputs.force }}
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3.0.2
id: filter id: filter
with: with:
@ -72,7 +70,7 @@ jobs:
needs: ["pre-commit"] needs: ["pre-commit"]
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:
@ -94,9 +92,9 @@ jobs:
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.frontend == 'true' || needs.paths-filter.outputs.force == 'true' if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.frontend == 'true' || needs.paths-filter.outputs.force == 'true'
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Set up Python ${{ env.python_version }} - name: Set up Python ${{ env.python_version }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # pin@v5.1.0 uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # pin@v5.1.1
with: with:
python-version: ${{ env.python_version }} python-version: ${{ env.python_version }}
cache: "pip" cache: "pip"
@ -104,7 +102,7 @@ jobs:
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # pin@v3.0.1 uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # pin@v3.0.1
- name: Check Version - name: Check Version
run: | run: |
pip install --require-hashes -r .github/requirements.txt pip install --require-hashes -r contrib/dev_reqs/requirements.txt
python3 .github/scripts/version_check.py python3 .github/scripts/version_check.py
mkdocs: mkdocs:
@ -115,14 +113,14 @@ jobs:
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Set up Python ${{ env.python_version }} - name: Set up Python ${{ env.python_version }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # pin@v5.1.0 uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # pin@v5.1.1
with: with:
python-version: ${{ env.python_version }} python-version: ${{ env.python_version }}
- name: Check Config - name: Check Config
run: | run: |
pip install --require-hashes -r .github/requirements.txt pip install --require-hashes -r contrib/dev_reqs/requirements.txt
pip install --require-hashes -r docs/requirements.txt pip install --require-hashes -r docs/requirements.txt
python docs/ci/check_mkdocs_config.py python docs/ci/check_mkdocs_config.py
- name: Check Links - name: Check Links
@ -151,7 +149,7 @@ jobs:
version: ${{ steps.version.outputs.version }} version: ${{ steps.version.outputs.version }}
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:
@ -161,20 +159,32 @@ jobs:
- name: Export API Documentation - name: Export API Documentation
run: invoke schema --ignore-warnings --filename src/backend/InvenTree/schema.yml run: invoke schema --ignore-warnings --filename src/backend/InvenTree/schema.yml
- name: Upload schema - name: Upload schema
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # pin@v4.3.3 uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # pin@v4.3.6
with: with:
name: schema.yml name: schema.yml
path: src/backend/InvenTree/schema.yml path: src/backend/InvenTree/schema.yml
- name: Download public schema - name: Download public schema
if: needs.paths-filter.outputs.api == 'false'
run: | run: |
pip install --require-hashes -r .github/requirements.txt >/dev/null 2>&1 pip install --require-hashes -r contrib/dev_reqs/requirements.txt >/dev/null 2>&1
version="$(python3 .github/scripts/version_check.py only_version 2>&1)" version="$(python3 .github/scripts/version_check.py only_version ${{ needs.paths-filter.outputs.api }} 2>&1)"
echo "Version: $version" echo "Version: $version"
url="https://raw.githubusercontent.com/inventree/schema/main/export/${version}/api.yaml" url="https://raw.githubusercontent.com/inventree/schema/main/export/${version}/api.yaml"
echo "URL: $url" echo "URL: $url"
curl -s -o api.yaml $url code=$(curl -s -o api.yaml $url --write-out '%{http_code}' --silent)
if [ "$code" != "200" ]; then
exit 1
fi
echo "Downloaded api.yaml" echo "Downloaded api.yaml"
- name: Running OpenAPI Spec diff action
id: breaking_changes
uses: oasdiff/oasdiff-action/diff@a2ff6682b27d175162a74c09ace8771bd3d512f8 # pin@main
with:
base: 'api.yaml'
revision: 'src/backend/InvenTree/schema.yml'
format: 'html'
- name: Echoing diff to step
run: echo "${{ steps.breaking_changes.outputs.diff }}" >> $GITHUB_STEP_SUMMARY
- name: Check for differences in API Schema - name: Check for differences in API Schema
if: needs.paths-filter.outputs.api == 'false' if: needs.paths-filter.outputs.api == 'false'
run: | run: |
@ -187,7 +197,7 @@ jobs:
id: version id: version
if: github.ref == 'refs/heads/master' && needs.paths-filter.outputs.api == 'true' if: github.ref == 'refs/heads/master' && needs.paths-filter.outputs.api == 'true'
run: | run: |
pip install --require-hashes -r .github/requirements.txt >/dev/null 2>&1 pip install --require-hashes -r contrib/dev_reqs/requirements.txt >/dev/null 2>&1
version="$(python3 .github/scripts/version_check.py only_version 2>&1)" version="$(python3 .github/scripts/version_check.py only_version 2>&1)"
echo "Version: $version" echo "Version: $version"
echo "version=$version" >> "$GITHUB_OUTPUT" echo "version=$version" >> "$GITHUB_OUTPUT"
@ -201,12 +211,13 @@ jobs:
version: ${{ needs.schema.outputs.version }} version: ${{ needs.schema.outputs.version }}
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
name: Checkout Code
with: with:
repository: inventree/schema repository: inventree/schema
token: ${{ secrets.SCHEMA_PAT }} token: ${{ secrets.SCHEMA_PAT }}
- name: Download schema artifact - name: Download schema artifact
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with: with:
name: schema.yml name: schema.yml
- name: Move schema to correct location - name: Move schema to correct location
@ -215,8 +226,9 @@ jobs:
mkdir export/${version} mkdir export/${version}
mv schema.yml export/${version}/api.yaml mv schema.yml export/${version}/api.yaml
- uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1 - uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
name: Commit schema changes
with: with:
commit_message: "Update API schema for ${version}" commit_message: "Update API schema for ${{ env.version }} / ${{ github.sha }}"
python: python:
name: Tests - inventree-python name: Tests - inventree-python
@ -238,7 +250,7 @@ jobs:
INVENTREE_SITE_URL: http://127.0.0.1:12345 INVENTREE_SITE_URL: http://127.0.0.1:12345
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:
@ -269,7 +281,8 @@ jobs:
continue-on-error: true # continue if a step fails so that coverage gets pushed continue-on-error: true # continue if a step fails so that coverage gets pushed
strategy: strategy:
matrix: matrix:
python_version: [3.9, 3.12] python_version: [3.9]
# python_version: [3.9, 3.12] # Disabled due to requirement issues
env: env:
INVENTREE_DB_NAME: ./inventree.sqlite INVENTREE_DB_NAME: ./inventree.sqlite
@ -279,7 +292,7 @@ jobs:
python_version: ${{ matrix.python_version }} python_version: ${{ matrix.python_version }}
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:
@ -295,7 +308,7 @@ jobs:
- name: Coverage Tests - name: Coverage Tests
run: invoke test --coverage run: invoke test --coverage
- name: Upload coverage reports to Codecov - name: Upload coverage reports to Codecov
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # pin@v4.3.1 uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # pin@v4.5.0
if: always() if: always()
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
@ -333,7 +346,7 @@ jobs:
- 6379:6379 - 6379:6379
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:
@ -377,7 +390,7 @@ jobs:
- 3306:3306 - 3306:3306
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:
@ -416,7 +429,7 @@ jobs:
- 5432:5432 - 5432:5432
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:
@ -427,7 +440,7 @@ jobs:
- name: Run Tests - name: Run Tests
run: invoke test --migrations --report --coverage run: invoke test --migrations --report --coverage
- name: Upload coverage reports to Codecov - name: Upload coverage reports to Codecov
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # pin@v4.3.1 uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # pin@v4.5.0
if: always() if: always()
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
@ -447,7 +460,7 @@ jobs:
INVENTREE_PLUGINS_ENABLED: false INVENTREE_PLUGINS_ENABLED: false
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
name: Checkout Code name: Checkout Code
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
@ -504,7 +517,7 @@ jobs:
VITE_COVERAGE: true VITE_COVERAGE: true
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:
@ -522,7 +535,7 @@ jobs:
- name: Run Playwright tests - name: Run Playwright tests
id: tests id: tests
run: cd src/frontend && npx nyc playwright test run: cd src/frontend && npx nyc playwright test
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # pin@v4 - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # pin@v4
if: ${{ !cancelled() && steps.tests.outcome == 'failure' }} if: ${{ !cancelled() && steps.tests.outcome == 'failure' }}
with: with:
name: playwright-report name: playwright-report
@ -532,7 +545,7 @@ jobs:
if: always() if: always()
run: cd src/frontend && npx nyc report --report-dir ./coverage --temp-dir .nyc_output --reporter=lcov --exclude-after-remap false run: cd src/frontend && npx nyc report --report-dir ./coverage --temp-dir .nyc_output --reporter=lcov --exclude-after-remap false
- name: Upload coverage reports to Codecov - name: Upload coverage reports to Codecov
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # pin@v4.3.1 uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # pin@v4.5.0
if: always() if: always()
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
@ -545,7 +558,7 @@ jobs:
timeout-minutes: 60 timeout-minutes: 60
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:
@ -554,11 +567,13 @@ jobs:
run: cd src/frontend && yarn install run: cd src/frontend && yarn install
- name: Build frontend - name: Build frontend
run: cd src/frontend && yarn run compile && yarn run build run: cd src/frontend && yarn run compile && yarn run build
- name: Write version file - SHA
run: cd src/backend/InvenTree/web/static/web/.vite && echo "$GITHUB_SHA" > sha.txt
- name: Zip frontend - name: Zip frontend
run: | run: |
cd src/backend/InvenTree/web/static cd src/backend/InvenTree/web/static
zip -r frontend-build.zip web/ web/.vite zip -r frontend-build.zip web/ web/.vite
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # pin@v4.3.3 - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # pin@v4.3.6
with: with:
name: frontend-build name: frontend-build
path: src/backend/InvenTree/web/static/web path: src/backend/InvenTree/web/static/web

View File

@ -1,24 +1,27 @@
# Runs on releases # Runs on releases
name: Publish release notes name: Publish release
on: on:
release: release:
types: [published] types: [published]
permissions: permissions:
contents: read contents: read
jobs: jobs:
stable: stable:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Write release to stable branch
permissions:
contents: write
pull-requests: write
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Version Check - name: Version Check
run: | run: |
pip install --require-hashes -r .github/requirements.txt pip install --require-hashes -r contrib/dev_reqs/requirements.txt
python3 .github/scripts/version_check.py python3 .github/scripts/version_check.py
- name: Push to Stable Branch - name: Push to Stable Branch
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # pin@v0.8.0 uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # pin@v0.8.0
@ -28,10 +31,15 @@ jobs:
branch: stable branch: stable
force: true force: true
publish-build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Build and attest frontend
permissions:
id-token: write
contents: write
attestations: write
steps: steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:
@ -40,14 +48,38 @@ jobs:
run: cd src/frontend && yarn install run: cd src/frontend && yarn install
- name: Build frontend - name: Build frontend
run: cd src/frontend && npm run compile && npm run build run: cd src/frontend && npm run compile && npm run build
- name: Create SBOM for frontend
uses: anchore/sbom-action@61119d458adab75f756bc0b9e4bde25725f86a7a # pin@v0
with:
artifact-name: frontend-build.spdx
path: src/frontend
- name: Write version file - SHA
run: cd src/backend/InvenTree/web/static/web/.vite && echo "$GITHUB_SHA" > sha.txt
- name: Write version file - TAG
run: cd src/backend/InvenTree/web/static/web/.vite && echo "${{ github.ref_name }}" > tag.txt
- name: Zip frontend - name: Zip frontend
run: | run: |
cd src/backend/InvenTree/web/static/web cd src/backend/InvenTree/web/static/web
zip -r ../frontend-build.zip * zip -r ../frontend-build.zip * .vite
- uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # pin@2.9.0 - name: Attest Build Provenance
id: attest
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # pin@v1
with:
subject-path: "${{ github.workspace }}/src/backend/InvenTree/web/static/frontend-build.zip"
- name: Upload frontend
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # pin@2.9.0
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: src/backend/InvenTree/web/static/frontend-build.zip file: src/backend/InvenTree/web/static/frontend-build.zip
asset_name: frontend-build.zip asset_name: frontend-build.zip
tag: ${{ github.ref }} tag: ${{ github.ref }}
overwrite: true overwrite: true
- name: Upload Attestation
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # pin@2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
asset_name: frontend-build.intoto.jsonl
file: ${{ steps.attest.outputs.bundle-path}}
tag: ${{ github.ref }}
overwrite: true

View File

@ -32,12 +32,12 @@ jobs:
steps: steps:
- name: "Checkout code" - name: "Checkout code"
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
persist-credentials: false persist-credentials: false
- name: "Run analysis" - name: "Run analysis"
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3 uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with: with:
results_file: results.sarif results_file: results.sarif
results_format: sarif results_format: sarif
@ -59,7 +59,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab. # format to the repository Actions tab.
- name: "Upload artifact" - name: "Upload artifact"
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with: with:
name: SARIF file name: SARIF file
path: results.sarif path: results.sarif
@ -67,6 +67,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard. # Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning" - name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5 uses: github/codeql-action/upload-sarif@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
with: with:
sarif_file: results.sarif sarif_file: results.sarif

View File

@ -7,16 +7,17 @@ on:
env: env:
python_version: 3.9 python_version: 3.9
node_version: 18 node_version: 20
permissions: permissions:
contents: read contents: read
jobs: jobs:
build: synchronize-with-crowdin:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write contents: write
pull-requests: write
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -30,7 +31,7 @@ jobs:
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # pin@v4.1.5 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4.1.7
- name: Environment Setup - name: Environment Setup
uses: ./.github/actions/setup uses: ./.github/actions/setup
with: with:
@ -39,16 +40,29 @@ jobs:
apt-dependency: gettext apt-dependency: gettext
- name: Make Translations - name: Make Translations
run: invoke translate run: invoke translate
- name: Commit files - name: Remove compiled static files
run: rm -rf src/backend/InvenTree/static
- name: Remove all local changes that are not *.po files
run: | run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]" git config --local user.name "github-actions[bot]"
git checkout -b l10_local git add src/backend/InvenTree/locale/en/LC_MESSAGES/django.po src/frontend/src/locales/en/messages.po
git add "*.po" git commit -m "add translations"
git commit -m "updated translation base" git reset --hard
- name: Push changes git reset HEAD~
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # pin@v0.8.0 - name: crowdin action
uses: crowdin/github-action@6ed209d411599a981ccb978df3be9dc9b8a81699 # pin@v2
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} upload_sources: true
branch: l10 upload_translations: false
force: true download_translations: true
localization_branch_name: l10_crowdin
create_pull_request: true
pull_request_title: 'New Crowdin updates'
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
pull_request_base_branch_name: 'master'
pull_request_labels: 'translations'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

3
.gitignore vendored
View File

@ -31,6 +31,7 @@ var/
# Django stuff: # Django stuff:
*.log *.log
local_settings.py local_settings.py
*.sqlite
*.sqlite3 *.sqlite3
*.sqlite3-journal *.sqlite3-journal
*.backup *.backup
@ -108,5 +109,7 @@ src/backend/InvenTree/web/static
InvenTree/web/static InvenTree/web/static
# Generated docs files # Generated docs files
docs/schema.yml
docs/docs/api/*.yml docs/docs/api/*.yml
docs/docs/api/schema/*.yml docs/docs/api/schema/*.yml
inventree_settings.json

View File

@ -14,7 +14,10 @@ env:
- INVENTREE_BACKUP_DIR=/opt/inventree/backup - INVENTREE_BACKUP_DIR=/opt/inventree/backup
- INVENTREE_PLUGIN_FILE=/opt/inventree/plugins.txt - INVENTREE_PLUGIN_FILE=/opt/inventree/plugins.txt
- INVENTREE_CONFIG_FILE=/opt/inventree/config.yaml - INVENTREE_CONFIG_FILE=/opt/inventree/config.yaml
- APP_REPO=inventree/InvenTree
before_install: contrib/packager.io/preinstall.sh
after_install: contrib/packager.io/postinstall.sh after_install: contrib/packager.io/postinstall.sh
before_remove: contrib/packager.io/preinstall.sh
before: before:
- contrib/packager.io/before.sh - contrib/packager.io/before.sh
dependencies: dependencies:
@ -32,7 +35,7 @@ dependencies:
- gettext - gettext
- nginx - nginx
- jq - jq
- libffi7 - "libffi7 | libffi8"
targets: targets:
ubuntu-20.04: true ubuntu-20.04: true
debian-11: true debian-11: true

View File

@ -17,52 +17,57 @@ repos:
- id: check-yaml - id: check-yaml
- id: mixed-line-ending - id: mixed-line-ending
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1 rev: v0.6.1
hooks: hooks:
- id: ruff-format - id: ruff-format
args: [--preview] args: [--preview]
- id: ruff - id: ruff
args: [ args: [
--fix, --fix,
# --unsafe-fixes,
--preview --preview
] ]
- repo: https://github.com/astral-sh/uv-pre-commit - repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.1.35 rev: 0.2.37
hooks: hooks:
- id: pip-compile - id: pip-compile
name: pip-compile requirements-dev.in name: pip-compile requirements-dev.in
args: [src/backend/requirements-dev.in, -o, src/backend/requirements-dev.txt, --python-version=3.9, --no-strip-extras, --generate-hashes] args: [src/backend/requirements-dev.in, -o, src/backend/requirements-dev.txt, --no-strip-extras, --generate-hashes]
files: src/backend/requirements-dev\.(in|txt)$ files: src/backend/requirements-dev\.(in|txt)$
- id: pip-compile - id: pip-compile
name: pip-compile requirements.txt name: pip-compile requirements.txt
args: [src/backend/requirements.in, -o, src/backend/requirements.txt,--python-version=3.9, --no-strip-extras,--generate-hashes] args: [src/backend/requirements.in, -o, src/backend/requirements.txt, --no-strip-extras, --generate-hashes]
files: src/backend/requirements\.(in|txt)$ files: src/backend/requirements\.(in|txt)$
- id: pip-compile - id: pip-compile
name: pip-compile requirements.txt name: pip-compile requirements.txt
args: [.github/requirements.in, -o, .github/requirements.txt,--python-version=3.9, --no-strip-extras, --generate-hashes] args: [contrib/dev_reqs/requirements.in, -o, contrib/dev_reqs/requirements.txt, --no-strip-extras, --generate-hashes]
files: .github/requirements\.(in|txt)$ files: contrib/dev_reqs/requirements\.(in|txt)$
- id: pip-compile - id: pip-compile
name: pip-compile requirements.txt name: pip-compile requirements.txt
args: [docs/requirements.in, -o, docs/requirements.txt,--python-version=3.9, --no-strip-extras, --generate-hashes] args: [docs/requirements.in, -o, docs/requirements.txt, --no-strip-extras, --generate-hashes]
files: docs/requirements\.(in|txt)$ files: docs/requirements\.(in|txt)$
- id: pip-compile - id: pip-compile
name: pip-compile requirements.txt name: pip-compile requirements.txt
args: [contrib/container/requirements.in, -o, contrib/container/requirements.txt,--python-version=3.11, --no-strip-extras, --generate-hashes] args: [contrib/container/requirements.in, -o, contrib/container/requirements.txt, --python-version=3.11, --no-strip-extras, --generate-hashes]
files: contrib/container/requirements\.(in|txt)$ files: contrib/container/requirements\.(in|txt)$
- repo: https://github.com/Riverside-Healthcare/djLint - repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.34.1 rev: v1.34.1
hooks: hooks:
- id: djlint-django - id: djlint-django
- repo: https://github.com/codespell-project/codespell - repo: https://github.com/codespell-project/codespell
rev: v2.2.6 rev: v2.3.0
hooks: hooks:
- id: codespell - id: codespell
additional_dependencies:
- tomli
exclude: > exclude: >
(?x)^( (?x)^(
docs/docs/stylesheets/.*| docs/docs/stylesheets/.*|
docs/docs/javascripts/.*| docs/docs/javascripts/.*|
docs/docs/webfonts/.* | docs/docs/webfonts/.* |
src/frontend/src/locales/.* | src/frontend/src/locales/.* |
pyproject.toml |
src/frontend/vite.config.ts |
)$ )$
- repo: https://github.com/pre-commit/mirrors-prettier - repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8" rev: "v4.0.0-alpha.8"
@ -73,7 +78,7 @@ repos:
- "prettier@^2.4.1" - "prettier@^2.4.1"
- "@trivago/prettier-plugin-sort-imports" - "@trivago/prettier-plugin-sort-imports"
- repo: https://github.com/pre-commit/mirrors-eslint - repo: https://github.com/pre-commit/mirrors-eslint
rev: "v9.1.0" rev: "v9.9.0"
hooks: hooks:
- id: eslint - id: eslint
additional_dependencies: additional_dependencies:
@ -85,7 +90,7 @@ repos:
- "@typescript-eslint/parser" - "@typescript-eslint/parser"
files: ^src/frontend/.*\.(js|jsx|ts|tsx)$ files: ^src/frontend/.*\.(js|jsx|ts|tsx)$
- repo: https://github.com/gitleaks/gitleaks - repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2 rev: v8.18.4
hooks: hooks:
- id: gitleaks - id: gitleaks
#- repo: https://github.com/jumanjihouse/pre-commit-hooks #- repo: https://github.com/jumanjihouse/pre-commit-hooks

26
.vscode/launch.json vendored
View File

@ -6,19 +6,37 @@
"configurations": [ "configurations": [
{ {
"name": "InvenTree Server", "name": "InvenTree Server",
"type": "python", "type": "debugpy",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/src/backend/InvenTree/manage.py", "program": "${workspaceFolder}/src/backend/InvenTree/manage.py",
"args": ["runserver"], "args": [
"runserver",
// "0.0.0.0:8000", // expose server in network (useful for testing with mobile app)
// "--noreload" // disable auto-reload
],
"django": true,
"justMyCode": true
},
{
"name": "InvenTree Server - Tests",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/backend/InvenTree/manage.py",
"args": [
"test",
// "part.test_api.PartCategoryAPITest", // run only a specific test
],
"django": true, "django": true,
"justMyCode": true "justMyCode": true
}, },
{ {
"name": "InvenTree Server - 3rd party", "name": "InvenTree Server - 3rd party",
"type": "python", "type": "debugpy",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/src/backend/InvenTree/manage.py", "program": "${workspaceFolder}/src/backend/InvenTree/manage.py",
"args": ["runserver"], "args": [
"runserver"
],
"django": true, "django": true,
"justMyCode": false "justMyCode": false
}, },

View File

@ -39,7 +39,7 @@ InvenTree/
│ │ ├─ tsconfig.json # Settings for frontend compilation │ │ ├─ tsconfig.json # Settings for frontend compilation
├─ .pkgr.yml # Build definition for Debian/Ubuntu packages ├─ .pkgr.yml # Build definition for Debian/Ubuntu packages
├─ .pre-commit-config.yaml # Code formatter/linter configuration ├─ .pre-commit-config.yaml # Code formatter/linter configuration
├─ CONTRIBUTING.md # Contirbution guidelines and overview ├─ CONTRIBUTING.md # Contribution guidelines and overview
├─ Procfile # Process definition for Debian/Ubuntu packages ├─ Procfile # Process definition for Debian/Ubuntu packages
├─ README.md # General project information and overview ├─ README.md # General project information and overview
├─ runtime.txt # Python runtime settings for Debian/Ubuntu packages build ├─ runtime.txt # Python runtime settings for Debian/Ubuntu packages build

View File

@ -66,7 +66,7 @@ InvenTree is designed to be **extensible**, and provides multiple options for **
<li><a href="https://www.djangoproject.com/">Django</a></li> <li><a href="https://www.djangoproject.com/">Django</a></li>
<li><a href="https://www.django-rest-framework.org/">DRF</a></li> <li><a href="https://www.django-rest-framework.org/">DRF</a></li>
<li><a href="https://django-q.readthedocs.io/">Django Q</a></li> <li><a href="https://django-q.readthedocs.io/">Django Q</a></li>
<li><a href="https://django-allauth.readthedocs.io/">Django-Allauth</a></li> <li><a href="https://docs.allauth.org/">Django-Allauth</a></li>
</ul> </ul>
</details> </details>
@ -123,7 +123,7 @@ Refer to the [getting started guide](https://docs.inventree.org/en/latest/start/
<!-- Mobile App --> <!-- Mobile App -->
## :iphone: Mobile App ## :iphone: Mobile App
InvenTree is supported by a [companion mobile app](https://docs.inventree.org/en/latest/app/app/) which allows users access to stock control information and functionality. InvenTree is supported by a [companion mobile app](https://docs.inventree.org/app/) which allows users access to stock control information and functionality.
<div align="center"><h4> <div align="center"><h4>
<a href="https://play.google.com/store/apps/details?id=inventree.inventree_app">Android Play Store</a> <a href="https://play.google.com/store/apps/details?id=inventree.inventree_app">Android Play Store</a>

View File

@ -3,6 +3,7 @@ coverage:
project: project:
default: default:
target: 82% target: 82%
patch: off
github_checks: github_checks:
annotations: true annotations: true

View File

@ -28,6 +28,7 @@ INVENTREE_DB_PASSWORD=pgpassword
# Un-comment the following lines to enable Redis cache # Un-comment the following lines to enable Redis cache
# Note that you will also have to run docker-compose with the --profile redis command # Note that you will also have to run docker-compose with the --profile redis command
# Refer to settings.py for other cache options # Refer to settings.py for other cache options
#INVENTREE_CACHE_ENABLED=True
#INVENTREE_CACHE_HOST=inventree-cache #INVENTREE_CACHE_HOST=inventree-cache
#INVENTREE_CACHE_PORT=6379 #INVENTREE_CACHE_PORT=6379

View File

@ -11,6 +11,7 @@
ARG base_image=python:3.11-alpine3.18 ARG base_image=python:3.11-alpine3.18
FROM ${base_image} AS inventree_base FROM ${base_image} AS inventree_base
ARG base_image
# Build arguments for this image # Build arguments for this image
ARG commit_tag="" ARG commit_tag=""
@ -48,13 +49,18 @@ ENV INVENTREE_BACKGROUND_WORKERS="4"
ENV INVENTREE_WEB_ADDR=0.0.0.0 ENV INVENTREE_WEB_ADDR=0.0.0.0
ENV INVENTREE_WEB_PORT=8000 ENV INVENTREE_WEB_PORT=8000
LABEL org.label-schema.schema-version="1.0" \ LABEL org.opencontainers.image.created=${DATE} \
org.label-schema.build-date=${DATE} \ org.opencontainers.image.vendor="inventree" \
org.label-schema.vendor="inventree" \ org.opencontainers.image.title="InvenTree backend server" \
org.label-schema.name="inventree/inventree" \ org.opencontainers.image.description="InvenTree is the open-source inventory management system" \
org.label-schema.url="https://hub.docker.com/r/inventree/inventree" \ org.opencontainers.image.url="https://inventree.org" \
org.label-schema.vcs-url="https://github.com/inventree/InvenTree.git" \ org.opencontainers.image.documentation="https://docs.inventree.org" \
org.label-schema.vcs-ref=${commit_tag} org.opencontainers.image.source="https://github.com/inventree/InvenTree" \
org.opencontainers.image.revision=${commit_hash} \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.base.name="docker.io/library/${base_image}" \
org.opencontainers.image.version=${commit_tag}
# Install required system level packages # Install required system level packages
RUN apk add --no-cache \ RUN apk add --no-cache \
@ -68,8 +74,9 @@ RUN apk add --no-cache \
# MySQL / MariaDB client # MySQL / MariaDB client
mariadb-client mariadb-connector-c \ mariadb-client mariadb-connector-c \
&& \ && \
# fonts # font support
apk --update --upgrade --no-cache add fontconfig ttf-freefont font-noto terminus-font && fc-cache -f apk --update --upgrade --no-cache add fontconfig ttf-freefont font-terminus font-noto font-noto-cjk font-noto-extra \
&& fc-cache -f
EXPOSE 8000 EXPOSE 8000
@ -128,6 +135,7 @@ COPY --from=prebuild /root/.local /root/.local
# Copy source code # Copy source code
COPY src/backend/InvenTree ${INVENTREE_BACKEND_DIR}/InvenTree COPY src/backend/InvenTree ${INVENTREE_BACKEND_DIR}/InvenTree
COPY src/backend/requirements.txt ${INVENTREE_BACKEND_DIR}/requirements.txt
COPY --from=frontend ${INVENTREE_BACKEND_DIR}/InvenTree/web/static/web ${INVENTREE_BACKEND_DIR}/InvenTree/web/static/web COPY --from=frontend ${INVENTREE_BACKEND_DIR}/InvenTree/web/static/web ${INVENTREE_BACKEND_DIR}/InvenTree/web/static/web
# Launch the production server # Launch the production server

View File

@ -1,5 +1,3 @@
version: "3.8"
# Docker compose recipe for InvenTree development server # Docker compose recipe for InvenTree development server
# - Runs PostgreSQL as the database backend # - Runs PostgreSQL as the database backend
# - Uses built-in django webserver # - Uses built-in django webserver

View File

@ -1,5 +1,3 @@
version: "3.8"
# Docker compose recipe for a production-ready InvenTree setup, with the following containers: # Docker compose recipe for a production-ready InvenTree setup, with the following containers:
# - PostgreSQL as the database backend # - PostgreSQL as the database backend
# - gunicorn as the InvenTree web server # - gunicorn as the InvenTree web server
@ -53,14 +51,9 @@ services:
restart: unless-stopped restart: unless-stopped
# redis acts as database cache manager # redis acts as database cache manager
# only runs under the "redis" profile : https://docs.docker.com/compose/profiles/
inventree-cache: inventree-cache:
image: redis:7.0 image: redis:7.0
container_name: inventree-cache container_name: inventree-cache
depends_on:
- inventree-db
profiles:
- redis
env_file: env_file:
- .env - .env
expose: expose:
@ -114,7 +107,7 @@ services:
env_file: env_file:
- .env - .env
volumes: volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro - ./Caddyfile:/etc/caddy/Caddyfile:ro,z
- ${INVENTREE_EXT_VOLUME}/static:/var/www/static:z - ${INVENTREE_EXT_VOLUME}/static:/var/www/static:z
- ${INVENTREE_EXT_VOLUME}/media:/var/www/media:z - ${INVENTREE_EXT_VOLUME}/media:/var/www/media:z
- ${INVENTREE_EXT_VOLUME}:/var/log:z - ${INVENTREE_EXT_VOLUME}:/var/log:z

View File

@ -1,7 +1,7 @@
#!/bin/ash #!/bin/ash
# Install system packages required for building InvenTree python libraries # Install system packages required for building InvenTree python libraries
# Note that for postgreslql, we use the 13 version, which matches the version used in the InvenTree docker image # Note that for postgreslql, we use the version 13, which matches the version used in the InvenTree docker image
apk add gcc g++ musl-dev openssl-dev libffi-dev cargo python3-dev openldap-dev \ apk add gcc g++ musl-dev openssl-dev libffi-dev cargo python3-dev openldap-dev \
libstdc++ build-base linux-headers py3-grpcio \ libstdc++ build-base linux-headers py3-grpcio \

View File

@ -17,6 +17,7 @@ gunicorn>=22.0.0
# LDAP required packages # LDAP required packages
django-auth-ldap # Django integration for ldap auth django-auth-ldap # Django integration for ldap auth
python-ldap # LDAP auth support python-ldap # LDAP auth support
django<5.0 # Force lower to match main project
# Upgraded python package installer # Upgraded python package installer
uv uv

View File

@ -4,19 +4,24 @@ asgiref==3.8.1 \
--hash=sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47 \ --hash=sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47 \
--hash=sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590 --hash=sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590
# via django # via django
django==4.2.11 \ django==4.2.15 \
--hash=sha256:6e6ff3db2d8dd0c986b4eec8554c8e4f919b5c1ff62a5b4390c17aff2ed6e5c4 \ --hash=sha256:61ee4a130efb8c451ef3467c67ca99fdce400fedd768634efc86a68c18d80d30 \
--hash=sha256:ddc24a0a8280a0430baa37aff11f28574720af05888c62b7cfe71d219f4599d3 --hash=sha256:c77f926b81129493961e19c0e02188f8d07c112a1162df69bfab178ae447f94a
# via django-auth-ldap # via
# -r contrib/container/requirements.in
# django-auth-ldap
django-auth-ldap==4.8.0 \ django-auth-ldap==4.8.0 \
--hash=sha256:4b4b944f3c28bce362f33fb6e8db68429ed8fd8f12f0c0c4b1a4344a7ef225ce \ --hash=sha256:4b4b944f3c28bce362f33fb6e8db68429ed8fd8f12f0c0c4b1a4344a7ef225ce \
--hash=sha256:604250938ddc9fda619f247c7a59b0b2f06e53a7d3f46a156f28aa30dd71a738 --hash=sha256:604250938ddc9fda619f247c7a59b0b2f06e53a7d3f46a156f28aa30dd71a738
gunicorn==22.0.0 \ # via -r contrib/container/requirements.in
--hash=sha256:350679f91b24062c86e386e198a15438d53a7a8207235a78ba1b53df4c4378d9 \ gunicorn==23.0.0 \
--hash=sha256:4a0b436239ff76fb33f11c07a16482c521a7e09c1ce3cc293c2330afe01bec63 --hash=sha256:ec400d38950de4dfd418cff8328b2c8faed0edb0d517d3394e457c317908ca4d \
--hash=sha256:f014447a0101dc57e294f6c18ca6b40227a4c90e9bdb586042628030cba004ec
# via -r contrib/container/requirements.in
invoke==2.2.0 \ invoke==2.2.0 \
--hash=sha256:6ea924cc53d4f78e3d98bc436b08069a03077e6f85ad1ddaa8a116d7dad15820 \ --hash=sha256:6ea924cc53d4f78e3d98bc436b08069a03077e6f85ad1ddaa8a116d7dad15820 \
--hash=sha256:ee6cbb101af1a859c7fe84f2a264c059020b0cb7fe3535f9424300ab568f6bd5 --hash=sha256:ee6cbb101af1a859c7fe84f2a264c059020b0cb7fe3535f9424300ab568f6bd5
# via -r contrib/container/requirements.in
mariadb==1.1.10 \ mariadb==1.1.10 \
--hash=sha256:03d6284ef713d1cad40146576a4cc2d6cbc1662060f2a0e59b174e1694521698 \ --hash=sha256:03d6284ef713d1cad40146576a4cc2d6cbc1662060f2a0e59b174e1694521698 \
--hash=sha256:1ce87971c02375236ff8933e6c593c748e7b2f2950b86eabfab4289fd250ea63 \ --hash=sha256:1ce87971c02375236ff8933e6c593c748e7b2f2950b86eabfab4289fd250ea63 \
@ -29,6 +34,7 @@ mariadb==1.1.10 \
--hash=sha256:a332893e3ef7ceb7970ab4bd7c844bcb4bd68a051ca51313566f9808d7411f2d \ --hash=sha256:a332893e3ef7ceb7970ab4bd7c844bcb4bd68a051ca51313566f9808d7411f2d \
--hash=sha256:d7b09ec4abd02ed235257feb769f90cd4066e8f536b55b92f5166103d5b66a63 \ --hash=sha256:d7b09ec4abd02ed235257feb769f90cd4066e8f536b55b92f5166103d5b66a63 \
--hash=sha256:dff8b28ce4044574870d7bdd2d9f9f5da8e5f95a7ff6d226185db733060d1a93 --hash=sha256:dff8b28ce4044574870d7bdd2d9f9f5da8e5f95a7ff6d226185db733060d1a93
# via -r contrib/container/requirements.in
mysqlclient==2.2.4 \ mysqlclient==2.2.4 \
--hash=sha256:329e4eec086a2336fe3541f1ce095d87a6f169d1cc8ba7b04ac68bcb234c9711 \ --hash=sha256:329e4eec086a2336fe3541f1ce095d87a6f169d1cc8ba7b04ac68bcb234c9711 \
--hash=sha256:33bc9fb3464e7d7c10b1eaf7336c5ff8f2a3d3b88bab432116ad2490beb3bf41 \ --hash=sha256:33bc9fb3464e7d7c10b1eaf7336c5ff8f2a3d3b88bab432116ad2490beb3bf41 \
@ -39,85 +45,75 @@ mysqlclient==2.2.4 \
--hash=sha256:ac44777eab0a66c14cb0d38965572f762e193ec2e5c0723bcd11319cc5b693c5 \ --hash=sha256:ac44777eab0a66c14cb0d38965572f762e193ec2e5c0723bcd11319cc5b693c5 \
--hash=sha256:d43987bb9626096a302ca6ddcdd81feaeca65ced1d5fe892a6a66b808326aa54 \ --hash=sha256:d43987bb9626096a302ca6ddcdd81feaeca65ced1d5fe892a6a66b808326aa54 \
--hash=sha256:e1ebe3f41d152d7cb7c265349fdb7f1eca86ccb0ca24a90036cde48e00ceb2ab --hash=sha256:e1ebe3f41d152d7cb7c265349fdb7f1eca86ccb0ca24a90036cde48e00ceb2ab
packaging==24.0 \ # via -r contrib/container/requirements.in
--hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \ packaging==24.1 \
--hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9 --hash=sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002 \
--hash=sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124
# via # via
# gunicorn # gunicorn
# mariadb # mariadb
psycopg[binary, pool]==3.1.18 \ psycopg[binary, pool]==3.2.1 \
--hash=sha256:31144d3fb4c17d78094d9e579826f047d4af1da6a10427d91dfcfb6ecdf6f12b \ --hash=sha256:dc8da6dc8729dacacda3cc2f17d2c9397a70a66cf0d2b69c91065d60d5f00cb7 \
--hash=sha256:4d5a0a5a8590906daa58ebd5f3cfc34091377354a1acced269dd10faf55da60e --hash=sha256:ece385fb413a37db332f97c49208b36cf030ff02b199d7635ed2fbd378724175
psycopg-binary==3.1.18 \ # via -r contrib/container/requirements.in
--hash=sha256:02bd4da45d5ee9941432e2e9bf36fa71a3ac21c6536fe7366d1bd3dd70d6b1e7 \ psycopg-binary==3.2.1 \
--hash=sha256:0f68ac2364a50d4cf9bb803b4341e83678668f1881a253e1224574921c69868c \ --hash=sha256:059cbd4e6da2337e17707178fe49464ed01de867dc86c677b30751755ec1dc51 \
--hash=sha256:13bcd3742112446037d15e360b27a03af4b5afcf767f5ee374ef8f5dd7571b31 \ --hash=sha256:06a7aae34edfe179ddc04da005e083ff6c6b0020000399a2cbf0a7121a8a22ea \
--hash=sha256:1729d0e3dfe2546d823841eb7a3d003144189d6f5e138ee63e5227f8b75276a5 \ --hash=sha256:0879b5d76b7d48678d31278242aaf951bc2d69ca4e4d7cef117e4bbf7bfefda9 \
--hash=sha256:1859aeb2133f5ecdd9cbcee155f5e38699afc06a365f903b1512c765fd8d457e \ --hash=sha256:0ab58213cc976a1666f66bc1cb2e602315cd753b7981a8e17237ac2a185bd4a1 \
--hash=sha256:1c9b6bd7fb5c6638cb32469674707649b526acfe786ba6d5a78ca4293d87bae4 \ --hash=sha256:0b018631e5c80ce9bc210b71ea885932f9cca6db131e4df505653d7e3873a938 \
--hash=sha256:247474af262bdd5559ee6e669926c4f23e9cf53dae2d34c4d991723c72196404 \ --hash=sha256:101472468d59c74bb8565fab603e032803fd533d16be4b2d13da1bab8deb32a3 \
--hash=sha256:258d2f0cb45e4574f8b2fe7c6d0a0e2eb58903a4fd1fbaf60954fba82d595ab7 \ --hash=sha256:1d353e028b8f848b9784450fc2abf149d53a738d451eab3ee4c85703438128b9 \
--hash=sha256:2e2484ae835dedc80cdc7f1b1a939377dc967fed862262cfd097aa9f50cade46 \ --hash=sha256:1d6833f607f3fc7b22226a9e121235d3b84c0eda1d3caab174673ef698f63788 \
--hash=sha256:320047e3d3554b857e16c2b6b615a85e0db6a02426f4d203a4594a2f125dfe57 \ --hash=sha256:21927f41c4d722ae8eb30d62a6ce732c398eac230509af5ba1749a337f8a63e2 \
--hash=sha256:39242546383f6b97032de7af30edb483d237a0616f6050512eee7b218a2aa8ee \ --hash=sha256:28ada5f610468c57d8a4a055a8ea915d0085a43d794266c4f3b9d02f4288f4db \
--hash=sha256:3c2b039ae0c45eee4cd85300ef802c0f97d0afc78350946a5d0ec77dd2d7e834 \ --hash=sha256:2e8213bf50af073b1aa8dc3cff123bfeedac86332a16c1b7274910bc88a847c7 \
--hash=sha256:3c7afcd6f1d55992f26d9ff7b0bd4ee6b475eb43aa3f054d67d32e09f18b0065 \ --hash=sha256:302b86f92c0d76e99fe1b5c22c492ae519ce8b98b88d37ef74fda4c9e24c6b46 \
--hash=sha256:3e4b0bb91da6f2238dbd4fbb4afc40dfb4f045bb611b92fce4d381b26413c686 \ --hash=sha256:334046a937bb086c36e2c6889fe327f9f29bfc085d678f70fac0b0618949f674 \
--hash=sha256:3e7ce4d988112ca6c75765c7f24c83bdc476a6a5ce00878df6c140ca32c3e16d \ --hash=sha256:33e6669091d09f8ba36e10ce678a6d9916e110446236a9b92346464a3565635e \
--hash=sha256:4085f56a8d4fc8b455e8f44380705c7795be5317419aa5f8214f315e4205d804 \ --hash=sha256:3c838806eeb99af39f934b7999e35f947a8e577997cc892c12b5053a97a9057f \
--hash=sha256:4575da95fc441244a0e2ebaf33a2b2f74164603341d2046b5cde0a9aa86aa7e2 \ --hash=sha256:40bb515d042f6a345714ec0403df68ccf13f73b05e567837d80c886c7c9d3805 \
--hash=sha256:489aa4fe5a0b653b68341e9e44af247dedbbc655326854aa34c163ef1bcb3143 \ --hash=sha256:413977d18412ff83486eeb5875eb00b185a9391c57febac45b8993bf9c0ff489 \
--hash=sha256:4e4de16a637ec190cbee82e0c2dc4860fed17a23a35f7a1e6dc479a5c6876722 \ --hash=sha256:415c3b72ea32119163255c6504085f374e47ae7345f14bc3f0ef1f6e0976a879 \
--hash=sha256:531381f6647fc267383dca88dbe8a70d0feff433a8e3d0c4939201fea7ae1b82 \ --hash=sha256:42781ba94e8842ee98bca5a7d0c44cc9d067500fedca2d6a90fa3609b6d16b42 \
--hash=sha256:55ff0948457bfa8c0d35c46e3a75193906d1c275538877ba65907fd67aa059ad \ --hash=sha256:463d55345f73ff391df8177a185ad57b552915ad33f5cc2b31b930500c068b22 \
--hash=sha256:59701118c7d8842e451f1e562d08e8708b3f5d14974eefbce9374badd723c4ae \ --hash=sha256:4a42b8f9ab39affcd5249b45cac763ac3cf12df962b67e23fd15a2ee2932afe5 \
--hash=sha256:5c323103dfa663b88204cf5f028e83c77d7a715f9b6f51d2bbc8184b99ddd90a \ --hash=sha256:4c84fcac8a3a3479ac14673095cc4e1fdba2935499f72c436785ac679bec0d1a \
--hash=sha256:5d6e860edf877d4413e4a807e837d55e3a7c7df701e9d6943c06e460fa6c058f \ --hash=sha256:592b27d6c46a40f9eeaaeea7c1fef6f3c60b02c634365eb649b2d880669f149f \
--hash=sha256:639dd78ac09b144b0119076783cb64e1128cc8612243e9701d1503c816750b2e \ --hash=sha256:62b1b7b07e00ee490afb39c0a47d8282a9c2822c7cfed9553a04b0058adf7e7f \
--hash=sha256:6432047b8b24ef97e3fbee1d1593a0faaa9544c7a41a2c67d1f10e7621374c83 \ --hash=sha256:6418712ba63cebb0c88c050b3997185b0ef54173b36568522d5634ac06153040 \
--hash=sha256:67284e2e450dc7a9e4d76e78c0bd357dc946334a3d410defaeb2635607f632cd \ --hash=sha256:6f9e13600647087df5928875559f0eb8f496f53e6278b7da9511b4b3d0aff960 \
--hash=sha256:6ebecbf2406cd6875bdd2453e31067d1bd8efe96705a9489ef37e93b50dc6f09 \ --hash=sha256:7066d3dca196ed0dc6172f9777b2d62e4f138705886be656cccff2d555234d60 \
--hash=sha256:7121acc783c4e86d2d320a7fb803460fab158a7f0a04c5e8c5d49065118c1e73 \ --hash=sha256:73f9c9b984be9c322b5ec1515b12df1ee5896029f5e72d46160eb6517438659c \
--hash=sha256:74e498586b72fb819ca8ea82107747d0cb6e00ae685ea6d1ab3f929318a8ce2d \ --hash=sha256:74d623261655a169bc84a9669890975c229f2fa6e19a7f2d10a77675dcf1a707 \
--hash=sha256:780a90bcb69bf27a8b08bc35b958e974cb6ea7a04cdec69e737f66378a344d68 \ --hash=sha256:788ffc43d7517c13e624c83e0e553b7b8823c9655e18296566d36a829bfb373f \
--hash=sha256:7ac1785d67241d5074f8086705fa68e046becea27964267ab3abd392481d7773 \ --hash=sha256:78c2007caf3c90f08685c5378e3ceb142bafd5636be7495f7d86ec8a977eaeef \
--hash=sha256:812726266ab96de681f2c7dbd6b734d327f493a78357fcc16b2ac86ff4f4e080 \ --hash=sha256:7a84b5eb194a258116154b2a4ff2962ea60ea52de089508db23a51d3d6b1c7d1 \
--hash=sha256:824a1bfd0db96cc6bef2d1e52d9e0963f5bf653dd5bc3ab519a38f5e6f21c299 \ --hash=sha256:7ce965caf618061817f66c0906f0452aef966c293ae0933d4fa5a16ea6eaf5bb \
--hash=sha256:87dd9154b757a5fbf6d590f6f6ea75f4ad7b764a813ae04b1d91a70713f414a1 \ --hash=sha256:84837e99353d16c6980603b362d0f03302d4b06c71672a6651f38df8a482923d \
--hash=sha256:887f8d856c91510148be942c7acd702ccf761a05f59f8abc123c22ab77b5a16c \ --hash=sha256:8f28ff0cb9f1defdc4a6f8c958bf6787274247e7dfeca811f6e2f56602695fb1 \
--hash=sha256:888a72c2aca4316ca6d4a619291b805677bae99bba2f6e31a3c18424a48c7e4d \ --hash=sha256:921f0c7f39590763d64a619de84d1b142587acc70fd11cbb5ba8fa39786f3073 \
--hash=sha256:8f54978c4b646dec77fefd8485fa82ec1a87807f334004372af1aaa6de9539a5 \ --hash=sha256:950fd666ec9e9fe6a8eeb2b5a8f17301790e518953730ad44d715b59ffdbc67f \
--hash=sha256:91074f78a9f890af5f2c786691575b6b93a4967ad6b8c5a90101f7b8c1a91d9c \ --hash=sha256:9a997efbaadb5e1a294fb5760e2f5643d7b8e4e3fe6cb6f09e6d605fd28e0291 \
--hash=sha256:9d684227ef8212e27da5f2aff9d4d303cc30b27ac1702d4f6881935549486dd5 \ --hash=sha256:aa3931f308ab4a479d0ee22dc04bea867a6365cac0172e5ddcba359da043854b \
--hash=sha256:9e24e7b6a68a51cc3b162d0339ae4e1263b253e887987d5c759652f5692b5efe \ --hash=sha256:af0469c00f24c4bec18c3d2ede124bf62688d88d1b8a5f3c3edc2f61046fe0d7 \
--hash=sha256:9ffcbbd389e486d3fd83d30107bbf8b27845a295051ccabde240f235d04ed921 \ --hash=sha256:b0104a72a17aa84b3b7dcab6c84826c595355bf54bb6ea6d284dcb06d99c6801 \
--hash=sha256:a87e9eeb80ce8ec8c2783f29bce9a50bbcd2e2342a340f159c3326bf4697afa1 \ --hash=sha256:b09e8a576a2ac69d695032ee76f31e03b30781828b5dd6d18c6a009e5a3d1c35 \
--hash=sha256:ad35ac7fd989184bf4d38a87decfb5a262b419e8ba8dcaeec97848817412c64a \ --hash=sha256:b140182830c76c74d17eba27df3755a46442ce8d4fb299e7f1cf2f74a87c877b \
--hash=sha256:b15e3653c82384b043d820fc637199b5c6a36b37fa4a4943e0652785bb2bad5d \ --hash=sha256:b1f087bd84bdcac78bf9f024ebdbfacd07fc0a23ec8191448a50679e2ac4a19e \
--hash=sha256:b293e01057e63c3ac0002aa132a1071ce0fdb13b9ee2b6b45d3abdb3525c597d \ --hash=sha256:c1d2b6438fb83376f43ebb798bf0ad5e57bc56c03c9c29c85bc15405c8c0ac5a \
--hash=sha256:b2f7f95746efd1be2dc240248cc157f4315db3fd09fef2adfcc2a76e24aa5741 \ --hash=sha256:cad2de17804c4cfee8640ae2b279d616bb9e4734ac3c17c13db5e40982bd710d \
--hash=sha256:bd27f713f2e5ef3fd6796e66c1a5203a27a30ecb847be27a78e1df8a9a5ae68c \ --hash=sha256:cc304a46be1e291031148d9d95c12451ffe783ff0cc72f18e2cc7ec43cdb8c68 \
--hash=sha256:c38a4796abf7380f83b1653c2711cb2449dd0b2e5aca1caa75447d6fa5179c69 \ --hash=sha256:dc314a47d44fe1a8069b075a64abffad347a3a1d8652fed1bab5d3baea37acb2 \
--hash=sha256:c76659ae29a84f2c14f56aad305dd00eb685bd88f8c0a3281a9a4bc6bd7d2aa7 \ --hash=sha256:f092114f10f81fb6bae544a0ec027eb720e2d9c74a4fcdaa9dd3899873136935 \
--hash=sha256:c84a0174109f329eeda169004c7b7ca2e884a6305acab4a39600be67f915ed38 \ --hash=sha256:f34e369891f77d0738e5d25727c307d06d5344948771e5379ea29c76c6d84555 \
--hash=sha256:cd2a9f7f0d4dacc5b9ce7f0e767ae6cc64153264151f50698898c42cabffec0c \ --hash=sha256:f8a509aeaac364fa965454e80cd110fe6d48ba2c80f56c9b8563423f0b5c3cfd \
--hash=sha256:d322ba72cde4ca2eefc2196dad9ad7e52451acd2f04e3688d590290625d0c970 \ --hash=sha256:f8afb07114ea9b924a4a0305ceb15354ccf0ef3c0e14d54b8dbeb03e50182dd7 \
--hash=sha256:d4422af5232699f14b7266a754da49dc9bcd45eba244cf3812307934cd5d6679 \ --hash=sha256:f99e59f8a5f4dcd9cbdec445f3d8ac950a492fc0e211032384d6992ed3c17eb7
--hash=sha256:d46ae44d66bf6058a812467f6ae84e4e157dee281bfb1cfaeca07dee07452e85 \
--hash=sha256:da917f6df8c6b2002043193cb0d74cc173b3af7eb5800ad69c4e1fbac2a71c30 \
--hash=sha256:dea4a59da7850192fdead9da888e6b96166e90608cf39e17b503f45826b16f84 \
--hash=sha256:e05f6825f8db4428782135e6986fec79b139210398f3710ed4aa6ef41473c008 \
--hash=sha256:e1cf59e0bb12e031a48bb628aae32df3d0c98fd6c759cb89f464b1047f0ca9c8 \
--hash=sha256:e252d66276c992319ed6cd69a3ffa17538943954075051e992143ccbf6dc3d3e \
--hash=sha256:e262398e5d51563093edf30612cd1e20fedd932ad0994697d7781ca4880cdc3d \
--hash=sha256:e28ff8f3de7b56588c2a398dc135fd9f157d12c612bd3daa7e6ba9872337f6f5 \
--hash=sha256:eea5f14933177ffe5c40b200f04f814258cc14b14a71024ad109f308e8bad414 \
--hash=sha256:f876ebbf92db70125f6375f91ab4bc6b27648aa68f90d661b1fc5affb4c9731c \
--hash=sha256:f8ff3bc08b43f36fdc24fedb86d42749298a458c4724fb588c4d76823ac39f54
# via psycopg # via psycopg
psycopg-pool==3.2.1 \ psycopg-pool==3.2.2 \
--hash=sha256:060b551d1b97a8d358c668be58b637780b884de14d861f4f5ecc48b7563aafb7 \ --hash=sha256:273081d0fbfaced4f35e69200c89cb8fbddfe277c38cc86c235b90a2ec2c8153 \
--hash=sha256:6509a75c073590952915eddbba7ce8b8332a440a31e77bba69561483492829ad --hash=sha256:9e22c370045f6d7f2666a5ad1b0caf345f9f1912195b0b25d0d3bcc4f3a7389c
# via psycopg # via psycopg
pyasn1==0.6.0 \ pyasn1==0.6.0 \
--hash=sha256:3a35ab2c4b5ef98e17dfdec8ab074046fbda76e281c5a706ccd82328cfc8f64c \ --hash=sha256:3a35ab2c4b5ef98e17dfdec8ab074046fbda76e281c5a706ccd82328cfc8f64c \
@ -131,90 +127,99 @@ pyasn1-modules==0.4.0 \
# via python-ldap # via python-ldap
python-ldap==3.4.4 \ python-ldap==3.4.4 \
--hash=sha256:7edb0accec4e037797705f3a05cbf36a9fde50d08c8f67f2aef99a2628fab828 --hash=sha256:7edb0accec4e037797705f3a05cbf36a9fde50d08c8f67f2aef99a2628fab828
# via django-auth-ldap # via
pyyaml==6.0.1 \ # -r contrib/container/requirements.in
--hash=sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5 \ # django-auth-ldap
--hash=sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc \ pyyaml==6.0.2 \
--hash=sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df \ --hash=sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff \
--hash=sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741 \ --hash=sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48 \
--hash=sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206 \ --hash=sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086 \
--hash=sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27 \ --hash=sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e \
--hash=sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595 \ --hash=sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133 \
--hash=sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62 \ --hash=sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5 \
--hash=sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98 \ --hash=sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484 \
--hash=sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696 \ --hash=sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee \
--hash=sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290 \ --hash=sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5 \
--hash=sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9 \ --hash=sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68 \
--hash=sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d \ --hash=sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a \
--hash=sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6 \ --hash=sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf \
--hash=sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867 \ --hash=sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99 \
--hash=sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47 \ --hash=sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8 \
--hash=sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486 \ --hash=sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85 \
--hash=sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6 \ --hash=sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19 \
--hash=sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3 \ --hash=sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc \
--hash=sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007 \ --hash=sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a \
--hash=sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938 \ --hash=sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1 \
--hash=sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0 \ --hash=sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317 \
--hash=sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c \ --hash=sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c \
--hash=sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735 \ --hash=sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631 \
--hash=sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d \ --hash=sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d \
--hash=sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28 \ --hash=sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652 \
--hash=sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4 \ --hash=sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5 \
--hash=sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba \ --hash=sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e \
--hash=sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8 \ --hash=sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b \
--hash=sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef \ --hash=sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8 \
--hash=sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5 \ --hash=sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476 \
--hash=sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd \ --hash=sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706 \
--hash=sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3 \ --hash=sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563 \
--hash=sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0 \ --hash=sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237 \
--hash=sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515 \ --hash=sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b \
--hash=sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c \ --hash=sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083 \
--hash=sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c \ --hash=sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180 \
--hash=sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924 \ --hash=sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425 \
--hash=sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34 \ --hash=sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e \
--hash=sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43 \ --hash=sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f \
--hash=sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859 \ --hash=sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725 \
--hash=sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673 \ --hash=sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183 \
--hash=sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54 \ --hash=sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab \
--hash=sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a \ --hash=sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774 \
--hash=sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b \ --hash=sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725 \
--hash=sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab \ --hash=sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e \
--hash=sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa \ --hash=sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5 \
--hash=sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c \ --hash=sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d \
--hash=sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585 \ --hash=sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290 \
--hash=sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d \ --hash=sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44 \
--hash=sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f --hash=sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed \
setuptools==69.5.1 \ --hash=sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4 \
--hash=sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987 \ --hash=sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba \
--hash=sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32 --hash=sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12 \
sqlparse==0.5.0 \ --hash=sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4
--hash=sha256:714d0a4932c059d16189f58ef5411ec2287a4360f17cdd0edd2d09d4c5087c93 \ # via -r contrib/container/requirements.in
--hash=sha256:c204494cd97479d0e39f28c93d46c0b2d5959c7b9ab904762ea6c7af211c8663 setuptools==73.0.1 \
--hash=sha256:b208925fcb9f7af924ed2dc04708ea89791e24bde0d3020b27df0e116088b34e \
--hash=sha256:d59a3e788ab7e012ab2c4baed1b376da6366883ee20d7a5fc426816e3d7b1193
# via -r contrib/container/requirements.in
sqlparse==0.5.1 \
--hash=sha256:773dcbf9a5ab44a090f3441e2180efe2560220203dc2f8c0b0fa141e18b505e4 \
--hash=sha256:bb6b4df465655ef332548e24f08e205afc81b9ab86cb1c45657a7ff173a3a00e
# via django # via django
typing-extensions==4.11.0 \ typing-extensions==4.12.2 \
--hash=sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0 \ --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \
--hash=sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8
# via # via
# psycopg # psycopg
# psycopg-pool # psycopg-pool
uv==0.1.38 \ uv==0.3.0 \
--hash=sha256:03242a734a572733f2b9a5dbb94517e918fe26fc01114b7c51d12296dfbb8f8b \ --hash=sha256:084551ee0743339aa5d0d4c76a94c9f9df16c33030b850f0cd98f316db7b42cc \
--hash=sha256:067af2d986329db4fa3c7373017d49f0e16ddff23e483b7e5bc3a5a18ce08ea6 \ --hash=sha256:0da4f060d583325846cde0727a8cc0cb4e8c63b30ac9373dae213a7315056d90 \
--hash=sha256:0937ad16ae0e0b6bb6dd3c386f8fb33141ad08d1762eaacffb4d2b27fb466a17 \ --hash=sha256:160a1f3b01298942d6cfe21f95a9b7daa3eb73231ba1fc4689157eb9f23b3438 \
--hash=sha256:0e1d64ac437b0a14fbcec55b1c3f162fa24860711e0d855fcd9c672b149a122a \ --hash=sha256:21ebc6ca30df7ff57a8e17e3abeeba8a9d1d4ac79c1adf842fa42d48a5c7f372 \
--hash=sha256:1be7aa46936c0351ccb1400ea95e5381b3f05fef772fa3b9f23af728cc175dea \ --hash=sha256:24a1388f5e285058f97576b7dfee79bb5007a712a9e368f3fcdcfeb2dfd9ce92 \
--hash=sha256:309e73a3ec3a5a536a3efaf434270fc94b483069f1425765165c1c9d786c27fd \ --hash=sha256:2f937ebdf9976ec1ffe7228fd608ef3e6ce2a61ed68cf7b157ae6900a9c80f41 \
--hash=sha256:4251f9771d392d7badc1e5fb934b397b12ca00fef9d955207ade169cc1f7e872 \ --hash=sha256:39a4276afe0808ca6c033e0cd6cb73249f934b4a0c9d7b18a944f3f8ea635e27 \
--hash=sha256:43772e7589f70e954b1ae29230e575ef9e4d8d769138a94dfa5ae7eaf1e26ac5 \ --hash=sha256:3b62e44f61a154303fc9f4aa87ae54891957d49769d21dcf2be9c22e640c3e92 \
--hash=sha256:4a6024256d38b77151e32876be9fcb99cf75df7a86b26e0161cc202bed558adf \ --hash=sha256:4303364d717b1def58e82b11271259d2ee3bb03da0ca6111819ee254f65b38f4 \
--hash=sha256:5a98d6aacd4b57b7e00daf154919e7c9206fefdf40bd28cfb13efe0e0324d491 \ --hash=sha256:503fc619238550be222b41422b415677c9b8045c92a9815f80ff5d7477671fe6 \
--hash=sha256:8de6dbd8f348ee90af044f4cc7b6650521d25ba2d20a813c1e157a3f90069dd9 \ --hash=sha256:52b3a6110705ff27462ddc68657fedf8a296ed545619a90fa73354f130ad632e \
--hash=sha256:9133e24db9bdd4f412eab69586d03294419825432a9a27ee1b510a4c01eb7b0b \ --hash=sha256:5c826d9daace67d67790503b0c1152093b3cecd35a91de10f5bb9e26afea9de9 \
--hash=sha256:92f65b6e4e5c8126501785af3629dc537d7c82caa56ac9336a86929c73d0e138 \ --hash=sha256:6d1025349cbaeba9a974d413795d0ce8d37de5ad7fb7654c0519968b2c083ba1 \
--hash=sha256:afd85029923e712b6b2c45ddc1680c785392220876c766521e45778db3f71f8e \ --hash=sha256:a15b2321444f3668bc95863d2b13ce44ea54053189427ea48d112ecd8b3d2f89 \
--hash=sha256:b0b15e51a0f8240969bc412ed0dd60cfe3f664b30173139ef263d71c596d631f \ --hash=sha256:a71b7080ee6d7658b22f93aa750cbfd19111cd6c8ac643a73d6778598dd06559 \
--hash=sha256:ea44c07605d1359a7d82bf42706dd86d341f15f4ca2e1f36e51626a7111c2ad5 \ --hash=sha256:b44ebf501de5eef33e4f3cf4b6ea9a458d1f1b3cf26737c25ac507ab7914076a \
--hash=sha256:f87c9711493c53d32012a96b49c4d53aabdf7ed666cbf2c3fb55dd402a6b31a8 --hash=sha256:d3da56b87ec5aa4f2ae572127c754655bad3820dd41a4d37ed4d5e2f67035990 \
wheel==0.43.0 \ --hash=sha256:d87ff76da5128036c05db0291db7510a85cb8efb86538e8f49adc8074bb292f0
--hash=sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85 \ # via -r contrib/container/requirements.in
--hash=sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81 wheel==0.44.0 \
--hash=sha256:2376a90c98cc337d18623527a97c31797bd02bad0033d41547043a1cbfbe448f \
--hash=sha256:a29c3f2817e95ab89aa4660681ad547c0e9547f20e75b0562fe7723c9a2a9d49
# via -r contrib/container/requirements.in

View File

@ -0,0 +1,4 @@
# Packages needed for CI/packages
requests==2.32.3
pyyaml==6.0.2
jc==1.25.3

View File

@ -1,8 +1,8 @@
# This file was autogenerated by uv via the following command: # This file was autogenerated by uv via the following command:
# uv pip compile .github/requirements.in -o .github/requirements.txt --python-version=3.9 --no-strip-extras --generate-hashes # uv pip compile contrib/dev_reqs/requirements.in -o contrib/dev_reqs/requirements.txt --no-strip-extras --generate-hashes
certifi==2024.2.2 \ certifi==2024.7.4 \
--hash=sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f \ --hash=sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b \
--hash=sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1 --hash=sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90
# via requests # via requests
charset-normalizer==3.3.2 \ charset-normalizer==3.3.2 \
--hash=sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027 \ --hash=sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027 \
@ -100,68 +100,73 @@ idna==3.7 \
--hash=sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc \ --hash=sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc \
--hash=sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0 --hash=sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0
# via requests # via requests
jc==1.25.2 \ jc==1.25.3 \
--hash=sha256:26e412a65a478f9da3097653db6277f915cfae5c0f0a3f42026b405936abd358 \ --hash=sha256:ea17a8578497f2da92f73924d9d403f4563ba59422fbceff7bb4a16cdf84a54f \
--hash=sha256:97ada193495f79550f06fe0cbfb119ff470bcca57c1cc593a5cdb0008720e0b3 --hash=sha256:fa3140ceda6cba1210d1362f363cd79a0514741e8a1dd6167db2b2e2d5f24f7b
pygments==2.17.2 \ # via -r contrib/dev_reqs/requirements.in
--hash=sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c \ pygments==2.18.0 \
--hash=sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367 --hash=sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199 \
--hash=sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a
# via jc # via jc
pyyaml==6.0.1 \ pyyaml==6.0.2 \
--hash=sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5 \ --hash=sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff \
--hash=sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc \ --hash=sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48 \
--hash=sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df \ --hash=sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086 \
--hash=sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741 \ --hash=sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e \
--hash=sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206 \ --hash=sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133 \
--hash=sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27 \ --hash=sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5 \
--hash=sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595 \ --hash=sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484 \
--hash=sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62 \ --hash=sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee \
--hash=sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98 \ --hash=sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5 \
--hash=sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696 \ --hash=sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68 \
--hash=sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290 \ --hash=sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a \
--hash=sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9 \ --hash=sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf \
--hash=sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d \ --hash=sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99 \
--hash=sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6 \ --hash=sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8 \
--hash=sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867 \ --hash=sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85 \
--hash=sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47 \ --hash=sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19 \
--hash=sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486 \ --hash=sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc \
--hash=sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6 \ --hash=sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a \
--hash=sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3 \ --hash=sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1 \
--hash=sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007 \ --hash=sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317 \
--hash=sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938 \ --hash=sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c \
--hash=sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0 \ --hash=sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631 \
--hash=sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c \ --hash=sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d \
--hash=sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735 \ --hash=sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652 \
--hash=sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d \ --hash=sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5 \
--hash=sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28 \ --hash=sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e \
--hash=sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4 \ --hash=sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b \
--hash=sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba \ --hash=sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8 \
--hash=sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8 \ --hash=sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476 \
--hash=sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef \ --hash=sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706 \
--hash=sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5 \ --hash=sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563 \
--hash=sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd \ --hash=sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237 \
--hash=sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3 \ --hash=sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b \
--hash=sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0 \ --hash=sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083 \
--hash=sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515 \ --hash=sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180 \
--hash=sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c \ --hash=sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425 \
--hash=sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c \ --hash=sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e \
--hash=sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924 \ --hash=sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f \
--hash=sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34 \ --hash=sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725 \
--hash=sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43 \ --hash=sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183 \
--hash=sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859 \ --hash=sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab \
--hash=sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673 \ --hash=sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774 \
--hash=sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54 \ --hash=sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725 \
--hash=sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a \ --hash=sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e \
--hash=sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b \ --hash=sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5 \
--hash=sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab \ --hash=sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d \
--hash=sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa \ --hash=sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290 \
--hash=sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c \ --hash=sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44 \
--hash=sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585 \ --hash=sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed \
--hash=sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d \ --hash=sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4 \
--hash=sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f --hash=sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba \
requests==2.31.0 \ --hash=sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12 \
--hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ --hash=sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4
--hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 # via -r contrib/dev_reqs/requirements.in
requests==2.32.3 \
--hash=sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760 \
--hash=sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6
# via -r contrib/dev_reqs/requirements.in
ruamel-yaml==0.18.6 \ ruamel-yaml==0.18.6 \
--hash=sha256:57b53ba33def16c4f3d807c0ccbc00f8a6081827e81ba2491691b76882d0c636 \ --hash=sha256:57b53ba33def16c4f3d807c0ccbc00f8a6081827e81ba2491691b76882d0c636 \
--hash=sha256:8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b --hash=sha256:8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b
@ -218,9 +223,9 @@ ruamel-yaml-clib==0.2.8 \
--hash=sha256:f481f16baec5290e45aebdc2a5168ebc6d35189ae6fea7a58787613a25f6e875 \ --hash=sha256:f481f16baec5290e45aebdc2a5168ebc6d35189ae6fea7a58787613a25f6e875 \
--hash=sha256:fff3573c2db359f091e1589c3d7c5fc2f86f5bdb6f24252c2d8e539d4e45f412 --hash=sha256:fff3573c2db359f091e1589c3d7c5fc2f86f5bdb6f24252c2d8e539d4e45f412
# via ruamel-yaml # via ruamel-yaml
urllib3==2.2.1 \ urllib3==2.2.2 \
--hash=sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d \ --hash=sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472 \
--hash=sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19 --hash=sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168
# via requests # via requests
xmltodict==0.13.0 \ xmltodict==0.13.0 \
--hash=sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56 \ --hash=sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56 \

View File

@ -75,6 +75,7 @@ root_command() {
;; ;;
"Debian GNU/Linux" | "debian gnu/linux" | Raspbian) "Debian GNU/Linux" | "debian gnu/linux" | Raspbian)
if [[ $VER == "12" ]]; then if [[ $VER == "12" ]]; then
DIST_VER="11"
SUPPORTED=true SUPPORTED=true
elif [[ $VER == "11" ]]; then elif [[ $VER == "11" ]]; then
SUPPORTED=true SUPPORTED=true

View File

@ -5,33 +5,40 @@
set -eu set -eu
VERSION="$APP_PKG_VERSION-$APP_PKG_ITERATION"
echo "Setting VERSION information to $VERSION"
echo "$VERSION" > VERSION
# The sha is the second element in APP_PKG_ITERATION # The sha is the second element in APP_PKG_ITERATION
VERSION="$APP_PKG_VERSION-$APP_PKG_ITERATION"
SHA=$(echo $APP_PKG_ITERATION | cut -d'.' -f2) SHA=$(echo $APP_PKG_ITERATION | cut -d'.' -f2)
# Download info # Download info
echo "Getting info from github for commit $SHA" echo "INFO collection | Getting info from github for commit $SHA"
curl -L \ curl -L -s -f \
-H "Accept: application/vnd.github+json" \ -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \ -H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/InvenTree/InvenTree/commits/$SHA > commit.json https://api.github.com/repos/$APP_REPO/commits/$SHA > commit.json
curl -L \ echo "INFO collection | Got commit.json with size $(wc -c commit.json)"
curl -L -s -f \
-H "Accept: application/vnd.github+json" \ -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \ -H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/InvenTree/InvenTree/commits/$SHA/branches-where-head > branches.json https://api.github.com/repos/$APP_REPO/commits/$SHA/branches-where-head > branches.json
echo "INFO collection | Got branches.json with size $(wc -c branches.json)"
curl -L -s -f \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$APP_REPO/commits/$APP_PKG_VERSION > tag.json
echo "INFO collection | Got tag.json with size $(wc -c tag.json)"
# Extract info # Extract info
echo "Extracting info from github" echo "INFO extract | Extracting info from github"
DATE=$(jq -r '.commit.committer.date' commit.json) DATE=$(jq -r '.commit.committer.date' commit.json)
BRANCH=$(jq -r '.[].name' branches.json) BRANCH=$(jq -r '.[].name' branches.json)
NODE_ID=$(jq -r '.node_id' commit.json) NODE_ID=$(jq -r '.node_id' commit.json)
SIGNATURE=$(jq -r '.commit.verification.signature' commit.json) SIGNATURE=$(jq -r '.commit.verification.signature' commit.json)
FULL_SHA=$(jq -r '.sha' commit.json)
echo "Write VERSION information" echo "INFO write | Write VERSION information"
echo "$VERSION" > VERSION
echo "INVENTREE_COMMIT_HASH='$SHA'" >> VERSION echo "INVENTREE_COMMIT_HASH='$SHA'" >> VERSION
echo "INVENTREE_COMMIT_SHA='$FULL_SHA'" >> VERSION
echo "INVENTREE_COMMIT_DATE='$DATE'" >> VERSION echo "INVENTREE_COMMIT_DATE='$DATE'" >> VERSION
echo "INVENTREE_PKG_INSTALLER='PKG'" >> VERSION echo "INVENTREE_PKG_INSTALLER='PKG'" >> VERSION
echo "INVENTREE_PKG_BRANCH='$BRANCH'" >> VERSION echo "INVENTREE_PKG_BRANCH='$BRANCH'" >> VERSION
@ -39,5 +46,22 @@ echo "INVENTREE_PKG_TARGET='$TARGET'" >> VERSION
echo "NODE_ID='$NODE_ID'" >> VERSION echo "NODE_ID='$NODE_ID'" >> VERSION
echo "SIGNATURE='$SIGNATURE'" >> VERSION echo "SIGNATURE='$SIGNATURE'" >> VERSION
echo "Written VERSION information" echo "INFO write | Written VERSION information"
echo "### VERSION ###"
cat VERSION cat VERSION
echo "### VERSION ###"
# Try to get frontend
echo "INFO frontend | Trying to get frontend"
# Check if tag sha is the same as the commit sha
TAG_SHA=$(jq -r '.sha' tag.json)
if [ "$TAG_SHA" != "$FULL_SHA" ]; then
echo "INFO frontend | Tag sha '$TAG_SHA' is not the same as commit sha $FULL_SHA, can not download frontend"
else
echo "INFO frontend | Getting frontend from github via tag"
curl https://github.com/$APP_REPO/releases/download/$APP_PKG_VERSION/frontend-build.zip -L -O -f
mkdir -p src/backend/InvenTree/web/static
echo "INFO frontend | Unzipping frontend"
unzip -qq frontend-build.zip -d src/backend/InvenTree/web/static/web
echo "INFO frontend | Unzipped frontend"
fi

View File

@ -2,6 +2,10 @@
# #
# packager.io postinstall script functions # packager.io postinstall script functions
# #
Color_Off='\033[0m'
On_Red='\033[41m'
PYTHON_FROM=9
PYTHON_TO=12
function detect_docker() { function detect_docker() {
if [ -n "$(grep docker </proc/1/cgroup)" ]; then if [ -n "$(grep docker </proc/1/cgroup)" ]; then
@ -44,6 +48,41 @@ function detect_ip() {
echo "IP address is ${INVENTREE_IP}" echo "IP address is ${INVENTREE_IP}"
} }
function detect_python() {
# Detect if there is already a python version installed in /opt/inventree/env/lib
if test -f "${APP_HOME}/env/bin/python"; then
echo "# Python environment already present"
# Extract earliest python version initialised from /opt/inventree/env/lib
SETUP_PYTHON=$(ls -1 ${APP_HOME}/env/bin/python* | sort | head -n 1)
echo "# Found earlier used version: ${SETUP_PYTHON}"
else
echo "# No python environment found - using environment variable: ${SETUP_PYTHON}"
fi
# Try to detect a python between 3.9 and 3.12 in reverse order
if [ -z "$(which ${SETUP_PYTHON})" ]; then
echo "# Trying to detecting python3.${PYTHON_FROM} to python3.${PYTHON_TO} - using newest version"
for i in $(seq $PYTHON_TO -1 $PYTHON_FROM); do
echo "# Checking for python3.${i}"
if [ -n "$(which python3.${i})" ]; then
SETUP_PYTHON="python3.${i}"
echo "# Found python3.${i} installed - using for setup ${SETUP_PYTHON}"
break
fi
done
fi
# Ensure python can be executed - abort if not
if [ -z "$(which ${SETUP_PYTHON})" ]; then
echo "${On_Red}"
echo "# Python ${SETUP_PYTHON} not found - aborting!"
echo "# Please ensure python can be executed with the command '$SETUP_PYTHON' by the current user '$USER'."
echo "# If you are using a different python version, please set the environment variable SETUP_PYTHON to the correct command - eg. 'python3.10'."
echo "${Color_Off}"
exit 1
fi
}
function get_env() { function get_env() {
envname=$1 envname=$1
@ -90,25 +129,25 @@ function detect_envs() {
echo "# Using existing config file: ${INVENTREE_CONFIG_FILE}" echo "# Using existing config file: ${INVENTREE_CONFIG_FILE}"
# Install parser # Install parser
pip install --require-hashes -r ${APP_HOME}/.github/requirements.txt -q pip install --require-hashes -r ${APP_HOME}/contrib/dev_reqs/requirements.txt -q
# Load config # Load config
local CONF=$(cat ${INVENTREE_CONFIG_FILE} | jc --yaml) export INVENTREE_CONF_DATA=$(cat ${INVENTREE_CONFIG_FILE} | jc --yaml)
# Parse the config file # Parse the config file
export INVENTREE_MEDIA_ROOT=$(jq -r '.[].media_root' <<< ${CONF}) export INVENTREE_MEDIA_ROOT=$(jq -r '.[].media_root' <<< ${INVENTREE_CONF_DATA})
export INVENTREE_STATIC_ROOT=$(jq -r '.[].static_root' <<< ${CONF}) export INVENTREE_STATIC_ROOT=$(jq -r '.[].static_root' <<< ${INVENTREE_CONF_DATA})
export INVENTREE_BACKUP_DIR=$(jq -r '.[].backup_dir' <<< ${CONF}) export INVENTREE_BACKUP_DIR=$(jq -r '.[].backup_dir' <<< ${INVENTREE_CONF_DATA})
export INVENTREE_PLUGINS_ENABLED=$(jq -r '.[].plugins_enabled' <<< ${CONF}) export INVENTREE_PLUGINS_ENABLED=$(jq -r '.[].plugins_enabled' <<< ${INVENTREE_CONF_DATA})
export INVENTREE_PLUGIN_FILE=$(jq -r '.[].plugin_file' <<< ${CONF}) export INVENTREE_PLUGIN_FILE=$(jq -r '.[].plugin_file' <<< ${INVENTREE_CONF_DATA})
export INVENTREE_SECRET_KEY_FILE=$(jq -r '.[].secret_key_file' <<< ${CONF}) export INVENTREE_SECRET_KEY_FILE=$(jq -r '.[].secret_key_file' <<< ${INVENTREE_CONF_DATA})
export INVENTREE_DB_ENGINE=$(jq -r '.[].database.ENGINE' <<< ${CONF}) export INVENTREE_DB_ENGINE=$(jq -r '.[].database.ENGINE' <<< ${INVENTREE_CONF_DATA})
export INVENTREE_DB_NAME=$(jq -r '.[].database.NAME' <<< ${CONF}) export INVENTREE_DB_NAME=$(jq -r '.[].database.NAME' <<< ${INVENTREE_CONF_DATA})
export INVENTREE_DB_USER=$(jq -r '.[].database.USER' <<< ${CONF}) export INVENTREE_DB_USER=$(jq -r '.[].database.USER' <<< ${INVENTREE_CONF_DATA})
export INVENTREE_DB_PASSWORD=$(jq -r '.[].database.PASSWORD' <<< ${CONF}) export INVENTREE_DB_PASSWORD=$(jq -r '.[].database.PASSWORD' <<< ${INVENTREE_CONF_DATA})
export INVENTREE_DB_HOST=$(jq -r '.[].database.HOST' <<< ${CONF}) export INVENTREE_DB_HOST=$(jq -r '.[].database.HOST' <<< ${INVENTREE_CONF_DATA})
export INVENTREE_DB_PORT=$(jq -r '.[].database.PORT' <<< ${CONF}) export INVENTREE_DB_PORT=$(jq -r '.[].database.PORT' <<< ${INVENTREE_CONF_DATA})
else else
echo "# No config file found: ${INVENTREE_CONFIG_FILE}, using envs or defaults" echo "# No config file found: ${INVENTREE_CONFIG_FILE}, using envs or defaults"
@ -163,12 +202,20 @@ function create_initscripts() {
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && ${SETUP_PYTHON} -m venv env" sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && ${SETUP_PYTHON} -m venv env"
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && env/bin/pip install invoke wheel" sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && env/bin/pip install invoke wheel"
# Check INSTALLER_EXTRA exists and load it
if test -f "${APP_HOME}/INSTALLER_EXTRA"; then
echo "# Loading extra packages from INSTALLER_EXTRA"
source ${APP_HOME}/INSTALLER_EXTRA
fi
if [ -n "${SETUP_EXTRA_PIP}" ]; then if [ -n "${SETUP_EXTRA_PIP}" ]; then
echo "# Installing extra pip packages" echo "# Installing extra pip packages"
if [ -n "${SETUP_DEBUG}" ]; then if [ -n "${SETUP_DEBUG}" ]; then
echo "# Extra pip packages: ${SETUP_EXTRA_PIP}" echo "# Extra pip packages: ${SETUP_EXTRA_PIP}"
fi fi
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && env/bin/pip install ${SETUP_EXTRA_PIP}" sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && env/bin/pip install ${SETUP_EXTRA_PIP}"
# Write extra packages to INSTALLER_EXTRA
echo "SETUP_EXTRA_PIP='${SETUP_EXTRA_PIP}'" >>${APP_HOME}/INSTALLER_EXTRA
fi fi
fi fi
@ -199,7 +246,11 @@ function create_initscripts() {
} }
function create_admin() { function create_admin() {
# Create data for admin user # Create data for admin users - stop with setting SETUP_ADMIN_NOCREATION to true
if [ "${SETUP_ADMIN_NOCREATION}" == "true" ]; then
echo "# Admin creation is disabled - skipping"
return
fi
if test -f "${SETUP_ADMIN_PASSWORD_FILE}"; then if test -f "${SETUP_ADMIN_PASSWORD_FILE}"; then
echo "# Admin data already exists - skipping" echo "# Admin data already exists - skipping"
@ -267,22 +318,36 @@ function set_env() {
sed -i s=debug:\ True=debug:\ False=g ${INVENTREE_CONFIG_FILE} sed -i s=debug:\ True=debug:\ False=g ${INVENTREE_CONFIG_FILE}
# Database engine # Database engine
sed -i s=#ENGINE:\ sampleengine=ENGINE:\ ${INVENTREE_DB_ENGINE}=g ${INVENTREE_CONFIG_FILE} sed -i s=#\ ENGINE:\ Database\ engine.\ Selection\ from:=ENGINE:\ ${INVENTREE_DB_ENGINE}=g ${INVENTREE_CONFIG_FILE}
# Database name # Database name
sed -i s=#NAME:\ \'/path/to/database\'=NAME:\ \'${INVENTREE_DB_NAME}\'=g ${INVENTREE_CONFIG_FILE} sed -i s=#\ NAME:\ Database\ name=NAME:\ \'${INVENTREE_DB_NAME}\'=g ${INVENTREE_CONFIG_FILE}
# Database user # Database user
sed -i s=#USER:\ sampleuser=USER:\ ${INVENTREE_DB_USER}=g ${INVENTREE_CONFIG_FILE} sed -i s=#\ USER:\ Database\ username\ \(if\ required\)=USER:\ ${INVENTREE_DB_USER}=g ${INVENTREE_CONFIG_FILE}
# Database password # Database password
sed -i s=#PASSWORD:\ samplepassword=PASSWORD:\ ${INVENTREE_DB_PASSWORD}=g ${INVENTREE_CONFIG_FILE} sed -i s=#\ PASSWORD:\ Database\ password\ \(if\ required\)=PASSWORD:\ ${INVENTREE_DB_PASSWORD}=g ${INVENTREE_CONFIG_FILE}
# Database host # Database host
sed -i s=#HOST:\ samplehost=HOST:\ ${INVENTREE_DB_HOST}=g ${INVENTREE_CONFIG_FILE} sed -i s=#\ HOST:\ Database\ host\ address\ \(if\ required\)=HOST:\ ${INVENTREE_DB_HOST}=g ${INVENTREE_CONFIG_FILE}
# Database port # Database port
sed -i s=#PORT:\ 123456=PORT:\ ${INVENTREE_DB_PORT}=g ${INVENTREE_CONFIG_FILE} sed -i s=#\ PORT:\ Database\ host\ port\ \(if\ required\)=PORT:\ ${INVENTREE_DB_PORT}=g ${INVENTREE_CONFIG_FILE}
# Fixing the permissions # Fixing the permissions
chown ${APP_USER}:${APP_GROUP} ${DATA_DIR} ${INVENTREE_CONFIG_FILE} chown ${APP_USER}:${APP_GROUP} ${DATA_DIR} ${INVENTREE_CONFIG_FILE}
} }
function set_site() {
# Ensure IP is known
if [ -z "${INVENTREE_IP}" ]; then
echo "# No IP address found - skipping"
return
fi
# Check if INVENTREE_SITE_URL in inventree config
if [ -z "$(inventree config:get INVENTREE_SITE_URL)" ]; then
echo "# Setting up InvenTree site URL"
inventree config:set INVENTREE_SITE_URL=http://${INVENTREE_IP}
fi
}
function final_message() { function final_message() {
echo -e "####################################################################################" echo -e "####################################################################################"
echo -e "This InvenTree install uses nginx, the settings for the webserver can be found in" echo -e "This InvenTree install uses nginx, the settings for the webserver can be found in"
@ -294,3 +359,44 @@ function final_message() {
echo -e " Password: ${INVENTREE_ADMIN_PASSWORD}" echo -e " Password: ${INVENTREE_ADMIN_PASSWORD}"
echo -e "####################################################################################" echo -e "####################################################################################"
} }
function update_checks() {
echo "# Running upgrade"
local old_version=$1
local old_version_rev=$(echo ${old_version} | cut -d'-' -f1 | cut -d'.' -f2)
echo "# Old version is: ${old_version} - release: ${old_version_rev}"
local ABORT=false
function check_config_value() {
local env_key=$1
local config_key=$2
local name=$3
local value=$(inventree config:get ${env_key})
if [ -z "${value}" ] || [ "$value" == "null" ]; then
value=$(jq -r ".[].${config_key}" <<< ${INVENTREE_CONF_DATA})
fi
if [ -z "${value}" ] || [ "$value" == "null" ]; then
echo "# No setting for ${name} found - please set it manually either in ${INVENTREE_CONFIG_FILE} under '${config_key}' or with 'inventree config:set ${env_key}=value'"
ABORT=true
else
echo "# Found setting for ${name} - ${value}"
fi
}
# Custom checks if old version is below 0.8.0
if [ "${old_version_rev}" -lt "9" ]; then
echo "# Old version is below 0.9.0 - You might be missing some configs"
# Check for BACKUP_DIR and SITE_URL in INVENTREE_CONF_DATA and config
check_config_value "INVENTREE_SITE_URL" "site_url" "site URL"
check_config_value "INVENTREE_BACKUP_DIR" "backup_dir" "backup dir"
if [ "${ABORT}" = true ]; then
echo "# Aborting - please set the missing values and run the update again"
exit 1
fi
echo "# All checks passed - continuing with the update"
fi
}

View File

@ -11,7 +11,7 @@ PATH=${APP_HOME}/env/bin:${APP_HOME}/:/sbin:/bin:/usr/sbin:/usr/bin:
. ${APP_HOME}/contrib/packager.io/functions.sh . ${APP_HOME}/contrib/packager.io/functions.sh
# Envs that should be passed to setup commands # Envs that should be passed to setup commands
export SETUP_ENVS=PATH,APP_HOME,INVENTREE_MEDIA_ROOT,INVENTREE_STATIC_ROOT,INVENTREE_BACKUP_DIR,INVENTREE_PLUGINS_ENABLED,INVENTREE_PLUGIN_FILE,INVENTREE_CONFIG_FILE,INVENTREE_SECRET_KEY_FILE,INVENTREE_DB_ENGINE,INVENTREE_DB_NAME,INVENTREE_DB_USER,INVENTREE_DB_PASSWORD,INVENTREE_DB_HOST,INVENTREE_DB_PORT,INVENTREE_ADMIN_USER,INVENTREE_ADMIN_EMAIL,INVENTREE_ADMIN_PASSWORD,SETUP_NGINX_FILE,SETUP_ADMIN_PASSWORD_FILE,SETUP_NO_CALLS,SETUP_DEBUG,SETUP_EXTRA_PIP,SETUP_PYTHON export SETUP_ENVS=PATH,APP_HOME,INVENTREE_MEDIA_ROOT,INVENTREE_STATIC_ROOT,INVENTREE_BACKUP_DIR,INVENTREE_SITE_URL,INVENTREE_PLUGINS_ENABLED,INVENTREE_PLUGIN_FILE,INVENTREE_CONFIG_FILE,INVENTREE_SECRET_KEY_FILE,INVENTREE_DB_ENGINE,INVENTREE_DB_NAME,INVENTREE_DB_USER,INVENTREE_DB_PASSWORD,INVENTREE_DB_HOST,INVENTREE_DB_PORT,INVENTREE_ADMIN_USER,INVENTREE_ADMIN_EMAIL,INVENTREE_ADMIN_PASSWORD,SETUP_NGINX_FILE,SETUP_ADMIN_PASSWORD_FILE,SETUP_NO_CALLS,SETUP_DEBUG,SETUP_EXTRA_PIP,SETUP_PYTHON,SETUP_ADMIN_NOCREATION
# Get the envs # Get the envs
detect_local_env detect_local_env
@ -24,6 +24,7 @@ export SETUP_NGINX_FILE=${SETUP_NGINX_FILE:-/etc/nginx/sites-enabled/inventree.c
export SETUP_ADMIN_PASSWORD_FILE=${CONF_DIR}/admin_password.txt export SETUP_ADMIN_PASSWORD_FILE=${CONF_DIR}/admin_password.txt
export SETUP_NO_CALLS=${SETUP_NO_CALLS:-false} export SETUP_NO_CALLS=${SETUP_NO_CALLS:-false}
export SETUP_PYTHON=${SETUP_PYTHON:-python3.9} export SETUP_PYTHON=${SETUP_PYTHON:-python3.9}
export SETUP_ADMIN_NOCREATION=${SETUP_ADMIN_NOCREATION:-false}
# SETUP_DEBUG can be set to get debug info # SETUP_DEBUG can be set to get debug info
# SETUP_EXTRA_PIP can be set to install extra pip packages # SETUP_EXTRA_PIP can be set to install extra pip packages
# SETUP_PYTHON can be set to use a different python version # SETUP_PYTHON can be set to use a different python version
@ -33,6 +34,15 @@ detect_envs
detect_docker detect_docker
detect_initcmd detect_initcmd
detect_ip detect_ip
detect_python
# Check if we are updating and need to alert
echo "# Checking if update checks are needed"
if [ -z "$2" ]; then
echo "# Normal install - no need for checks"
else
update_checks $2
fi
# create processes # create processes
create_initscripts create_initscripts
@ -45,6 +55,7 @@ update_or_install
if [ "${SETUP_CONF_LOADED}" = "true" ]; then if [ "${SETUP_CONF_LOADED}" = "true" ]; then
set_env set_env
fi fi
set_site
start_inventree start_inventree
# show info # show info

View File

@ -0,0 +1,20 @@
#!/bin/bash
#
# packager.io preinstall/preremove script
#
PATH=${APP_HOME}/env/bin:${APP_HOME}/:/sbin:/bin:/usr/sbin:/usr/bin:
# Envs that should be passed to setup commands
export SETUP_ENVS=PATH,APP_HOME,INVENTREE_MEDIA_ROOT,INVENTREE_STATIC_ROOT,INVENTREE_BACKUP_DIR,INVENTREE_PLUGINS_ENABLED,INVENTREE_PLUGIN_FILE,INVENTREE_CONFIG_FILE,INVENTREE_SECRET_KEY_FILE,INVENTREE_DB_ENGINE,INVENTREE_DB_NAME,INVENTREE_DB_USER,INVENTREE_DB_PASSWORD,INVENTREE_DB_HOST,INVENTREE_DB_PORT,INVENTREE_ADMIN_USER,INVENTREE_ADMIN_EMAIL,INVENTREE_ADMIN_PASSWORD,SETUP_NGINX_FILE,SETUP_ADMIN_PASSWORD_FILE,SETUP_NO_CALLS,SETUP_DEBUG,SETUP_EXTRA_PIP,SETUP_PYTHON
if test -f "${APP_HOME}/env/bin/pip"; then
# Check if clear-generated is available
if sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke clear-generated --help" > /dev/null 2>&1; then
echo "# Clearing precompiled files"
sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke clear-generated"
else
echo "# Clearing precompiled files - skipping"
fi
else
echo "# No python environment found - skipping"
fi

View File

@ -1,8 +1,14 @@
# Configuration file for Crowdin project integration
# See: https://crowdin.com/project/inventree
"commit_message": "Fix: New translations %original_file_name% from Crowdin" "commit_message": "Fix: New translations %original_file_name% from Crowdin"
"append_commit_message": false "append_commit_message": false
"preserve_hierarchy": true
files: files:
- source: /src/backend/InvenTree/locale/en/LC_MESSAGES/django.po - source: /src/backend/InvenTree/locale/en/LC_MESSAGES/django.po
dest: /%original_path%/%original_file_name%
translation: /src/backend/InvenTree/locale/%two_letters_code%/LC_MESSAGES/%original_file_name% translation: /src/backend/InvenTree/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%
- source: /src/frontend/src/locales/en/messages.po - source: /src/frontend/src/locales/en/messages.po
dest: /%original_path%/%original_file_name%
translation: /src/frontend/src/locales/%two_letters_code%/%original_file_name% translation: /src/frontend/src/locales/%two_letters_code%/%original_file_name%

4
docs/.gitignore vendored
View File

@ -13,6 +13,10 @@ site/
# Generated API schema files # Generated API schema files
docs/api/schema/*.yml docs/api/schema/*.yml
# Temporary cache files
url_cache.txt
invoke-commands.txt
# Temp files # Temp files
releases.json releases.json
versions.json versions.json

View File

@ -10,7 +10,7 @@ tld = os.path.abspath(os.path.join(here, '..'))
config_file = os.path.join(tld, 'mkdocs.yml') config_file = os.path.join(tld, 'mkdocs.yml')
with open(config_file, 'r') as f: with open(config_file, encoding='utf-8') as f:
data = yaml.load(f, yaml.BaseLoader) data = yaml.load(f, yaml.BaseLoader)
assert data['strict'] == 'true' assert data['strict'] == 'true'

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

View File

@ -4,7 +4,11 @@ title: Internal Barcodes
## Internal Barcodes ## Internal Barcodes
InvenTree defines an internal format for generating barcodes for various items. This format uses a simple JSON-style string to uniquely identify an item in the database. InvenTree ships with two integrated internal formats for generating barcodes for various items which are available through the built-in InvenTree Barcode plugin. The used format can be selected through the plugin settings of the InvenTree Barcode plugin.
### 1. JSON-based QR Codes
This format uses a simple JSON-style string to uniquely identify an item in the database.
Some simple examples of this format are shown below: Some simple examples of this format are shown below:
@ -12,10 +16,49 @@ Some simple examples of this format are shown below:
| --- | --- | | --- | --- |
| Part | `{% raw %}{"part": 10}{% endraw %}` | | Part | `{% raw %}{"part": 10}{% endraw %}` |
| Stock Item | `{% raw %}{"stockitem": 123}{% endraw %}` | | Stock Item | `{% raw %}{"stockitem": 123}{% endraw %}` |
| Stock Location | `{% raw %}{"stocklocation": 1}{% endraw %}` |
| Supplier Part | `{% raw %}{"supplierpart": 99}{% endraw %}` | | Supplier Part | `{% raw %}{"supplierpart": 99}{% endraw %}` |
The numerical ID value used is the *Primary Key* (PK) of the particular object in the database. The numerical ID value used is the *Primary Key* (PK) of the particular object in the database.
#### Downsides
1. The JSON format includes binary only characters (`{% raw %}{{% endraw %}` and `{% raw %}"{% endraw %}`) which requires unnecessary use of the binary QR code encoding which means fewer amount of chars can be encoded with the same version of QR code.
2. The model name key has not a fixed length. Some model names are longer than others. E.g. a part QR code with the shortest possible id requires 11 chars, while a stock location QR code with the same id would already require 20 chars, which already requires QR code version 2 and quickly version 3.
!!! info "QR code versions"
There are 40 different qr code versions from 1-40. They all can encode more data than the previous version, but require more "squares". E.g. a V1 QR codes has 21x21 "squares" while a V2 already has 25x25. For more information see [QR code comparison](https://www.qrcode.com/en/about/version.html).
For a more detailed size analysis of the JSON-based QR codes refer to [this issue](https://github.com/inventree/InvenTree/issues/6612).
### 2. Short alphanumeric QR Codes
While JSON-based QR Codes encode all necessary information, they come with the described downsides. This new, short, alphanumeric only format is build to improve those downsides. The basic format uses an alphanumeric string: `INV-??x`
- `INV-` is a constant prefix. This is configurable in the InvenTree Barcode plugins settings per instance to support environments that use multiple instances.
- `??` is a two character alphanumeric (`0-9A-Z $%*+-./:` (45 chars)) code, individual to each model.
- `x` the actual pk of the model.
Now with an overhead of 6 chars for every model, this format supports the following amount of model instances using the described QR code modes:
| QR code mode | Alphanumeric mode | Mixed mode |
| --- | --- | --- |
| v1 M ECL (15%) | `10**14` items (~3.170 items per sec for 1000 years) | `10**20` items (~3.170.979.198 items per sec for 1000 years) |
| v1 Q ECL (25%) | `10**10` items (~0.317 items per sec for 1000 years) | `10**13` items (~317 items per sec for 1000 years) |
| v1 H ECL (30%) | `10**4` items (~100 items per day for 100 days) | `10**3` items (~100 items per day for 10 days (*even worse*)) |
!!! info "QR code mixed mode"
Normally the QR code data is encoded only in one format (binary, alphanumeric, numeric). But the data can also be split into multiple chunks using different formats. This is especially useful with long model ids, because the first 6 chars can be encoded using the alphanumeric mode and the id using the more efficient numeric mode. Mixed mode is used by default, because the `qrcode` template tag uses a default value for optimize of 1.
Some simple examples of this format are shown below:
| Model Type | Example Barcode |
| --- | --- |
| Part | `INV-PA10` |
| Stock Item | `INV-SI123` |
| Stock Location | `INV-SL1` |
| Supplier Part | `INV-SP99` |
## Report Integration ## Report Integration
This barcode format can be used to generate 1D or 2D barcodes (e.g. for [labels and reports](../report/barcodes.md)) This barcode format can be used to generate 1D or 2D barcodes (e.g. for [labels and reports](../report/barcodes.md))

View File

@ -26,14 +26,6 @@ To navigate to the Build Order display, select *Build* from the main navigation
{% include "img.html" %} {% include "img.html" %}
{% endwith %} {% endwith %}
#### Tree View
*Tree View* also provides a tabulated view of Build Orders. Orders are displayed in a hierarchical manner, showing any parent / child relationships between different build orders.
{% with id="build_tree", url="build/build_tree.png", description="Build Tree" %}
{% include "img.html" %}
{% endwith %}
#### Calendar View #### Calendar View
*Calendar View* shows a calendar display with upcoming build orders, based on the various dates specified for each build. *Calendar View* shows a calendar display with upcoming build orders, based on the various dates specified for each build.
@ -74,10 +66,23 @@ Each *Build Order* has an associated *Status* flag, which indicates the state of
| Status | Description | | Status | Description |
| ----------- | ----------- | | ----------- | ----------- |
| `Pending` | Build has been created and build is ready for subpart allocation | | `Pending` | Build order has been created, but is not yet in production |
| `Production` | One or more build outputs have been created for this build | | `Production` | Build order is currently in production |
| `Cancelled` | Build has been cancelled | | `On Hold` | Build order has been placed on hold, but is still active |
| `Completed` | Build has been completed | | `Cancelled` | Build order has been cancelled |
| `Completed` | Build order has been completed |
**Source Code**
Refer to the source code for the Build Order status codes:
::: build.status_codes.BuildStatus
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
### Stock Allocations ### Stock Allocations
@ -99,41 +104,29 @@ For further information, refer to the [stock allocation documentation](./allocat
## Build Order Display ## Build Order Display
The detail view for a single build order provides multiple display tabs, as follows: The detail view for a single build order provides multiple display panels, as follows:
### Build Details ### Build Details
The *Build Details* tab provides an overview of the Build Order: The *Build Details* panel provides an overview of the Build Order:
{% with id="build_details", url="build/build_details.png", description="Details tab" %} {% with id="build_details", url="build/build_panel_details.png", description="Build details panel" %}
{% include "img.html" %} {% include "img.html" %}
{% endwith %} {% endwith %}
### Allocate Stock ### Line Items
The *Allocate Stock* tab provides an interface to allocate required stock (as specified by the BOM) to the build: The *Line Items* panel displays all the line items (as defined by the [bill of materials](./bom.md)) required to complete the build order.
{% with id="build_allocate", url="build/build_allocate.png", description="Allocation tab" %} {% with id="build_allocate", url="build/build_panel_line_items.png", description="Build line items panel" %}
{% include "img.html" %} {% include "img.html" %}
{% endwith %} {% endwith %}
The allocation table (as shown above) shows the stock allocation progress for this build. In the example above, there are two BOM lines, which have been partially allocated. The allocation table (as shown above) provides an interface to allocate required stock, and also shows the stock allocation progress for each line item in the build.
!!! info "Completed Builds" ### Incomplete Outputs
The *Allocate Stock* tab is not available if the build has been completed!
### Consumed Stock The *Incomplete Outputs* panel shows the list of in-progress [build outputs](./output.md) (created stock items) associated with this build.
The *Consumed Stock* tab displays all stock items which have been *consumed* by this build order. These stock items remain in the database after the build order has been completed, but are no longer available for use.
- [Tracked stock items](./allocate.md#tracked-stock) are consumed by specific build outputs
- [Untracked stock items](./allocate.md#untracked-stock) are consumed by the build order
### Build Outputs
The *Build Outputs* tab shows the [build outputs](./output.md) (created stock items) associated with this build.
As shown below, there are separate panels for *incomplete* and *completed* build outputs.
{% with id="build_outputs", url="build/build_outputs.png", description="Outputs tab" %} {% with id="build_outputs", url="build/build_outputs.png", description="Outputs tab" %}
{% include "img.html" %} {% include "img.html" %}
@ -146,11 +139,48 @@ As shown below, there are separate panels for *incomplete* and *completed* build
- Outputs which are "in progress" can be completed or cancelled - Outputs which are "in progress" can be completed or cancelled
- Completed outputs (which are simply *stock items*) can be viewed in the stock table at the bottom of the screen - Completed outputs (which are simply *stock items*) can be viewed in the stock table at the bottom of the screen
### Completed Outputs
This panel displays all the completed build outputs (stock items) which have been created by this build order:
### Allocated Stock
The *Allocated Stock* tab displays all stock items which have been *allocated* to this build order. These stock items are reserved for this build, and will be consumed when the build is completed:
{% with id="allocated_stock_table", url="build/allocated_stock_table.png", description="Allocated Stock Table" %}
{% include "img.html" %}
{% endwith %}
### Consumed Stock
The *Consumed Stock* tab displays all stock items which have been *consumed* by this build order. These stock items remain in the database after the build order has been completed, but are no longer available for use.
- [Tracked stock items](./allocate.md#tracked-stock) are consumed by specific build outputs
- [Untracked stock items](./allocate.md#untracked-stock) are consumed by the build order
### Child Builds ### Child Builds
If there exist any build orders which are *children* of the selected build order, they are displayed in the *Child Builds* tab: If there exist any build orders which are *children* of the selected build order, they are displayed in the *Child Builds* tab:
{% with id="build_childs", url="build/build_childs.png", description="Child builds tab" %} {% with id="build_childs", url="build/build_childs.png", description="Child builds panel" %}
{% include "img.html" %}
{% endwith %}
### Test Results
For *trackable* parts, test results can be recorded against each build output. These results are displayed in the *Test Results* panel:
{% with id="build_test_results", url="build/build_panel_test_results.png", description="Test Results panel" %}
{% include "img.html" %}
{% endwith %}
This table provides a summary of the test results for each build output, and allows test results to be quickly added for each build output.
### Test Statistics
For *trackable* parts, this panel displays a summary of the test results for all build outputs:
{% with id="build_test_stats", url="build/build_panel_test_statistics.png", description="Test Statistics panel" %}
{% include "img.html" %} {% include "img.html" %}
{% endwith %} {% endwith %}
@ -191,6 +221,10 @@ To create a build order for your part, you have two options:
Fill-out the form as required, then click the "Submit" button to create the build. Fill-out the form as required, then click the "Submit" button to create the build.
### Create Child Builds
When creating a new build order, you have the option to automatically generate build orders for any subassembly parts. This can be useful to create a complete tree of build orders for a complex assembly. *However*, it must be noted that any build orders created for subassemblies will use the default BOM quantity for that part. Any child build orders created in this manner must be manually reviewed, to ensure that the correct quantity is being built as per your production requirements.
## Complete Build Order ## Complete Build Order
To complete a build, click on <span class='fas fa-tools'></span> icon on the build detail page, the `Complete Build` form will be displayed. To complete a build, click on <span class='fas fa-tools'></span> icon on the build detail page, the `Complete Build` form will be displayed.
@ -234,3 +268,17 @@ Build orders may (optionally) have a target complete date specified. If this dat
- Builds can be filtered by overdue status in the build list - Builds can be filtered by overdue status in the build list
- Overdue builds will be displayed on the home page - Overdue builds will be displayed on the home page
## Build Order Settings
The following [global settings](../settings/global.md) are available for adjusting the behavior of build orders:
| Name | Description | Default | Units |
| ---- | ----------- | ------- | ----- |
{{ globalsetting("BUILDORDER_REFERENCE_PATTERN") }}
{{ globalsetting("BUILDORDER_REQUIRE_RESPONSIBLE") }}
{{ globalsetting("BUILDORDER_REQUIRE_ACTIVE_PART") }}
{{ globalsetting("BUILDORDER_REQUIRE_LOCKED_PART") }}
{{ globalsetting("BUILDORDER_REQUIRE_VALID_BOM") }}
{{ globalsetting("BUILDORDER_REQUIRE_CLOSED_CHILDS") }}
{{ globalsetting("PREVENT_BUILD_COMPLETION_HAVING_INCOMPLETED_TESTS") }}

View File

@ -0,0 +1,15 @@
---
title: Custom States
---
## Custom States
Several models within InvenTree support the use of custom states. The custom states are display only - the business logic is not affected by the state.
States can be added in the Admin Center under the "Custom States" section. Each state has a name, label and a color that are used to display the state in the user interface. Changes to these settings will only be reflected in the user interface after a full reload of the interface.
States need to be assigned to a model, state (for example status on a StockItem) and a logical key - that will be used for business logic. These 3 values combined need to be unique throughout the system.
Custom states can be used in the following models:
- StockItem
- Orders (PurchaseOrder, SalesOrder, ReturnOrder, ReturnOrderLine)

View File

@ -4,4 +4,22 @@ title: InvenTree Demo
## InvenTree Demo ## InvenTree Demo
This page has moved to [https://inventree.org/demo.html](https://inventree.org/demo.html) If you are interested in trying out InvenTree, you can access the InvenTree demo instance at [https://demo.inventree.org](https://demo.inventree.org).
This page is populated with a sample dataset, which is reset every 24 hours.
You can read more about the InvenTree demo here: [https://inventree.org/demo.html](https://inventree.org/demo.html)
### User Accounts
The demo instance has a number of user accounts which you can use to explore the system:
| Username | Password | Staff Access | Enabled | Description |
| -------- | -------- | ------------ | ------- | ----------- |
| allaccess | nolimits | No | Yes | View / create / edit all pages and items |
| reader | readonly | No | Yes | Can view all pages but cannot create, edit or delete database records |
| engineer | partsonly | No | Yes | Can manage parts, view stock, but no access to purchase orders or sales orders |
| steven | wizardstaff | Yes | Yes | Staff account, can access some admin sections |
| ian | inactive | No | No | Inactive account, cannot log in |
| susan | inactive | No | No | Inactive account, cannot log in |
| admin | inventree | Yes | Yes | Superuser account, can access all parts of the system |

View File

@ -22,9 +22,9 @@ To setup a development environment using [docker](../start/docker.md), run the f
```bash ```bash
git clone https://github.com/inventree/InvenTree.git && cd InvenTree git clone https://github.com/inventree/InvenTree.git && cd InvenTree
docker compose run inventree-dev-server invoke install docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run --rm inventree-dev-server invoke install
docker compose run inventree-dev-server invoke setup-test --dev docker compose --project-directory . -f contrib/container/dev-docker-compose.yml run --rm inventree-dev-server invoke setup-test --dev
docker compose up -d docker compose --project-directory . -f contrib/container/dev-docker-compose.yml up -d
``` ```
### Bare Metal ### Bare Metal
@ -54,13 +54,23 @@ invoke setup-dev
InvenTree roughly follow the [GitLab flow](https://docs.gitlab.com/ee/topics/gitlab_flow.html) branching style, to allow simple management of multiple tagged releases, short-lived branches, and development on the main branch. InvenTree roughly follow the [GitLab flow](https://docs.gitlab.com/ee/topics/gitlab_flow.html) branching style, to allow simple management of multiple tagged releases, short-lived branches, and development on the main branch.
There are nominally 5 active branches:
- `master` - The main development branch
- `stable` - The latest stable release
- `l10n` - Translation branch: Source to Crowdin
- `l10_crowdin` - Translation branch: Source from Crowdin
- `y.y.x` - Release branch for the currently supported version (e.g. `0.5.x`)
All other branches are removed periodically by maintainers or core team members. This includes old release branches.
Do not use them as base for feature development or forks as patches from them might not be accepted without rebasing.
### Version Numbering ### Version Numbering
InvenTree version numbering follows the [semantic versioning](https://semver.org/) specification. InvenTree version numbering follows the [semantic versioning](https://semver.org/) specification.
### Master Branch ### Main Development Branch
The HEAD of the "main" or "master" branch of InvenTree represents the current "latest" state of code development. The HEAD of the "master" branch of InvenTree represents the current "latest" state of code development.
- All feature branches are merged into master - All feature branches are merged into master
- All bug fixes are merged into master - All bug fixes are merged into master
@ -73,7 +83,6 @@ Feature branches should be branched *from* the *master* branch.
- One major feature per branch / pull request - One major feature per branch / pull request
- Feature pull requests are merged back *into* the master branch - Feature pull requests are merged back *into* the master branch
- Features *may* also be merged into a release candidate branch
### Stable Branch ### Stable Branch
@ -82,21 +91,28 @@ The HEAD of the "stable" branch represents the latest stable release code.
- Versioned releases are merged into the "stable" branch - Versioned releases are merged into the "stable" branch
- Bug fix branches are made *from* the "stable" branch - Bug fix branches are made *from* the "stable" branch
#### Release Candidate Branches
- Release candidate branches are made from master, and merged into stable. ### Bugfix Branches
- RC branches are targeted at a major/minor version e.g. "0.5"
- When a release candidate branch is merged into *stable*, the release is tagged
#### Bugfix Branches
- If a bug is discovered in a tagged release version of InvenTree, a "bugfix" or "hotfix" branch should be made *from* that tagged release - If a bug is discovered in a tagged release version of InvenTree, a "bugfix" or "hotfix" branch should be made *from* that tagged release
- When approved, the branch is merged back *into* stable, with an incremented PATCH number (e.g. 0.4.1 -> 0.4.2) - When approved, the branch is merged back *into* stable, with an incremented PATCH number (e.g. 0.4.1 -> 0.4.2)
- The bugfix *must* also be cherry picked into the *master* branch. - The bugfix *must* also be cherry picked into the *master* branch.
- A bugfix *might* also be backported from *master* to the *stable* branch automatically if marked with the `backport` label.
### Translation Branches
Crowdin is used for web-based translation management. The handling of files is fully automated, the `l10n` and `l10_crowdin` branches are used to manage the translation process and are not meant to be touched manually by anyone.
The translation process is as follows:
1. Commits to `master` trigger CI by GitHub Actions
2. Translation source files are created and automatically pushed to the `l10n` branch - this is the source branch for Crowdin
3. Crowdin picks up on the new source files and makes them available for translation
4. Translations made in Crowdin are automatically pushed back to the `l10_crowdin` branch by Crowdin once they are approved
5. The `l10_crowdin` branch is merged back into `master` by a maintainer periodically
## API versioning ## API versioning
The [API version](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/InvenTree/api_version.py) needs to be bumped every time when the API is changed. The [API version]({{ sourcefile("src/backend/InvenTree/InvenTree/api_version.py") }}) needs to be bumped every time when the API is changed.
## Environment ## Environment
@ -109,7 +125,7 @@ The core software modules are targeting the following versions:
| Python | {{ config.extra.min_python_version }} | Minimum required version | | Python | {{ config.extra.min_python_version }} | Minimum required version |
| Invoke | {{ config.extra.min_invoke_version }} | Minimum required version | | Invoke | {{ config.extra.min_invoke_version }} | Minimum required version |
| Django | {{ config.extra.django_version }} | Pinned version | | Django | {{ config.extra.django_version }} | Pinned version |
| Node | 18 | Only needed for frontend development | | Node | 20 | Only needed for frontend development |
Any other software dependencies are handled by the project package config. Any other software dependencies are handled by the project package config.

View File

@ -18,12 +18,13 @@ You need to make sure that you have the following tools installed before continu
#### Docker Containers #### Docker Containers
The InvenTree devcontainer setup will install two docker containers: The InvenTree devcontainer setup will install the following docker containers:
| Container | Description | | Container | Description |
| --- | --- | | --- | --- |
| inventree | InvenTree host server |
| db | InvenTree database (postgresql) | | db | InvenTree database (postgresql) |
| inventree | InvenTree server | | redis | Redis server for caching |
#### Setup/Installation #### Setup/Installation
@ -66,7 +67,7 @@ If you need to process your queue with background workers, run the `worker` task
You can either only run InvenTree or use the integrated debugger for debugging. Goto the `Run and debug` side panel make sure `InvenTree Server` is selected. Click on the play button on the left. You can either only run InvenTree or use the integrated debugger for debugging. Goto the `Run and debug` side panel make sure `InvenTree Server` is selected. Click on the play button on the left.
!!! tip "Debug with 3rd party" !!! tip "Debug with 3rd party"
Sometimes you need to debug also some 3rd party packages. Just select `InvenTree Servre - 3rd party` Sometimes you need to debug also some 3rd party packages. Just select `InvenTree Server - 3rd party`
You can now set breakpoints and vscode will automatically pause execution if that point is hit. You can see all variables available in that context and evaluate some code with the debugger console at the bottom. Use the play or step buttons to continue execution. You can now set breakpoints and vscode will automatically pause execution if that point is hit. You can see all variables available in that context and evaluate some code with the debugger console at the bottom. Use the play or step buttons to continue execution.
@ -119,3 +120,9 @@ If you are running a devcontainer in Windows, you may experience some performanc
For a significant improvement in performance, the source code should be installed into the **WSL 2** filesystem (not on your "Windows" filesystem). This will greatly improve file access performance, and also make the devcontainer much more responsive to file system changes. For a significant improvement in performance, the source code should be installed into the **WSL 2** filesystem (not on your "Windows" filesystem). This will greatly improve file access performance, and also make the devcontainer much more responsive to file system changes.
You can also refer to the [Improve disk performance guide](https://code.visualstudio.com/remote/advancedcontainers/improve-performance) for more information. You can also refer to the [Improve disk performance guide](https://code.visualstudio.com/remote/advancedcontainers/improve-performance) for more information.
### Redis Caching
The devcontainer setup provides a [redis](https://redis.io/) container which can be used for managing global cache. By default this is disabled, but it can be easily enabled for testing or developing with the [redis cache](../start/config.md#caching) enabled.
To enable the cache, locate the InvenTree configuration file (`./dev/config.yaml`) and set the `cache.enabled` setting to `True`.

View File

@ -149,7 +149,7 @@ class SampleActionPlugin(ActionMixin, InvenTreePlugin):
# metadata # metadata
AUTHOR = "Sample Author" AUTHOR = "Sample Author"
DESCRIPTION = "A very basic plugin with one mixin" DESCRIPTION = "A very basic plugin with one mixin"
PUBLISH_DATE = "22.02.2222" PUBLISH_DATE = "2222-02-22"
VERSION = "1.2.3" # We recommend semver and increase the major version with each new major release of InvenTree VERSION = "1.2.3" # We recommend semver and increase the major version with each new major release of InvenTree
WEBSITE = "https://example.com/" WEBSITE = "https://example.com/"
LICENSE = "MIT" # use what you want - OSI approved is &hearts; LICENSE = "MIT" # use what you want - OSI approved is &hearts;

View File

@ -6,6 +6,9 @@ title: Machines
InvenTree has a builtin machine registry. There are different machine types available where each type can have different drivers. Drivers and even custom machine types can be provided by plugins. InvenTree has a builtin machine registry. There are different machine types available where each type can have different drivers. Drivers and even custom machine types can be provided by plugins.
!!! info "Requires Redis"
If the machines features is used in production setup using workers, a shared [redis cache](../../start/docker.md#redis-cache) is required to function properly.
### Registry ### Registry
The machine registry is the main component which gets initialized on server start and manages all configured machines. The machine registry is the main component which gets initialized on server start and manages all configured machines.
@ -21,6 +24,13 @@ The machine registry initialization process can be divided into three stages:
2. The driver.init_driver function is called for each used driver 2. The driver.init_driver function is called for each used driver
3. The machine.initialize function is called for each machine, which calls the driver.init_machine function for each machine, then the machine.initialized state is set to true 3. The machine.initialize function is called for each machine, which calls the driver.init_machine function for each machine, then the machine.initialized state is set to true
#### Production setup (with a worker)
If a worker is connected, there exist multiple instances of the machine registry (one in each worker thread and one in the main thread) due to the nature of how python handles state in different processes. Therefore the machine instances and drivers are instantiated multiple times (The `__init__` method is called multiple times). But the init functions and update hooks (e.g. `init_machine`) are only called once from the main process.
The registry, driver and machine state (e.g. machine status codes, errors, ...) is stored in the cache. Therefore a shared redis cache is needed. (The local in-memory cache which is used by default is not capable to cache across multiple processes)
### Machine types ### Machine types
Each machine type can provide a different type of connection functionality between inventree and a physical machine. These machine types are already built into InvenTree. Each machine type can provide a different type of connection functionality between inventree and a physical machine. These machine types are already built into InvenTree.
@ -37,6 +47,8 @@ If you want to create your own machine type, please also take a look at the alre
```py ```py
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from generic.states import ColorEnum
from plugin.machine import BaseDriver, BaseMachineType, MachineStatus from plugin.machine import BaseDriver, BaseMachineType, MachineStatus
class ABCBaseDriver(BaseDriver): class ABCBaseDriver(BaseDriver):
@ -62,9 +74,9 @@ class ABCMachine(BaseMachineType):
base_driver = ABCBaseDriver base_driver = ABCBaseDriver
class ABCStatus(MachineStatus): class ABCStatus(MachineStatus):
CONNECTED = 100, _('Connected'), 'success' CONNECTED = 100, _('Connected'), ColorEnum.success
STANDBY = 101, _('Standby'), 'success' STANDBY = 101, _('Standby'), ColorEnum.success
PRINTING = 110, _('Printing'), 'primary' PRINTING = 110, _('Printing'), ColorEnum.primary
MACHINE_STATUS = ABCStatus MACHINE_STATUS = ABCStatus
default_machine_status = ABCStatus.DISCONNECTED default_machine_status = ABCStatus.DISCONNECTED
@ -86,6 +98,7 @@ The machine type class gets instantiated for each machine on server startup and
- update - update
- restart - restart
- handle_error - handle_error
- clear_errors
- get_setting - get_setting
- set_setting - set_setting
- check_setting - check_setting

View File

@ -9,14 +9,14 @@ The InvenTree server code supports an extensible plugin architecture, allowing c
Plugins can be added from multiple sources: Plugins can be added from multiple sources:
- Plugins can be installed in InvenTrees venv via PIP (python package manager) - Plugins can be installed in InvenTrees venv via PIP (python package manager)
- Custom plugins should be placed in the directory `./src/backend/InvenTree/plugins`. - Custom plugins should be placed in the directory `./data/plugins`.
- InvenTree built-in plugins are located in the directory `./src/backend/InvenTree/plugin/builtin`. - InvenTree built-in plugins are located in the directory `./src/backend/InvenTree/plugin/builtin`.
For further information, read more about [installing plugins](./plugins/install.md). For further information, read more about [installing plugins](./plugins/install.md).
### Plugin Base Class ### Plugin Base Class
Custom plugins must inherit from the [InvenTreePlugin class](https://github.com/inventree/InvenTree/blob/2d1776a151721d65d0ae007049d358085b2fcfd5/InvenTree/plugin/plugin.py#L204). Any plugins installed via the methods outlined above will be "discovered" when the InvenTree server launches. Custom plugins must inherit from the [InvenTreePlugin class]({{ sourcefile("src/backend/InvenTree/plugin/plugin.py") }}). Any plugins installed via the methods outlined above will be "discovered" when the InvenTree server launches.
!!! warning "Namechange" !!! warning "Namechange"
The name of the base class was changed with `0.7.0` from `IntegrationPluginBase` to `InvenTreePlugin`. While the old name is still available till `0.8.0` we strongly suggest upgrading your plugins. Deprecation warnings are raised if the old name is used. The name of the base class was changed with `0.7.0` from `IntegrationPluginBase` to `InvenTreePlugin`. While the old name is still available till `0.8.0` we strongly suggest upgrading your plugins. Deprecation warnings are raised if the old name is used.
@ -28,7 +28,7 @@ Please read all release notes and watch out for warnings - we generally provide
#### Plugins #### Plugins
General classes and mechanisms are provided under the `plugin` [namespaces](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/__init__.py). These include: General classes and mechanisms are provided under the `plugin` [namespaces]({{ sourcefile("src/backend/InvenTree/plugin/__init__.py") }}). These include:
```python ```python
# Management objects # Management objects
@ -44,7 +44,7 @@ MixinNotImplementedError # Is raised if a mixin was not implemented (core mec
#### Mixins #### Mixins
Mixins are split up internally to keep the source tree clean and enable better testing separation. All public APIs that should be used are exposed under `plugin.mixins`. These include all built-in mixins and notification methods. An up-to-date reference can be found in the source code (current master can be [found here](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/mixins/__init__.py)). Mixins are split up internally to keep the source tree clean and enable better testing separation. All public APIs that should be used are exposed under `plugin.mixins`. These include all built-in mixins and notification methods. An up-to-date reference can be found in the source code [can be found here]({{ sourcefile("src/backend/InvenTree/plugin/mixins/__init__.py") }}).
#### Models and other internal InvenTree APIs #### Models and other internal InvenTree APIs
@ -72,7 +72,7 @@ MIN_VERSION = None # Lowest InvenTree version number that is supported by the p
MAX_VERSION = None # Highest InvenTree version number that is supported by the plugin MAX_VERSION = None # Highest InvenTree version number that is supported by the plugin
``` ```
Refer to the [sample plugins](https://github.com/inventree/InvenTree/tree/master/src/backend/InvenTree/plugin/samples) for further examples. Refer to the [sample plugins]({{ sourcedir("src/backend/InvenTree/plugin/samples") }}) for further examples.
### Plugin Config ### Plugin Config

View File

@ -15,4 +15,14 @@ POST {
} }
``` ```
For an example of a very simple action plugin, refer to `/src/backend/InvenTree/plugin/samples/integratoni/simpleactionplugin.py` ### Sample Plugin
A sample action plugin is provided in the `InvenTree` source code, which can be used as a template for creating custom action plugins:
::: plugin.samples.integration.simpleactionplugin.SimpleActionPlugin
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []

View File

@ -5,3 +5,15 @@ title: Schedule Mixin
## APICallMixin ## APICallMixin
The APICallMixin class provides basic functionality for integration with an external API. The APICallMixin class provides basic functionality for integration with an external API.
### Sample Plugin
The following example demonstrates how to use the `APICallMixin` class to make a simple API call:
::: plugin.samples.integration.api_caller.SampleApiCallerPlugin
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []

View File

@ -2,11 +2,11 @@
title: Barcode Mixin title: Barcode Mixin
--- ---
### Barcode Plugins ## Barcode Plugins
InvenTree supports decoding of arbitrary barcode data via a **Barcode Plugin** interface. Barcode data POSTed to the `/api/barcode/` endpoint will be supplied to all loaded barcode plugins, and the first plugin to successfully interpret the barcode data will return a response to the client. InvenTree supports decoding of arbitrary barcode data and generation of internal barcode formats via a **Barcode Plugin** interface. Barcode data POSTed to the `/api/barcode/` endpoint will be supplied to all loaded barcode plugins, and the first plugin to successfully interpret the barcode data will return a response to the client.
InvenTree can generate native QR codes to represent database objects (e.g. a single StockItem). This barcode can then be used to perform quick lookup of a stock item or location in the database. A client application (for example the InvenTree mobile app) scans a barcode, and sends the barcode data to the InvenTree server. The server then uses the **InvenTreeBarcodePlugin** (found at `/src/backend/InvenTree/plugins/barcode/inventree.py`) to decode the supplied barcode data. InvenTree can generate native QR codes to represent database objects (e.g. a single StockItem). This barcode can then be used to perform quick lookup of a stock item or location in the database. A client application (for example the InvenTree mobile app) scans a barcode, and sends the barcode data to the InvenTree server. The server then uses the **InvenTreeBarcodePlugin** (found at `src/backend/InvenTree/plugin/builtin/barcodes/inventree_barcode.py`) to decode the supplied barcode data.
Any third-party barcodes can be decoded by writing a matching plugin to decode the barcode data. These plugins could then perform a server-side action or render a JSON response back to the client for further action. Any third-party barcodes can be decoded by writing a matching plugin to decode the barcode data. These plugins could then perform a server-side action or render a JSON response back to the client for further action.
@ -24,15 +24,27 @@ POST {
} }
``` ```
### Example ### Builtin Plugin
Please find below a very simple example that is executed each time a barcode is scanned.
The InvenTree server includes a builtin barcode plugin which can generate and decode the QR codes. This plugin is enabled by default.
::: plugin.builtin.barcodes.inventree_barcode.InvenTreeInternalBarcodePlugin
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
### Example Plugin
Please find below a very simple example that is used to return a part if the barcode starts with `PART-`
```python ```python
from django.utils.translation import gettext_lazy as _
from InvenTree.models import InvenTreeBarcodeMixin
from plugin import InvenTreePlugin from plugin import InvenTreePlugin
from plugin.mixins import BarcodeMixin from plugin.mixins import BarcodeMixin
from part.models import Part
class InvenTreeBarcodePlugin(BarcodeMixin, InvenTreePlugin): class InvenTreeBarcodePlugin(BarcodeMixin, InvenTreePlugin):
@ -42,16 +54,39 @@ class InvenTreeBarcodePlugin(BarcodeMixin, InvenTreePlugin):
VERSION = "0.0.1" VERSION = "0.0.1"
AUTHOR = "Michael" AUTHOR = "Michael"
status = 0
def scan(self, barcode_data): def scan(self, barcode_data):
if barcode_data.startswith("PART-"):
try:
pk = int(barcode_data.split("PART-")[1])
instance = Part.objects.get(pk=pk)
label = Part.barcode_model_type()
self.status = self.status+1 return {label: instance.format_matched_response()}
print('Started barcode plugin', self.status) except Part.DoesNotExist:
print(barcode_data) pass
response = {}
return response
``` ```
To try it just copy the file to src/InvenTree/plugins and restart the server. Open the scan barcode window and start to scan codes or type in text manually. Each time the timeout is hit the plugin will execute and printout the result. The timeout can be changed in `Settings->Barcode Support->Barcode Input Delay`. To try it just copy the file to src/InvenTree/plugins and restart the server. Open the scan barcode window and start to scan codes or type in text manually. Each time the timeout is hit the plugin will execute and printout the result. The timeout can be changed in `Settings->Barcode Support->Barcode Input Delay`.
### Custom Internal Format
To implement a custom internal barcode format, the `generate(...)` method from the Barcode Mixin needs to be overridden. Then the plugin can be selected at `System Settings > Barcodes > Barcode Generation Plugin`.
```python
from InvenTree.models import InvenTreeBarcodeMixin
from plugin import InvenTreePlugin
from plugin.mixins import BarcodeMixin
class InvenTreeBarcodePlugin(BarcodeMixin, InvenTreePlugin):
NAME = "MyInternalBarcode"
TITLE = "My Internal Barcodes"
DESCRIPTION = "support for custom internal barcodes"
VERSION = "0.0.1"
AUTHOR = "InvenTree contributors"
def generate(self, model_instance: InvenTreeBarcodeMixin):
return f'{model_instance.barcode_model_type()}: {model_instance.pk}'
```
!!! info "Scanning implementation required"
The parsing of the custom format needs to be implemented too, so that the scanning of the generated QR codes resolves to the correct part.

View File

@ -6,7 +6,24 @@ title: Currency Exchange Mixin
The `CurrencyExchangeMixin` class enabled plugins to provide custom backends for updating currency exchange rate information. The `CurrencyExchangeMixin` class enabled plugins to provide custom backends for updating currency exchange rate information.
Any implementing classes must provide the `update_exchange_rates` method. A simple example is shown below (with fake data). Any implementing classes must provide the `update_exchange_rates` method.
### Builtin Plugin
The default builtin plugin for handling currency exchange rates is the `InvenTreeCurrencyExchangePlugin` class.
::: plugin.builtin.integration.currency_exchange.InvenTreeCurrencyExchange
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
### Sample Plugin
A simple example is shown below (with fake data).
```python ```python

View File

@ -15,56 +15,34 @@ When a certain (server-side) event occurs, the background worker passes the even
{% include 'img.html' %} {% include 'img.html' %}
{% endwith %} {% endwith %}
### Example (all events) ### Sample Plugin - All events
Implementing classes must at least provide a `process_event` function: Implementing classes must at least provide a `process_event` function:
```python ::: plugin.samples.event.event_sample.EventPluginSample
class EventPlugin(EventMixin, InvenTreePlugin): options:
""" show_bases: False
A simple example plugin which responds to events on the InvenTree server. show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
This example simply prints out the event information. ### Sample Plugin - Specific Events
A more complex plugin could respond to specific events however it wanted.
"""
NAME = "EventPlugin"
SLUG = "event"
TITLE = "Triggered Events"
def process_event(self, event, *args, **kwargs):
print(f"Processing triggered event: '{event}'")
```
### Example (specific events)
If you want to process just some specific events, you can also implement the `wants_process_event` function to decide if you want to process this event or not. This function will be executed synchronously, so be aware that it should contain simple logic. If you want to process just some specific events, you can also implement the `wants_process_event` function to decide if you want to process this event or not. This function will be executed synchronously, so be aware that it should contain simple logic.
Overall this function can reduce the workload on the background workers significantly since less events are queued to be processed. Overall this function can reduce the workload on the background workers significantly since less events are queued to be processed.
```python ::: plugin.samples.event.filtered_event_sample.FilteredEventPluginSample
class EventPlugin(EventMixin, InvenTreePlugin): options:
""" show_bases: False
A simple example plugin which responds to 'salesordershipment.completed' event on the InvenTree server. show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
This example simply prints out the event information.
A more complex plugin can run enhanced logic on this event.
"""
NAME = "EventPlugin" ## Events
SLUG = "event"
TITLE = "Triggered Events"
def wants_process_event(self, event):
"""Here you can decide if this event should be send to `process_event` or not."""
return event == "salesordershipment.completed"
def process_event(self, event, *args, **kwargs):
"""Here you can run you'r specific logic."""
print(f"Sales order was completely shipped: '{args}' '{kwargs}'")
```
### Events
Events are passed through using a string identifier, e.g. `build.completed` Events are passed through using a string identifier, e.g. `build.completed`

View File

@ -0,0 +1,19 @@
---
title: Icon Pack Mixin
---
## IconPackMixin
The IconPackMixin class provides basic functionality for letting plugins expose custom icon packs that are available in the InvenTree UI. This is especially useful to provide a custom crafted icon pack with icons for different location types, e.g. different sizes and styles of drawers, bags, ESD bags, ... which are not available in the standard tabler icons library.
### Sample Plugin
The following example demonstrates how to use the `IconPackMixin` class to add a custom icon pack:
::: plugin.samples.icons.icon_sample.SampleIconPlugin
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []

View File

@ -74,10 +74,10 @@ Admin users can install plugins directly from the web interface, via the "Plugin
#### Local Directory #### Local Directory
Custom plugins can be placed in the `src/InvenTree/plugins/` directory, where they will be automatically discovered. This can be useful for developing and testing plugins, but can prove more difficult in production (e.g. when using Docker). Custom plugins can be placed in the `data/plugins/` directory, where they will be automatically discovered. This can be useful for developing and testing plugins, but can prove more difficult in production (e.g. when using Docker).
!!! info "Git Tracking" !!! info "Git Tracking"
The `src/backend/InvenTree/plugins/` directory is excluded from Git version tracking - any plugin files here will be hidden from Git The `data/plugins/` directory is excluded from Git version tracking - any plugin files here will be hidden from Git
!!! warning "Not Recommended For Production" !!! warning "Not Recommended For Production"
Loading plugins via the local *plugins* directory is not recommended for production. If you cannot use PIP installation (above), specify a custom plugin directory (below) or use a [VCS](https://pip.pypa.io/en/stable/topics/vcs-support/) as a plugin install source. Loading plugins via the local *plugins* directory is not recommended for production. If you cannot use PIP installation (above), specify a custom plugin directory (below) or use a [VCS](https://pip.pypa.io/en/stable/topics/vcs-support/) as a plugin install source.

View File

@ -172,6 +172,14 @@ InvenTree supplies the `InvenTreeLabelPlugin` out of the box, which generates a
The default plugin also features a *DEBUG* mode which generates a raw HTML output, rather than PDF. This can be handy for tracking down any template rendering errors in your labels. The default plugin also features a *DEBUG* mode which generates a raw HTML output, rather than PDF. This can be handy for tracking down any template rendering errors in your labels.
::: plugin.builtin.labels.inventree_label.InvenTreeLabelPlugin
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
### Available Data ### Available Data
The *label* data are supplied to the plugin in both `PDF` and `PNG` formats. This provides compatibility with a great range of label printers "out of the box". Conversion to other formats, if required, is left as an exercise for the plugin developer. The *label* data are supplied to the plugin in both `PDF` and `PNG` formats. This provides compatibility with a great range of label printers "out of the box". Conversion to other formats, if required, is left as an exercise for the plugin developer.

View File

@ -28,4 +28,16 @@ If a locate plugin is installed and activated, the [InvenTree mobile app](../../
### Implementation ### Implementation
Refer to the [InvenTree source code](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/samples/locate/locate_sample.py) for a simple implementation example. Refer to the [InvenTree source code]({{ sourcefile("src/backend/InvenTree/plugin/samples/locate/locate_sample.py") }}) for a simple implementation example.
### Sample Plugin
A simple example is provided in the InvenTree code base:
::: plugin.samples.locate.locate_sample.SampleLocatePlugin
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []

View File

@ -52,6 +52,18 @@ Or to add a template file that will be rendered as javascript code, from the plu
Note : see convention for template directory above. Note : see convention for template directory above.
## Sample Plugin
A sample plugin is provided in the InvenTree code base:
::: plugin.samples.integration.custom_panel_sample.CustomPanelSample
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
## Example Implementations ## Example Implementations
Refer to the `CustomPanelSample` example class in the `./plugin/samples/integration/` directory, for a fully worked example of how custom UI panels can be implemented. Refer to the `CustomPanelSample` example class in the `./plugin/samples/integration/` directory, for a fully worked example of how custom UI panels can be implemented.

View File

@ -14,48 +14,14 @@ A plugin which implements the ReportMixin mixin can define the `add_report_conte
Additionally the `add_label_context` method, allowing custom context data to be added to a label template at time of printing. Additionally the `add_label_context` method, allowing custom context data to be added to a label template at time of printing.
### Example ### Sample Plugin
A sample plugin which provides additional context data to the report templates can be found [in the InvenTree source code](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/samples/integration/report_plugin_sample.py): A sample plugin which provides additional context data to the report templates is available:
```python ::: plugin.samples.integration.report_plugin_sample.SampleReportPlugin
"""Sample plugin for extending reporting functionality""" options:
show_bases: False
import random show_root_heading: False
show_root_toc_entry: False
from plugin import InvenTreePlugin show_source: True
from plugin.mixins import ReportMixin members: []
from report.models import PurchaseOrderReport
class SampleReportPlugin(ReportMixin, InvenTreePlugin):
"""Sample plugin which provides extra context data to a report"""
NAME = "Sample Report Plugin"
SLUG = "reportexample"
TITLE = "Sample Report Plugin"
DESCRIPTION = "A sample plugin which provides extra context data to a report"
VERSION = "1.0"
def some_custom_function(self):
"""Some custom function which is not required for the plugin to function"""
return random.randint(0, 100)
def add_report_context(self, report_instance, model_instance, request, context):
"""Add example content to the report instance"""
# We can add any extra context data we want to the report
# Generate a random string of data
context['random_text'] = ''.join(random.choices('abcdefghijklmnopqrstuvwxyz', k=20))
# Call a custom method
context['random_int'] = self.some_custom_function()
# We can also add extra data to the context which is specific to the report type
context['is_purchase_order'] = isinstance(report_instance, PurchaseOrderReport)
# We can also use the 'request' object to add extra context data
context['request_method'] = request.method
```

View File

@ -18,45 +18,14 @@ The ScheduleMixin class provides a plugin with the ability to call functions at
{% include 'img.html' %} {% include 'img.html' %}
{% endwith %} {% endwith %}
### Example ### SamplePlugin
An example of a plugin which supports scheduled tasks: An example of a plugin which supports scheduled tasks:
```python ::: plugin.samples.integration.scheduled_task.ScheduledTaskPlugin
class ScheduledTaskPlugin(ScheduleMixin, SettingsMixin, InvenTreePlugin): options:
""" show_bases: False
Sample plugin which runs a scheduled task, and provides user configuration. show_root_heading: False
""" show_root_toc_entry: False
show_source: True
NAME = "Scheduled Tasks" members: []
SLUG = 'schedule'
SCHEDULED_TASKS = {
'global': {
'func': 'some_module.function',
'schedule': 'H', # Run every hour
},
'member': {
'func': 'foo',
'schedule': 'I', # Minutes
'minutes': 15,
},
}
SETTINGS = {
'SECRET': {
'name': 'A secret',
'description': 'User configurable value',
},
}
def foo(self):
"""
This function runs every 15 minutes
"""
secret_value = self.get_setting('SECRET')
print(f"foo - SECRET = {secret_value})
```
!!! info "More Info"
For more information on any of the methods described below, refer to the InvenTree source code. [A working example is available as a starting point](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/samples/integration/scheduled_task.py).

View File

@ -15,7 +15,7 @@ The dict must be formatted similar to the following sample that shows how to use
Take a look at the settings defined in `InvenTree.common.models.InvenTreeSetting` for all possible parameters. Take a look at the settings defined in `InvenTree.common.models.InvenTreeSetting` for all possible parameters.
### Example ### Example Plugin
Below is a simple example of how a plugin can implement settings: Below is a simple example of how a plugin can implement settings:

View File

@ -65,7 +65,7 @@ Additionally, add the following imports after the extended line.
#### Blocks #### Blocks
The page_base file is split into multiple sections called blocks. This allows you to implement sections of the webpage while getting many items like navbars, sidebars, and general layout provided for you. The page_base file is split into multiple sections called blocks. This allows you to implement sections of the webpage while getting many items like navbars, sidebars, and general layout provided for you.
The current default page base can be found [here](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/templates/page_base.html). Look through this file to determine overridable blocks. The [stock app](https://github.com/inventree/InvenTree/tree/master/src/backend/InvenTree/stock) offers a great example of implementing these blocks. The current default page base can be found [here]({{ sourcefile("src/backend/InvenTree/templates/page_base.html") }}). Look through this file to determine overridable blocks. The [stock app]({{ sourcedir("src/backend/InvenTree/stock") }}) offers a great example of implementing these blocks.
!!! warning "Sidebar Block" !!! warning "Sidebar Block"
You may notice that implementing the `sidebar` block doesn't initially work. Be sure to enable the sidebar using JavaScript. This can be achieved by appending the following code, replacing `label` with a label of your choosing, to the end of your template file. You may notice that implementing the `sidebar` block doesn't initially work. Be sure to enable the sidebar using JavaScript. This can be achieved by appending the following code, replacing `label` with a label of your choosing, to the end of your template file.

View File

@ -9,34 +9,40 @@ The `ValidationMixin` class enables plugins to perform custom validation of obje
Any of the methods described below can be implemented in a custom plugin to provide functionality as required. Any of the methods described below can be implemented in a custom plugin to provide functionality as required.
!!! info "More Info" !!! info "More Info"
For more information on any of the methods described below, refer to the InvenTree source code. [A working example is available as a starting point](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/samples/integration/validation_sample.py). For more information on any of the methods described below, refer to the InvenTree source code. [A working example is available as a starting point]({{ sourcefile("src/backend/InvenTree/plugin/samples/integration/validation_sample.py") }}).
!!! info "Multi Plugin Support" !!! info "Multi Plugin Support"
It is possible to have multiple plugins loaded simultaneously which support validation methods. For example when validating a field, if one plugin returns a null value (`None`) then the *next* plugin (if available) will be queried. It is possible to have multiple plugins loaded simultaneously which support validation methods. For example when validating a field, if one plugin returns a null value (`None`) then the *next* plugin (if available) will be queried.
## Model Deletion
Any model which inherits the `PluginValidationMixin` class is exposed to the plugin system for custom deletion validation. Before the model is deleted from the database, it is first passed to the plugin ecosystem to check if it really should be deleted.
A custom plugin may implement the `validate_model_deletion` method to perform custom validation on the model instance before it is deleted.
::: plugin.base.integration.ValidationMixin.ValidationMixin.validate_model_deletion
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_sources: True
summary: False
members: []
## Model Validation ## Model Validation
Any model which inherits the `PluginValidationMixin` mixin class is exposed to the plugin system for custom validation. Before the model is saved to the database (either when created, or updated), it is first passed to the plugin ecosystem for validation. Any model which inherits the `PluginValidationMixin` mixin class is exposed to the plugin system for custom validation. Before the model is saved to the database (either when created, or updated), it is first passed to the plugin ecosystem for validation.
Any plugin which inherits the `ValidationMixin` can implement the `validate_model_instance` method, and run a custom validation routine. Any plugin which inherits the `ValidationMixin` can implement the `validate_model_instance` method, and run a custom validation routine.
The `validate_model_instance` method is passed the following arguments: ::: plugin.base.integration.ValidationMixin.ValidationMixin.validate_model_instance
options:
| Argument | Description | show_bases: False
| --- | --- | show_root_heading: False
| `instance` | The model instance to be validated | show_root_toc_entry: False
| `deltas` | A dict of field deltas (if the instance is being updated) | show_sources: True
summary: False
```python members: []
def validate_model_instance(self, instance, deltas=None):
"""Validate the supplied model instance.
Arguments:
instance: The model instance to be validated
deltas: A dict of field deltas (if the instance is being updated)
"""
...
```
### Error Messages ### Error Messages
@ -52,7 +58,7 @@ To indicate a *field* validation error (i.e. the validation error applies only t
Note that an error can be which corresponds to multiple model instance fields. Note that an error can be which corresponds to multiple model instance fields.
### Example ### Example Plugin
Presented below is a simple working example for a plugin which implements the `validate_model_instance` method: Presented below is a simple working example for a plugin which implements the `validate_model_instance` method:
@ -102,21 +108,70 @@ By default, part names are not subject to any particular naming conventions or r
If the custom method determines that the part name is *objectionable*, it should throw a `ValidationError` which will be handled upstream by parent calling methods. If the custom method determines that the part name is *objectionable*, it should throw a `ValidationError` which will be handled upstream by parent calling methods.
::: plugin.base.integration.ValidationMixin.ValidationMixin.validate_part_name
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_sources: True
summary: False
members: []
### Part IPN ### Part IPN
Validation of the Part IPN (Internal Part Number) field is exposed to custom plugins via the `validate_part_IPN` method. Any plugins which extend the `ValidationMixin` class can implement this method, and raise a `ValidationError` if the IPN value does not match a required convention. Validation of the Part IPN (Internal Part Number) field is exposed to custom plugins via the `validate_part_ipn` method. Any plugins which extend the `ValidationMixin` class can implement this method, and raise a `ValidationError` if the IPN value does not match a required convention.
::: plugin.base.integration.ValidationMixin.ValidationMixin.validate_part_ipn
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_sources: True
summary: False
members: []
### Part Parameter Values ### Part Parameter Values
[Part parameters](../../part/parameter.md) can also have custom validation rules applied, by implementing the `validate_part_parameter` method. A plugin which implements this method should raise a `ValidationError` with an appropriate message if the part parameter value does not match a required convention. [Part parameters](../../part/parameter.md) can also have custom validation rules applied, by implementing the `validate_part_parameter` method. A plugin which implements this method should raise a `ValidationError` with an appropriate message if the part parameter value does not match a required convention.
::: plugin.base.integration.ValidationMixin.ValidationMixin.validate_part_parameter
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_sources: True
summary: False
members: []
### Batch Codes ### Batch Codes
[Batch codes](../../stock/tracking.md#batch-codes) can be generated and/or validated by custom plugins. [Batch codes](../../stock/tracking.md#batch-codes) can be generated and/or validated by custom plugins.
#### Validate Batch Code
The `validate_batch_code` method allows plugins to raise an error if a batch code input by the user does not meet a particular pattern. The `validate_batch_code` method allows plugins to raise an error if a batch code input by the user does not meet a particular pattern.
The `generate_batch_code` method can be implemented to generate a new batch code. ::: plugin.base.integration.ValidationMixin.ValidationMixin.validate_batch_code
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_sources: True
summary: False
members: []
#### Generate Batch Code
The `generate_batch_code` method can be implemented to generate a new batch code, based on a set of provided information.
::: plugin.base.integration.ValidationMixin.ValidationMixin.generate_batch_code
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_sources: True
summary: False
members: []
### Serial Numbers ### Serial Numbers
@ -128,17 +183,30 @@ The default InvenTree [serial numbering system](../../stock/tracking.md#serial-n
Custom serial number validation can be implemented using the `validate_serial_number` method. A *proposed* serial number is passed to this method, which then has the opportunity to raise a `ValidationError` to indicate that the serial number is not valid. Custom serial number validation can be implemented using the `validate_serial_number` method. A *proposed* serial number is passed to this method, which then has the opportunity to raise a `ValidationError` to indicate that the serial number is not valid.
::: plugin.base.integration.ValidationMixin.ValidationMixin.validate_serial_number
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_sources: True
summary: False
members: []
!!! info "Stock Item"
If the `stock_item` argument is provided, then this stock item has already been assigned with the provided serial number. This stock item should be excluded from any subsequent checks for *uniqueness*. The `stock_item` parameter is optional, and may be `None` if the serial number is being validated in a context where no stock item is available.
##### Example ##### Example
A plugin which requires all serial numbers to be valid hexadecimal values may implement this method as follows: A plugin which requires all serial numbers to be valid hexadecimal values may implement this method as follows:
```python ```python
def validate_serial_number(self, serial: str, part: Part): def validate_serial_number(self, serial: str, part: Part, stock_item: StockItem = None):
"""Validate the supplied serial number """Validate the supplied serial number
Arguments: Arguments:
serial: The proposed serial number (string) serial: The proposed serial number (string)
part: The Part instance for which this serial number is being validated part: The Part instance for which this serial number is being validated
stock_item: The StockItem instance for which this serial number is being validated
""" """
try: try:
@ -154,6 +222,15 @@ While InvenTree supports arbitrary text values in the serial number fields, behi
A custom plugin can implement the `convert_serial_to_int` method to determine how a particular serial number is converted to an integer representation. A custom plugin can implement the `convert_serial_to_int` method to determine how a particular serial number is converted to an integer representation.
::: plugin.base.integration.ValidationMixin.ValidationMixin.convert_serial_to_int
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_sources: True
summary: False
members: []
!!! info "Not Required" !!! info "Not Required"
If this method is not implemented, or the serial number cannot be converted to an integer, then the sorting algorithm falls back to the text (string) value If this method is not implemented, or the serial number cannot be converted to an integer, then the sorting algorithm falls back to the text (string) value
@ -163,6 +240,15 @@ A core component of the InvenTree serial number system is the ability to *increm
For custom serial number schemes, it is important to provide a method to generate the *next* serial number given a current value. The `increment_serial_number` method can be implemented by a plugin to achieve this. For custom serial number schemes, it is important to provide a method to generate the *next* serial number given a current value. The `increment_serial_number` method can be implemented by a plugin to achieve this.
::: plugin.base.integration.ValidationMixin.ValidationMixin.increment_serial_number
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_sources: True
summary: False
members: []
!!! info "Invalid Increment" !!! info "Invalid Increment"
If the provided number cannot be incremented (or an error occurs) the method should return `None` If the provided number cannot be incremented (or an error occurs) the method should return `None`
@ -182,3 +268,15 @@ def increment_serial_number(self, serial: str):
return val return val
``` ```
## Sample Plugin
A sample plugin which implements custom validation routines is provided in the InvenTree source code:
::: plugin.samples.integration.validation_sample.SampleValidatorPlugin
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []

View File

@ -14,7 +14,7 @@ Navigate to the "Settings" page and click on the "Display" tab, you should see t
{% include 'img.html' %} {% include 'img.html' %}
{% endwith %} {% endwith %}
The drop-down list let's you select any other color theme found in your static folder (see next section to find out how to [add color themes](#add-color-themes)). Once selected, click on the "Apply Theme" button for the new color theme to be activated. The drop-down list let's you select any other color theme found in your static folder (see next section to find out how to [add color themes](#add-color-theme)). Once selected, click on the "Apply Theme" button for the new color theme to be activated.
!!! info "Per-user Setting" !!! info "Per-user Setting"
Color themes are "user specific" which means that changing the color theme in your own settings won't affect other users. Color themes are "user specific" which means that changing the color theme in your own settings won't affect other users.

View File

@ -57,7 +57,7 @@ def fetch_rtd_versions():
versions = sorted(versions, key=lambda x: StrictVersion(x['version']), reverse=True) versions = sorted(versions, key=lambda x: StrictVersion(x['version']), reverse=True)
# Add "latest" version first # Add "latest" version first
if not any((x['title'] == 'latest' for x in versions)): if not any(x['title'] == 'latest' for x in versions):
versions.insert( versions.insert(
0, 0,
{ {
@ -70,7 +70,7 @@ def fetch_rtd_versions():
# Ensure we have the 'latest' version # Ensure we have the 'latest' version
current_version = os.environ.get('READTHEDOCS_VERSION', None) current_version = os.environ.get('READTHEDOCS_VERSION', None)
if current_version and not any((x['title'] == current_version for x in versions)): if current_version and not any(x['title'] == current_version for x in versions):
versions.append({ versions.append({
'version': current_version, 'version': current_version,
'title': current_version, 'title': current_version,
@ -82,7 +82,7 @@ def fetch_rtd_versions():
print('Discovered the following versions:') print('Discovered the following versions:')
print(versions) print(versions)
with open(output_filename, 'w') as file: with open(output_filename, 'w', encoding='utf-8') as file:
json.dump(versions, file, indent=2) json.dump(versions, file, indent=2)
@ -100,7 +100,7 @@ def get_release_data():
# Release information has been cached to file # Release information has been cached to file
print("Loading release information from 'releases.json'") print("Loading release information from 'releases.json'")
with open(json_file) as f: with open(json_file, encoding='utf-8') as f:
return json.loads(f.read()) return json.loads(f.read())
# Download release information via the GitHub API # Download release information via the GitHub API
@ -127,7 +127,7 @@ def get_release_data():
page += 1 page += 1
# Cache these results to file # Cache these results to file
with open(json_file, 'w') as f: with open(json_file, 'w', encoding='utf-8') as f:
print("Saving release information to 'releases.json'") print("Saving release information to 'releases.json'")
f.write(json.dumps(releases)) f.write(json.dumps(releases))
@ -173,7 +173,7 @@ def on_config(config, *args, **kwargs):
# Add *all* readthedocs related keys # Add *all* readthedocs related keys
readthedocs = {} readthedocs = {}
for key in os.environ.keys(): for key in os.environ:
if key.startswith('READTHEDOCS_'): if key.startswith('READTHEDOCS_'):
k = key.replace('READTHEDOCS_', '').lower() k = key.replace('READTHEDOCS_', '').lower()
readthedocs[k] = os.environ[key] readthedocs[k] = os.environ[key]

View File

@ -20,8 +20,25 @@ Each Purchase Order has a specific status code which indicates the current state
| --- | --- | | --- | --- |
| Pending | The purchase order has been created, but has not been submitted to the supplier | | Pending | The purchase order has been created, but has not been submitted to the supplier |
| In Progress | The purchase order has been issued to the supplier, and is in progress | | In Progress | The purchase order has been issued to the supplier, and is in progress |
| On Hold | The purchase order has been placed on hold, but is still active |
| Complete | The purchase order has been completed, and is now closed | | Complete | The purchase order has been completed, and is now closed |
| Cancelled | The purchase order was cancelled, and is now closed | | Cancelled | The purchase order was cancelled, and is now closed |
| Lost | The purchase order was lost, and is now closed |
| Returned | The purchase order was returned, and is now closed |
**Source Code**
Refer to the source code for the Purchase Order status codes:
::: order.status_codes.PurchaseOrderStatus
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
Purchase Order Status supports [custom states](../concepts/custom_states.md).
### Purchase Order Currency ### Purchase Order Currency
@ -124,3 +141,14 @@ This view can be accessed externally as an ICS calendar using a URL like the fol
`http://inventree.example.org/api/order/calendar/purchase-order/calendar.ics` `http://inventree.example.org/api/order/calendar/purchase-order/calendar.ics`
by default, completed orders are not exported. These can be included by appending `?include_completed=True` to the URL. by default, completed orders are not exported. These can be included by appending `?include_completed=True` to the URL.
## Purchase Order Settings
The following [global settings](../settings/global.md) are available for purchase orders:
| Name | Description | Default | Units |
| ---- | ----------- | ------- | ----- |
{{ globalsetting("PURCHASEORDER_REFERENCE_PATTERN") }}
{{ globalsetting("PURCHASEORDER_REQUIRE_RESPONSIBLE") }}
{{ globalsetting("PURCHASEORDER_EDIT_COMPLETED_ORDERS") }}
{{ globalsetting("PURCHASEORDER_AUTO_COMPLETE") }}

View File

@ -45,9 +45,24 @@ Each Return Order has a specific status code, as follows:
| --- | --- | | --- | --- |
| Pending | The return order has been created, but not sent to the customer | | Pending | The return order has been created, but not sent to the customer |
| In Progress | The return order has been issued to the customer | | In Progress | The return order has been issued to the customer |
| On Hold | The return order has been placed on hold, but is still active |
| Complete | The return order was marked as complete, and is now closed | | Complete | The return order was marked as complete, and is now closed |
| Cancelled | The return order was cancelled, and is now closed | | Cancelled | The return order was cancelled, and is now closed |
**Source Code**
Refer to the source code for the Return Order status codes:
::: order.status_codes.ReturnOrderStatus
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
Return Order Status supports [custom states](../concepts/custom_states.md).
## Create a Return Order ## Create a Return Order
From the Return Order index, click on <span class='badge inventree add'><span class='fas fa-plus-circle'></span> New Return Order</span> which opens the "Create Return Order" form. From the Return Order index, click on <span class='badge inventree add'><span class='fas fa-plus-circle'></span> New Return Order</span> which opens the "Create Return Order" form.
@ -98,7 +113,7 @@ While [line items](#line-items) must reference a particular stock item, extra li
## Return Order Reports ## Return Order Reports
Custom [reports](../report/return_order.md) can be generated against each Return Order. Custom [reports](../report/templates.md) can be generated against each Return Order.
### Calendar view ### Calendar view
@ -108,3 +123,14 @@ This view can be accessed externally as an ICS calendar using a URL like the fol
`http://inventree.example.org/api/order/calendar/return-order/calendar.ics` `http://inventree.example.org/api/order/calendar/return-order/calendar.ics`
by default, completed orders are not exported. These can be included by appending `?include_completed=True` to the URL. by default, completed orders are not exported. These can be included by appending `?include_completed=True` to the URL.
## Return Order Settings
The following [global settings](../settings/global.md) are available for return orders:
| Name | Description | Default | Units |
| ---- | ----------- | ------- | ----- |
{{ globalsetting("RETURNORDER_ENABLED") }}
{{ globalsetting("RETURNORDER_REFERENCE_PATTERN") }}
{{ globalsetting("RETURNORDER_REQUIRE_RESPONSIBLE") }}
{{ globalsetting("RETURNORDER_EDIT_COMPLETED_ORDERS") }}

View File

@ -20,8 +20,26 @@ Each Sales Order has a specific status code, which represents the state of the o
| --- | --- | | --- | --- |
| Pending | The sales order has been created, but has not been finalized or submitted | | Pending | The sales order has been created, but has not been finalized or submitted |
| In Progress | The sales order has been issued, and is in progress | | In Progress | The sales order has been issued, and is in progress |
| Shipped | The sales order has been completed, and is now closed | | On Hold | The sales order has been placed on hold, but is still active |
| Shipped | The sales order has been shipped, but is not yet complete |
| Complete | The sales order is fully completed, and is now closed |
| Cancelled | The sales order was cancelled, and is now closed | | Cancelled | The sales order was cancelled, and is now closed |
| Lost | The sales order was lost, and is now closed |
| Returned | The sales order was returned, and is now closed |
**Source Code**
Refer to the source code for the Sales Order status codes:
::: order.status_codes.SalesOrderStatus
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
Sales Order Status supports [custom states](../concepts/custom_states.md).
### Sales Order Currency ### Sales Order Currency
@ -83,7 +101,7 @@ To view all the completed shipment, click on the <span class="badge inventree na
### Complete Order ### Complete Order
Once all items in the sales order have been shipped, click on <span class="badge inventree add"><span class='fas fa-check-circle'></span> Complete Order</span> to mark the sales order as complete. Once all items in the sales order have been shipped, click on <span class="badge inventree add"><span class='fas fa-check-circle'></span> Complete Order</span> to mark the sales order as shipped. Confirm then click on <span class="badge inventree confirm">Submit</span> to complete the order.
### Cancel Order ### Cancel Order
@ -167,3 +185,15 @@ All these fields can be edited by the user:
{% with id="edit-shipment", url="order/edit_shipment.png", description="Edit shipment" %} {% with id="edit-shipment", url="order/edit_shipment.png", description="Edit shipment" %}
{% include "img.html" %} {% include "img.html" %}
{% endwith %} {% endwith %}
## Sales Order Settings
The following [global settings](../settings/global.md) are available for sales orders:
| Name | Description | Default | Units |
| ---- | ----------- | ------- | ----- |
{{ globalsetting("SALESORDER_REFERENCE_PATTERN") }}
{{ globalsetting("SALESORDER_REQUIRE_RESPONSIBLE") }}
{{ globalsetting("SALESORDER_DEFAULT_SHIPMENT") }}
{{ globalsetting("SALESORDER_EDIT_COMPLETED_ORDERS") }}
{{ globalsetting("SALESORDER_SHIP_COMPLETE") }}

View File

@ -47,6 +47,10 @@ If a part is designated as an *Assembly* it can be created (or built) from other
If a part is designated as a *Component* it can be used as a sub-component of an *Assembly*. [Read further information about BOM management here](../build/bom.md) If a part is designated as a *Component* it can be used as a sub-component of an *Assembly*. [Read further information about BOM management here](../build/bom.md)
### Testable
Testable parts can have test templates defined against the part, allowing test results to be recorded against any stock items for that part. For more information on testing, refer to the [testing documentation](./test.md).
### Trackable ### Trackable
Trackable parts can be assigned batch numbers or serial numbers which uniquely identify a particular stock item. Trackable parts also provide other features (and restrictions) in the InvenTree ecosystem. Trackable parts can be assigned batch numbers or serial numbers which uniquely identify a particular stock item. Trackable parts also provide other features (and restrictions) in the InvenTree ecosystem.
@ -73,7 +77,15 @@ A [Purchase Order](../order/purchase_order.md) allows parts to be ordered from a
If a part is designated as *Salable* it can be sold to external customers. Setting this flag allows parts to be added to sales orders. If a part is designated as *Salable* it can be sold to external customers. Setting this flag allows parts to be added to sales orders.
### Active ## Locked Parts
Parts can be locked to prevent them from being modified. This is useful for parts which are in production and should not be changed. The following restrictions apply to parts which are locked:
- Locked parts cannot be deleted
- BOM items cannot be created, edited, or deleted when they are part of a locked assembly
- Part parameters linked to a locked part cannot be created, edited or deleted
## Active Parts
By default, all parts are *Active*. Marking a part as inactive means it is not available for many actions, but the part remains in the database. If a part becomes obsolete, it is recommended that it is marked as inactive, rather than deleting it from the database. By default, all parts are *Active*. Marking a part as inactive means it is not available for many actions, but the part remains in the database. If a part becomes obsolete, it is recommended that it is marked as inactive, rather than deleting it from the database.

View File

@ -46,7 +46,7 @@ Additionally, the following information is stored for each part, in relation to
InvenTree supports pricing data in multiple currencies, allowing integration with suppliers and customers using different currency systems. InvenTree supports pricing data in multiple currencies, allowing integration with suppliers and customers using different currency systems.
Supported currencies must be configured as part of [the InvenTree setup process](../start/config.md#supported-currencies). Supported currencies can be configured in the [InvenTree settings](../settings/currency.md).
!!! info "Currency Support" !!! info "Currency Support"
InvenTree provides multi-currency pricing support via the [django-money](https://django-money.readthedocs.io/en/latest/) library. InvenTree provides multi-currency pricing support via the [django-money](https://django-money.readthedocs.io/en/latest/) library.

View File

@ -0,0 +1,78 @@
---
title: Part Revisions
---
## Part Revisions
When creating a complex part (such as an assembly comprised of other parts), it is often necessary to track changes to the part over time. For example, throughout the lifetime of an assembly, it may be necessary to adjust the bill of materials, or update the design of the part.
Rather than overwrite the existing part data, InvenTree allows you to create a new *revision* of the part. This allows you to track changes to the part over time, and maintain a history of the part design.
Crucially, creating a new *revision* ensures that any related data entries which refer to the original part (such as stock items, build orders, purchase orders, etc) are not affected by the change.
### Revisions are Parts
A *revision* of a part is itself a part. This means that each revision of a part has its own part number, stock items, parameters, bill of materials, etc. The only thing that differentiates a *revision* from any other part is that the *revision* is linked to the original part.
### Revision Fields
Each part has two fields which are used to track the revision of the part:
* **Revision**: The revision number of the part. This is a user-defined field, and can be any string value.
* **Revision Of**: A reference to the part of which *this* part is a revision. This field is used to keep track of the available revisions for any particular part.
### Revision Restrictions
When creating a new revision of a part, there are some restrictions which must be adhered to:
* **Circular References**: A part cannot be a revision of itself. This would create a circular reference which is not allowed.
* **Unique Revisions**: A part cannot have two revisions with the same revision number. Each revision (of a given part) must have a unique revision code.
* **Revisions of Revisions**: A single part can have multiple revisions, but a revision cannot have its own revision. This restriction is in place to prevent overly complex part relationships.
* **Template Revisions**: A part which is a [template part](./template.md) cannot have revisions. This is because the template part is used to create variants, and allowing revisions of templates would create disallowed relationship states in the database. However, variant parts are allowed to have revisions.
* **Template References**: A part which is a revision of a variant part must point to the same template as the original part. This is to ensure that the revision is correctly linked to the original part.
## Revision Settings
The following options are available to control the behavior of part revisions.
Note that these options can be changed in the InvenTree settings:
{% with id="part_revision_settings", url="part/part_revision_settings.png", description="Part revision settings" %}
{% include 'img.html' %}
{% endwith %}
* **Enable Revisions**: If this setting is enabled, parts can have revisions. If this setting is disabled, parts cannot have revisions.
* **Assembly Revisions Only**: If this setting is enabled, only assembly parts can have revisions. This is useful if you only want to track revisions of assemblies, and not individual parts.
## Create a Revision
To create a new revision for a given part, navigate to the part detail page, and click on the "Revisions" tab.
Select the "Duplicate Part" action, to create a new copy of the selected part. This will open the "Duplicate Part" form:
{% with id="part_create_revision", url="part/part_create_revision.png", description="Create part revision" %}
{% include 'img.html' %}
{% endwith %}
In this form, make the following updates:
1. Set the *Revision Of* field to the original part (the one that you are duplicating)
2. Set the *Revision* field to a unique revision number for the new part revision
Once these changes (and any other required changes) are made, press *Submit* to create the new part.
Once the form is submitted (without any errors), you will be redirected to the new part revision. Here you can see that it is linked to the original part:
{% with id="part_revision_b", url="part/part_revision_b.png", description="Revision B" %}
{% include 'img.html' %}
{% endwith %}
## Revision Navigation
When multiple revisions exist for a particular part, you can navigate between revisions using the *Select Part Revision* drop-down which renders at the top of the part page:
{% with id="part_revision_select", url="part/part_revision_select.png", description="Select part revision" %}
{% include 'img.html' %}
{% endwith %}
Note that this revision selector is only visible when multiple revisions exist for the part.

View File

@ -5,7 +5,7 @@ title: Part Scheduling
## Part Scheduling ## Part Scheduling
The *Scheduling* tab provides an overview of the *predicted* future availabile quantity of a particular part. The *Scheduling* tab provides an overview of the *predicted* future available quantity of a particular part.
The *Scheduling* tab displays a chart of estimated future part stock levels. It begins at the current date, with the current stock level. It then projects into the "future", taking information from: The *Scheduling* tab displays a chart of estimated future part stock levels. It begins at the current date, with the current stock level. It then projects into the "future", taking information from:

View File

@ -4,7 +4,7 @@ title: Part Test Templates
## Part Test Templates ## Part Test Templates
Parts which are designated as *trackable* (meaning they can be uniquely serialized) can define templates for tests which are to be performed against individual stock items corresponding to the part. Parts which are designated as [testable](./part.md#testable) can define templates for tests which are to be performed against individual stock items corresponding to the part.
A test template defines the parameters of the test; the individual stock items can then have associated test results which correspond to a test template. A test template defines the parameters of the test; the individual stock items can then have associated test results which correspond to a test template.

View File

@ -28,7 +28,6 @@ Details provides information about the particular part. Parts details can be dis
{% with id="part_overview", url="part/part_overview.png", description="Part details" %} {% with id="part_overview", url="part/part_overview.png", description="Part details" %}
{% include 'img.html' %} {% include 'img.html' %}
{% endwith %} {% endwith %}
<p></p>
A Part is defined in the system by the following parameters: A Part is defined in the system by the following parameters:
@ -38,7 +37,7 @@ A Part is defined in the system by the following parameters:
**Description** - Longer form text field describing the Part **Description** - Longer form text field describing the Part
**Revision** - An optional revision code denoting the particular version for the part. Used when there are multiple revisions of the same master part object. **Revision** - An optional revision code denoting the particular version for the part. Used when there are multiple revisions of the same master part object. Read [more about part revisions here](./revision.md).
**Keywords** - Optional few words to describe the part and make the part search more efficient. **Keywords** - Optional few words to describe the part and make the part search more efficient.
@ -62,7 +61,7 @@ Parts can have multiple defined parameters.
If a part is a *Template Part* then the *Variants* tab will be visible. If a part is a *Template Part* then the *Variants* tab will be visible.
[Read about Part templates](./template.md) [Read about Part templates and variants](./template.md)
### Stock ### Stock
@ -132,9 +131,9 @@ The *Scheduling* tab provides an overview of the *predicted* future availability
The *Stocktake* tab provide historical stock level information, based on user-provided stocktake data. Refer to the [stocktake documentation](./stocktake.md) for further information. The *Stocktake* tab provide historical stock level information, based on user-provided stocktake data. Refer to the [stocktake documentation](./stocktake.md) for further information.
### Tests ### Test Templates
If a part is marked as *trackable*, the user can define tests which must be performed on any stock items which are instances of this part. [Read more about testing](./test.md). If a part is marked as *testable*, the user can define tests which must be performed on any stock items which are instances of this part. [Read more about testing](./test.md).
### Related Parts ### Related Parts

View File

@ -61,7 +61,7 @@ Also, dedicated settings sections were added for:
For Category section, read [Category Parameter Templates](#category-parameter-templates) For Category section, read [Category Parameter Templates](#category-parameter-templates)
Other section allows to set the prefix of build, puchase and sales orders. Other section allows to set the prefix of build, purchase and sales orders.
### Category Parameter Templates ### Category Parameter Templates

View File

@ -24,7 +24,7 @@ Refer to the [report documentation](../report/report.md) for further information
!!! warning "LaTeX Support" !!! warning "LaTeX Support"
LaTeX report templates are no longer supported for a number of technical and ideological reasons LaTeX report templates are no longer supported for a number of technical and ideological reasons
[#1292](https://github.com/inventree/InvenTree/pull/1292) adds support for build order / work order reports. Refer to the [build report documentation](../report/build.md) for further information. [#1292](https://github.com/inventree/InvenTree/pull/1292) adds support for build order / work order reports. Refer to the [report documentation](../report/templates.md) for further information.
### Inherited BOM Items ### Inherited BOM Items

View File

@ -32,7 +32,7 @@ Details on how to create and manage manufacturer parts were added
[#1462](https://github.com/inventree/InvenTree/pull/1417) adds the ability to [#1462](https://github.com/inventree/InvenTree/pull/1417) adds the ability to
create a QR code containing the URL of a StockItem, which can be opened directly create a QR code containing the URL of a StockItem, which can be opened directly
on a portable device using the camera or a QR code scanner. More details [here](../report/labels.md#url-style-qr-code). on a portable device using the camera or a QR code scanner. More details [here](../report/labels.md).
## Major Bug Fixes ## Major Bug Fixes

View File

@ -29,5 +29,5 @@ title: Release 0.4.0
| Pull Request | Description | | Pull Request | Description |
| --- | --- | | --- | --- |
| [#1823](https://github.com/inventree/InvenTree/pull/1823) | Fixes link formatting issues for ManufacturerParts | | [#1823](https://github.com/inventree/InvenTree/pull/1823) | Fixes link formatting issues for ManufacturerParts |
| [#1824](https://github.com/inventree/InvenTree/pull/1824) | Selects correct curreny code when creating a new PurchaseOrderLineItem | | [#1824](https://github.com/inventree/InvenTree/pull/1824) | Selects correct currency code when creating a new PurchaseOrderLineItem |
| [#1867](https://github.com/inventree/InvenTree/pull/1867) | Fixes long-running bug when deleting sequential items via the API | | [#1867](https://github.com/inventree/InvenTree/pull/1867) | Fixes long-running bug when deleting sequential items via the API |

View File

@ -53,7 +53,7 @@ This release also provides a marked improvement in unit testing and code coverag
[#2372](https://github.com/inventree/InvenTree/pull/2372) provides an overhaul of notifications, allowing users to view their notifications directly in the InvenTree interface. [#2372](https://github.com/inventree/InvenTree/pull/2372) provides an overhaul of notifications, allowing users to view their notifications directly in the InvenTree interface.
### Why are you hiding my name? ### Why are you hiding my name?
[#2861](https://github.com/inventree/InvenTree/pull/2861) adds several changes to enable admins to remove more of InvenTrees branding. Change logo, hide the about-modal for all but superusers and add custom messages to login and main navbar. Check out [the docs](../start/config.md#customisation-options). [#2861](https://github.com/inventree/InvenTree/pull/2861) adds several changes to enable admins to remove more of InvenTrees branding. Change logo, hide the about-modal for all but superusers and add custom messages to login and main navbar. Check out [the docs](../start/config.md#customization-options)
### Label Printing Plugin ### Label Printing Plugin

View File

@ -1,186 +0,0 @@
---
title: BOM Generation
---
## BOM Generation
The bill of materials is an essential part of the documentation that needs to be sent to the factory. A simple csv export is OK to be important into SMT machines. But for human readable documentation it might not be sufficient. Additional information is needed. The Inventree report system allows to generate BOM well formatted BOM reports.
### Context variables
| Variable | Description |
| --- | --- |
| bom_items | Query set that contains all BOM items |
| bom_items...sub_part | One component of the BOM |
| bom_items...quantity | Number of parts |
| bom_items...reference | Reference designators of the part |
| bom_items...substitutes | Query set that contains substitutes of the part if any exist in the BOM |
### Examples
#### BOM
The following picture shows a simple example for a PCB with just three components from two different parts.
{% with id="report-options", url="report/bom_example.png", description="BOM example" %} {% include 'img.html' %} {% endwith %}
This example has been created using the following html template:
```html
{% raw %}
{% extends "report/inventree_report_base.html" %}
{% load i18n %}
{% load report %}
{% load inventree_extras %}
{% block page_margin %}
margin-left: 2cm;
margin-right: 1cm;
margin-top: 4cm;
{% endblock %}
{% block bottom_left %}
content: "v{{report_revision}} - {% format_date date %}";
{% endblock %}
{% block bottom_center %}
content: "InvenTree v{% inventree_version %}";
{% endblock %}
{% block style %}
.header-left {
text-align: left;
float: left;
}
table {
border: 1px solid #eee;
border-radius: 3px;
border-collapse: collapse;
width: 100%;
font-size: 80%;
}
table td {
border: 1px solid #eee;
}
{% endblock %}
{% block header_content %}
<div class='header-left'>
<h3>{% trans "Bill of Materials" %}</h3>
</div>
{% endblock %}
{% block page_content %}
<table>
<tr> <td>Board</td><td>{{ part.IPN }}</td> </tr>
<tr> <td>Description</td><td>{{ part.description }}</td> </tr>
<tr> <td>User</td><td>{{ user }}</td> </tr>
<tr> <td>Date</td><td>{{ date }}</td> </tr>
<tr> <td>Number of different components (codes)</td><td>{{ bom_items.count }}</td> </tr>
</table>
<br>
<table class='table table-striped table-condensed'>
<thead>
<tr>
<th>{% trans "IPN" %}</th>
<th>{% trans "MPN" %}</th>
<th>{% trans "Manufacturer" %}</th>
<th>{% trans "Quantity" %}</th>
<th>{% trans "Reference" %}</th>
<th>{% trans "Substitute" %}</th>
</tr>
</thead>
<tbody>
{% for line in bom_items.all %}
<tr>
<td>{{ line.sub_part.IPN }}</td>
<td>{{ line.sub_part.name }}</td>
<td>
{% for manf in line.sub_part.manufacturer_parts.all %}
{{ manf.manufacturer.name }}
{% endfor %}
</td>
<td>{% decimal line.quantity %}</td>
<td>{{ line.reference }}</td>
<td>
{% for sub in line.substitutes.all %}
{{ sub.part.IPN }}<br>
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
{% endraw %}
```
#### Pick List
When all material has been allocated someone has to pick all things from the warehouse.
In case you need a printed pick list you can use the following template. This it just the
table. All other info and CSS has been left out for simplicity. Please have a look at the
BOM report for details.
{% raw %}
```html
<table class='changes-table'>
<thead>
<tr>
<th>Original IPN</th>
<th>Allocated Part</th>
<th>Location</th>
<th>PCS</th>
</tr>
</thead>
<tbody>
{% for line in build.allocated_stock.all %}
<tr>
<td> {{ line.bom_item.sub_part.IPN }} </td>
{% if line.stock_item.part.IPN != line.bom_item.sub_part.IPN %}
<td class='chg'> {{ line.stock_item.part.IPN }} </td>
{% else %}
<td> {{ line.stock_item.part.IPN }} </td>
{% endif %}
<td> {{ line.stock_item.location.pathstring }} </td>
<td> {{ line.quantity }} </td>
</tr>
{% endfor %}
</tbody>
</table>
```
{% endraw %}
Here we have a loop that runs through all allocated parts for the build. For each part
we list the original IPN from the BOM and the IPN of the allocated part. These can differ
in case you have substitutes or template/variants in the BOM. In case the parts differ
we use a different format for the table cell e.g. print bold font or red color.
For the picker we list the full path names of the stock locations and the quantity
that is needed for the build. This will result in the following printout:
{% with id="picklist", url="report/picklist.png", description="Picklist Example" %} {% include "img.html" %} {% endwith %}
For those of you who would like to replace the "/" by something else because it is hard
to read in some fonts use the following trick:
{% raw %}
```html
<td> {% for loc in line.stock_item.location.path %}{{ loc.name }}{% if not forloop.last %}-{% endif %}{% endfor %} </td>
```
{% endraw %}
Here we use location.path which is a query set that contains the location path up to the
topmost parent. We use a loop to cycle through that and print the .name of the entry followed
by a "-". The foorloop.last is a Django trick that allows us to not print the "-" after
the last entry. The result looks like here:
{% with id="picklist_with_path", url="report/picklist_with_path.png", description="Picklist Example" %} {% include "img.html" %} {% endwith %}
Finally added a `{% raw %}|floatformat:0{% endraw %}` to the quantity that removes the trailing zeros.
### Default Report Template
A default *BOM Report* template is provided out of the box, which is useful for generating simple test reports. Furthermore, it may be used as a starting point for developing custom BOM reports:
View the [source code](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/report/templates/report/inventree_bill_of_materials_report.html) for the default test report template.

View File

@ -1,324 +0,0 @@
---
title: Build Order Report
---
## Build Order Report
Custom build order reports may be generated against any given [Build Order](../build/build.md). For example, build order reports can be used to generate work orders.
### Build Filters
A build order report template may define a set of filters against which [Build Order](../build/build.md) items are sorted.
### Context Variables
In addition to the default report context variables, the following context variables are made available to the build order report template for rendering:
| Variable | Description |
| --- | --- |
| build | The build object the report is being generated against |
| part | The [Part](./context_variables.md#part) object that the build references |
| line_items | A shortcut for [build.line_items](#build) |
| bom_items | A shortcut for [build.bom_items](#build) |
| build_outputs | A shortcut for [build.build_outputs](#build) |
| reference | The build order reference string |
| quantity | Build order quantity (number of assemblies being built) |
#### build
The following variables are accessed by build.variable
| Variable | Description |
| --- | --- |
| active | Boolean that tells if the build is active |
| batch | Batch code transferred to build parts (optional) |
| line_items | A query set with all the build line items associated with the build |
| bom_items | A query set with all BOM items for the part being assembled |
| build_outputs | A queryset containing all build output ([Stock Item](../stock/stock.md)) objects associated with this build |
| can_complete | Boolean that tells if the build can be completed. Means: All material allocated and all parts have been build. |
| are_untracked_parts_allocated | Boolean that tells if all bom_items have allocated stock_items. |
| creation_date | Date where the build has been created |
| completion_date | Date the build was completed (or, if incomplete, the expected date of completion) |
| completed_by | The [User](./context_variables.md#user) that completed the build |
| is_overdue | Boolean that tells if the build is overdue |
| is_complete | Boolean that tells if the build is complete |
| issued_by | The [User](./context_variables.md#user) who created the build |
| link | External URL for extra information |
| notes | Text notes |
| parent | Reference to a parent build object if this is a sub build |
| part | The [Part](./context_variables.md#part) to be built (from component BOM items) |
| quantity | Build order quantity (total number of assembly outputs) |
| completed | The number out outputs which have been completed |
| reference | Build order reference (required, must be unique) |
| required_parts | A query set with all parts that are required for the build |
| responsible | Owner responsible for completing the build. This can be a user or a group. Depending on that further context variables differ |
| sales_order | References to a [Sales Order](./context_variables.md#salesorder) object for which this build is required (e.g. the output of this build will be used to fulfil a sales order) |
| status | The status of the build. 20 means 'Production' |
| sub_build_count | Number of sub builds |
| sub_builds | Query set with all sub builds |
| target_date | Date the build will be overdue |
| take_from | [StockLocation](./context_variables.md#stocklocation) to take stock from to make this build (if blank, can take from anywhere) |
| title | The full name of the build |
| description | The description of the build |
| allocated_stock.all | A query set with all allocated stock items for the build |
As usual items in a query sets can be selected by adding a .n to the set e.g. build.required_parts.0
will result in the first part of the list. Each query set has again its own context variables.
#### line_items
The `line_items` variable is a list of all build line items associated with the selected build. The following attributes are available for each individual line_item instance:
| Attribute | Description |
| --- | --- |
| .build | A reference back to the parent build order |
| .bom_item | A reference to the BOMItem which defines this line item |
| .quantity | The required quantity which is to be allocated against this line item |
| .part | A shortcut for .bom_item.sub_part |
| .allocations | A list of BuildItem objects which allocate stock items against this line item |
| .allocated_quantity | The total stock quantity which has been allocated against this line |
| .unallocated_quantity | The remaining quantity to allocate |
| .is_fully_allocated | Boolean value, returns True if the line item has sufficient stock allocated against it |
| .is_overallocated | Boolean value, returns True if the line item has more allocated stock than is required |
#### bom_items
| Attribute | Description |
| --- | --- |
| .reference | The reference designators of the components |
| .quantity | The number of components required to build |
| .overage | The extra amount required to assembly |
| .consumable | Boolean field, True if this is a "consumable" part which is not tracked through builds |
| .sub_part | The part at this position |
| .substitutes.all | A query set with all allowed substitutes for that part |
| .note | Extra text field which can contain additional information |
#### allocated_stock.all
| Attribute | Description |
| --- | --- |
| .bom_item | The bom item where this part belongs to |
| .stock_item | The allocated [StockItem](./context_variables.md#stockitem) |
| .quantity | The number of components needed for the build (components in BOM x parts to build) |
### Example
The following example will create a report with header and BOM. In the BOM table substitutes will be listed.
{% raw %}
```html
{% extends "report/inventree_report_base.html" %}
{% load i18n %}
{% load report %}
{% load barcode %}
{% load inventree_extras %}
{% load markdownify %}
{% block page_margin %}
margin: 2cm;
margin-top: 4cm;
{% endblock %}
{% block style %}
.header-right {
text-align: right;
float: right;
}
.logo {
height: 20mm;
vertical-align: middle;
}
.details {
width: 100%;
border: 1px solid;
border-radius: 3px;
padding: 5px;
min-height: 42mm;
}
.details table {
overflow-wrap: break-word;
word-wrap: break-word;
width: 65%;
table-layout: fixed;
font-size: 75%;
}
.changes table {
overflow-wrap: break-word;
word-wrap: break-word;
width: 100%;
table-layout: fixed;
font-size: 75%;
border: 1px solid;
}
.changes-table th {
font-size: 100%;
border: 1px solid;
}
.changes-table td {
border: 1px solid;
}
.details table td:not(:last-child){
white-space: nowrap;
}
.details table td:last-child{
width: 50%;
padding-left: 1cm;
padding-right: 1cm;
}
.details-table td {
padding-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
border-bottom: 1px solid #555;
}
{% endblock %}
{% block bottom_left %}
content: "v{{report_revision}} - {% format_date date %}";
{% endblock %}
{% block header_content %}
<!-- TODO - Make the company logo asset generic -->
<img class='logo' src="{% asset 'company_logo.png' %}" alt="logo" width="150">
<div class='header-right'>
<h3>
Build Order {{ build }}
</h3>
<br>
</div>
<hr>
{% endblock %}
{% block page_content %}
<div class='details'>
<table class='details-table'>
<tr>
<th>{% trans "Build Order" %}</th>
<td>{% internal_link build.get_absolute_url build %}</td>
</tr>
<tr>
<th>{% trans "Order" %}</th>
<td>{{ reference }}</td>
</tr>
<tr>
<th>{% trans "Part" %}</th>
<td>{% internal_link part.get_absolute_url part.IPN %}</td>
</tr>
<tr>
<th>{% trans "Quantity" %}</th>
<td>{{ build.quantity }}</td>
</tr>
<tr>
<th>{% trans "Description" %}</th>
<td>{{ build.title }}</td>
</tr>
<tr>
<th>{% trans "Issued" %}</th>
<td>{% format_date build.creation_date %}</td>
</tr>
<tr>
<th>{% trans "Target Date" %}</th>
<td>
{% if build.target_date %}
{% format_date build.target_date %}
{% else %}
<em>Not specified</em>
{% endif %}
</td>
</tr>
{% if build.parent %}
<tr>
<th>{% trans "Required For" %}</th>
<td>{% internal_link build.parent.get_absolute_url build.parent %}</td>
</tr>
{% endif %}
{% if build.issued_by %}
<tr>
<th>{% trans "Issued By" %}</th>
<td>{{ build.issued_by }}</td>
</tr>
{% endif %}
{% if build.responsible %}
<tr>
<th>{% trans "Responsible" %}</th>
<td>{{ build.responsible }}</td>
</tr>
{% endif %}
<tr>
<th>{% trans "Sub builds count" %}</th>
<td>{{ build.sub_build_count }}</td>
</tr>
{% if build.sub_build_count > 0 %}
<tr>
<th>{% trans "Sub Builds" %}</th>
<td>{{ build.sub_builds }}</td>
</tr>
{% endif %}
<tr>
<th>{% trans "Overdue" %}</th>
<td>{{ build.is_overdue }}</td>
</tr>
<tr>
<th>{% trans "Can complete" %}</th>
<td>{{ build.can_complete }}</td>
</tr>
</table>
</div>
<h3>{% trans "Notes" %}</h3>
{% if build.notes %}
{{ build.notes|markdownify }}
{% endif %}
<h3>{% trans "Parts" %}</h3>
<div class='changes'>
<table class='changes-table'>
<thead>
<tr>
<th>Original IPN</th>
<th>Reference</th>
<th>Replace width IPN</th>
</tr>
</thead>
<tbody>
{% for line in build.bom_items %}
<tr>
<td> {{ line.sub_part.IPN }} </td>
<td> {{ line.reference }} </td>
<td> {{ line.substitutes.all.0.part.IPN }} </td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
```
{% endraw %}
This will result a report page like this:
{% with id="report-options", url="build/report-61.png", description="Report Example Builds" %} {% include "img.html" %} {% endwith %}
### Default Report Template
A default *Build Report* template is provided out of the box, which is useful for generating simple test reports. Furthermore, it may be used as a starting point for developing custom BOM reports:
View the [source code](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/report/templates/report/inventree_build_order_base.html) for the default build report template.

View File

@ -2,64 +2,244 @@
title: Context Variables title: Context Variables
--- ---
## Context Variables ## Context Variables
### Report Context variables are provided to each template when it is rendered. The available context variables depend on the model type for which the template is being rendered.
!!! info "Specific Report Context" ### Global Context
Specific report types may have additional context variables, see below.
Each report has access to a number of context variables by default. The following context variables are provided to every report template: In addition to the model-specific context variables, the following global context variables are available to all templates:
| Variable | Description | | Variable | Description |
| --- | --- | | --- | --- |
| base_url | The base URL for the InvenTree instance |
| date | Current date, represented as a Python datetime.date object | | date | Current date, represented as a Python datetime.date object |
| datetime | Current datetime, represented as a Python datetime object | | datetime | Current datetime, represented as a Python datetime object |
| page_size | The specified page size for this report, e.g. `A4` or `Letter landscape` | | template | The report template instance which is being rendered against |
| report_template | The report template model instance | | template_description | Description of the report template |
| report_name | Name of the report template | | template_name | Name of the report template |
| report_description | Description of the report template | | template_revision | Revision of the report template |
| report_revision | Revision of the report template |
| request | Django request object |
| user | User who made the request to render the template | | user | User who made the request to render the template |
#### Label ::: report.models.ReportTemplateBase.base_context
options:
show_source: True
Certain types of labels have different context variables then other labels. ### Report Context
##### Stock Item Label In addition to the [global context](#global-context), all *report* templates have access to the following context variables:
The following variables are made available to the StockItem label template:
| Variable | Description | | Variable | Description |
| -------- | ----------- | | --- | --- |
| item | The [StockItem](./context_variables.md#stockitem) object itself | | page_size | The page size of the report |
| part | The [Part](./context_variables.md#part) object which is referenced by the [StockItem](./context_variables.md#stockitem) object | | landscape | Boolean value, True if the report is in landscape mode |
| name | The `name` field of the associated Part object |
| ipn | The `IPN` field of the associated Part object | Note that custom plugins may also add additional context variables to the report context.
| revision | The `revision` field of the associated Part object |
| quantity | The `quantity` field of the StockItem object | ::: report.models.ReportTemplate.get_context
| serial | The `serial` field of the StockItem object | options:
| uid | The `uid` field of the StockItem object | show_source: True
| tests | Dict object of TestResult data associated with the StockItem |
### Label Context
In addition to the [global context](#global-context), all *label* templates have access to the following context variables:
| Variable | Description |
| --- | --- |
| width | The width of the label (in mm) |
| height | The height of the label (in mm) |
Note that custom plugins may also add additional context variables to the label context.
::: report.models.LabelTemplate.get_context
options:
show_source: True
## Template Types
Templates (whether for generating [reports](./report.md) or [labels](./labels.md)) are rendered against a particular "model" type. The following model types are supported, and can have templates renderer against them:
| Model Type | Description |
| --- | --- |
| [build](#build-order) | A [Build Order](../build/build.md) instance |
| [buildline](#build-line) | A [Build Order Line Item](../build/build.md) instance |
| [salesorder](#sales-order) | A [Sales Order](../order/sales_order.md) instance |
| [returnorder](#return-order) | A [Return Order](../order/return_order.md) instance |
| [purchaseorder](#purchase-order) | A [Purchase Order](../order/purchase_order.md) instance |
| [stockitem](#stock-item) | A [StockItem](../stock/stock.md#stock-item) instance |
| [stocklocation](#stock-location) | A [StockLocation](../stock/stock.md#stock-location) instance |
| [part](#part) | A [Part](../part/part.md) instance |
### Build Order
When printing a report or label against a [Build Order](../build/build.md) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| bom_items | Query set of all BuildItem objects associated with the BuildOrder |
| build | The BuildOrder instance itself |
| build_outputs | Query set of all BuildItem objects associated with the BuildOrder |
| line_items | Query set of all build line items associated with the BuildOrder |
| part | The Part object which is being assembled in the build order |
| quantity | The total quantity of the part being assembled |
| reference | The reference field of the BuildOrder |
| title | The title field of the BuildOrder |
::: build.models.Build.report_context
options:
show_source: True
### Build Line
When printing a report or label against a [BuildOrderLineItem](../build/build.md) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| allocated_quantity | The quantity of the part which has been allocated to this build |
| allocations | A query set of all StockItem objects which have been allocated to this build line |
| bom_item | The BomItem associated with this line item |
| build | The BuildOrder instance associated with this line item |
| build_line | The build line instance itself |
| part | The sub-part (component) associated with the linked BomItem instance |
| quantity | The quantity required for this line item |
::: build.models.BuildLine.report_context
options:
show_source: True
### Sales Order
When printing a report or label against a [SalesOrder](../order/sales_order.md) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| customer | The customer object associated with the SalesOrder |
| description | The description field of the SalesOrder |
| extra_lines | Query set of all extra lines associated with the SalesOrder |
| lines | Query set of all line items associated with the SalesOrder |
| order | The SalesOrder instance itself |
| reference | The reference field of the SalesOrder |
| title | The title (string representation) of the SalesOrder |
::: order.models.Order.report_context
options:
show_source: True
### Return Order
When printing a report or label against a [ReturnOrder](../order/return_order.md) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| customer | The customer object associated with the ReturnOrder |
| description | The description field of the ReturnOrder |
| extra_lines | Query set of all extra lines associated with the ReturnOrder |
| lines | Query set of all line items associated with the ReturnOrder |
| order | The ReturnOrder instance itself |
| reference | The reference field of the ReturnOrder |
| title | The title (string representation) of the ReturnOrder |
### Purchase Order
When printing a report or label against a [PurchaseOrder](../order/purchase_order.md) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| description | The description field of the PurchaseOrder |
| extra_lines | Query set of all extra lines associated with the PurchaseOrder |
| lines | Query set of all line items associated with the PurchaseOrder |
| order | The PurchaseOrder instance itself |
| reference | The reference field of the PurchaseOrder |
| supplier | The supplier object associated with the PurchaseOrder |
| title | The title (string representation) of the PurchaseOrder |
### Stock Item
When printing a report or label against a [StockItem](../stock/stock.md#stock-item) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| barcode_data | Generated barcode data for the StockItem |
| barcode_hash | Hash of the barcode data |
| batch | The batch code for the StockItem |
| child_items | Query set of all StockItem objects which are children of this StockItem |
| ipn | The IPN (internal part number) of the associated Part |
| installed_items | Query set of all StockItem objects which are installed in this StockItem |
| item | The StockItem object itself |
| name | The name of the associated Part |
| part | The Part object which is associated with the StockItem |
| qr_data | Generated QR code data for the StockItem |
| qr_url | Generated URL for embedding in a QR code |
| parameters | Dict object containing the parameters associated with the base Part | | parameters | Dict object containing the parameters associated with the base Part |
| quantity | The quantity of the StockItem |
| result_list | FLattened list of TestResult data associated with the stock item |
| results | Dict object of TestResult data associated with the StockItem |
| serial | The serial number of the StockItem |
| stock_item | The StockItem object itself (shadow of 'item') |
| tests | Dict object of TestResult data associated with the StockItem (shadow of 'results') |
| test_keys | List of test keys associated with the StockItem |
| test_template_list | List of test templates associated with the StockItem |
| test_templates | Dict object of test templates associated with the StockItem |
::: stock.models.StockItem.report_context
options:
show_source: True
##### Stock Location Label ### Stock Location
The following variables are made available to the StockLocation label template: When printing a report or label against a [StockLocation](../stock/stock.md#stock-location) object, the following context variables are available:
| Variable | Description | | Variable | Description |
| -------- | ----------- | | --- | --- |
| location | The [StockLocation](./context_variables.md#stocklocation) object itself | | location | The StockLocation object itself |
| qr_data | Formatted QR code data for the StockLocation |
| parent | The parent StockLocation object |
| stock_location | The StockLocation object itself (shadow of 'location') |
| stock_items | Query set of all StockItem objects which are located in the StockLocation |
::: stock.models.StockLocation.report_context
options:
show_source: True
### Part
When printing a report or label against a [Part](../part/part.md) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| bom_items | Query set of all BomItem objects associated with the Part |
| category | The PartCategory object associated with the Part |
| description | The description field of the Part |
| IPN | The IPN (internal part number) of the Part |
| name | The name of the Part |
| parameters | Dict object containing the parameters associated with the Part |
| part | The Part object itself |
| qr_data | Formatted QR code data for the Part |
| qr_url | Generated URL for embedding in a QR code |
| revision | The revision of the Part |
| test_template_list | List of test templates associated with the Part |
| test_templates | Dict object of test templates associated with the Part |
::: part.models.Part.report_context
options:
show_source: True
## Model Variables
Additional to the context variables provided directly to each template, each model type has a number of attributes and methods which can be accessedd via the template.
For each model type, a subset of the most commonly used attributes are listed below. For a full list of attributes and methods, refer to the source code for the particular model type.
### Parts ### Parts
!!! incomplete "TODO"
This section requires further work
#### Part #### Part
Each part object has access to a lot of context variables about the part. The following context variables are provided when accessing a `Part` object:
Each part object has access to a lot of context variables about the part. The following context variables are provided when accessing a `Part` object from within the template.
| Variable | Description | | Variable | Description |
|----------|-------------| |----------|-------------|
@ -106,6 +286,7 @@ Each part object has access to a lot of context variables about the part. The fo
#### Part Category #### Part Category
| Variable | Description | | Variable | Description |
|----------|-------------| |----------|-------------|
| name | Name of this category | | name | Name of this category |
@ -117,6 +298,7 @@ Each part object has access to a lot of context variables about the part. The fo
#### StockItem #### StockItem
| Variable | Description | | Variable | Description |
|----------|-------------| |----------|-------------|
| parent | Link to another [StockItem](./context_variables.md#stockitem) from which this StockItem was created | | parent | Link to another [StockItem](./context_variables.md#stockitem) from which this StockItem was created |
@ -139,7 +321,7 @@ Each part object has access to a lot of context variables about the part. The fo
| notes | Extra notes field | | notes | Extra notes field |
| build | Link to a Build (if this stock item was created from a build) | | build | Link to a Build (if this stock item was created from a build) |
| is_building | Boolean field indicating if this stock item is currently being built (or is "in production") | | is_building | Boolean field indicating if this stock item is currently being built (or is "in production") |
| purchase_order | Link to a [PurchaseOrder](./context_variables.md#purchaseorder) (if this stock item was created from a PurchaseOrder) | | purchase_order | Link to a [PurchaseOrder](./context_variables.md#purchase-order) (if this stock item was created from a PurchaseOrder) |
| infinite | If True this [StockItem](./context_variables.md#stockitem) can never be exhausted | | infinite | If True this [StockItem](./context_variables.md#stockitem) can never be exhausted |
| sales_order | Link to a [SalesOrder](./context_variables.md#salesorder) object (if the StockItem has been assigned to a SalesOrder) | | sales_order | Link to a [SalesOrder](./context_variables.md#salesorder) object (if the StockItem has been assigned to a SalesOrder) |
| purchase_price | The unit purchase price for this [StockItem](./context_variables.md#stockitem) - this is the unit price at time of purchase (if this item was purchased from an external supplier) | | purchase_price | The unit purchase price for this [StockItem](./context_variables.md#stockitem) - this is the unit price at time of purchase (if this item was purchased from an external supplier) |
@ -164,6 +346,7 @@ Each part object has access to a lot of context variables about the part. The fo
#### Company #### Company
| Variable | Description | | Variable | Description |
|----------|-------------| |----------|-------------|
| name | Name of the company | | name | Name of the company |
@ -184,6 +367,7 @@ Each part object has access to a lot of context variables about the part. The fo
#### Address #### Address
| Variable | Description | | Variable | Description |
|----------|-------------| |----------|-------------|
| line1 | First line of the postal address | | line1 | First line of the postal address |
@ -194,9 +378,6 @@ Each part object has access to a lot of context variables about the part. The fo
#### Contact #### Contact
Contacts are added to companies. Actually the company has no link to the contacts.
You can search the company object of the contact.
| Variable | Description | | Variable | Description |
|----------|-------------| |----------|-------------|
| company | Company object where the contact belongs to | | company | Company object where the contact belongs to |
@ -207,6 +388,7 @@ You can search the company object of the contact.
#### SupplierPart #### SupplierPart
| Variable | Description | | Variable | Description |
|----------|-------------| |----------|-------------|
| part | Link to the master Part (Obsolete) | | part | Link to the master Part (Obsolete) |
@ -226,24 +408,13 @@ You can search the company object of the contact.
| has_price_breaks | Whether this [SupplierPart](./context_variables.md#supplierpart) has price breaks | | has_price_breaks | Whether this [SupplierPart](./context_variables.md#supplierpart) has price breaks |
| manufacturer_string | Format a MPN string for this [SupplierPart](./context_variables.md#supplierpart). Concatenates manufacture name and part number. | | manufacturer_string | Format a MPN string for this [SupplierPart](./context_variables.md#supplierpart). Concatenates manufacture name and part number. |
### Manufacturers
!!! incomplete "TODO"
This section requires further work
#### Manufacturer
| Variable | Description |
|----------|-------------|
#### ManufacturerPart
| Variable | Description |
|----------|-------------|
### Orders ### Orders
The [Purchase Order](../order/purchase_order.md) context variables are described in the [Purchase Order](./purchase_order.md) section. #### Purchase Order
!!! note "TODO"
This section is incomplete
#### SalesOrder #### SalesOrder

View File

@ -12,13 +12,13 @@ Some common functions are provided for use in custom report and label templates.
``` ```
!!! tip "Use the Source, Luke" !!! tip "Use the Source, Luke"
To see the full range of available helper functions, refer to the source file [report.py](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/report/templatetags/report.py) where these functions are defined! To see the full range of available helper functions, refer to the source file [report.py]({{ sourcefile("src/backend/InvenTree/report/templatetags/report.py") }}) where these functions are defined!
## Assigning Variables ## Assigning Variables
When making use of helper functions within a template, it can be useful to store the result of the function to a variable, rather than immediately rendering the output. When making use of helper functions within a template, it can be useful to store the result of the function to a variable, rather than immediately rendering the output.
For example, using the [render_currency](#rendering-currency) helper function, we can store the output to a variable which can be used at a later point in the template: For example, using the [render_currency](#currency-formatting) helper function, we can store the output to a variable which can be used at a later point in the template:
```html ```html
{% raw %} {% raw %}
@ -130,8 +130,8 @@ The following keyword arguments are available to the `render_currency` function:
| --- | --- | | --- | --- |
| currency | Specify the currency code to render in (will attempt conversion if different to provided currency) | | currency | Specify the currency code to render in (will attempt conversion if different to provided currency) |
| decimal_places | Specify the number of decimal places to render | | decimal_places | Specify the number of decimal places to render |
| min_decimal_places | Specify the minimum number of decimal places to render (ignored if *decimal_places* is specified) | | min_decimal_places | Specify the minimum number of decimal places to render |
| max_decimal_places | Specify the maximum number of decimal places to render (ignored if *decimal_places* is specified) | | max_decimal_places | Specify the maximum number of decimal places to render |
| include_symbol | Include currency symbol in rendered value (default = True) | | include_symbol | Include currency symbol in rendered value (default = True) |
## Maths Operations ## Maths Operations
@ -259,6 +259,31 @@ A shortcut function is provided for rendering an image associated with a Company
*Preview* and *thumbnail* image variations can be rendered for the `company_image` tag, in a similar manner to [part image variations](#image-variations) *Preview* and *thumbnail* image variations can be rendered for the `company_image` tag, in a similar manner to [part image variations](#image-variations)
## Icons
Some models (e.g. part categories and locations) allow to specify a custom icon. To render these icons in a report, there is a `{% raw %}{% icon location.icon %}{% endraw %}` template tag from the report template library available.
This tag renders the required html for the icon.
!!! info "Loading fonts"
Additionally the icon fonts need to be loaded into the template. This can be done using the `{% raw %}{% include_icon_fonts %}{% endraw %}` template tag inside of a style block
!!! tip "Custom classes for styling the icon further"
The icon template tag accepts an optional `class` argument which can be used to apply a custom class to the rendered icon used to style the icon further e.g. positioning it, changing it's size, ... `{% raw %}{% icon location.icon class="my-class" %}{% endraw %}`.
```html
{% raw %}
{% load report %}
{% block style %}
{% include_icon_fonts %}
{% endblock style %}
{% icon location.icon %}
{% endraw %}
```
## InvenTree Logo ## InvenTree Logo
A template tag is provided to load the InvenTree logo image into a report. You can render the logo using the `{% raw %}{% logo_image %}{% endraw %}` tag: A template tag is provided to load the InvenTree logo image into a report. You can render the logo using the `{% raw %}{% logo_image %}{% endraw %}` tag:
@ -272,7 +297,7 @@ A template tag is provided to load the InvenTree logo image into a report. You c
### Custom Logo ### Custom Logo
If the system administrator has enabled a [custom logo](../start/config.md#customisation-options), then this logo will be used instead of the base InvenTree logo. If the system administrator has enabled a [custom logo](../start/config.md#customization-options) then this logo will be used instead of the base InvenTree logo.
This is a useful way to get a custom company logo into your reports. This is a useful way to get a custom company logo into your reports.
@ -287,7 +312,7 @@ If you have a custom logo, but explicitly wish to load the InvenTree logo itself
## Report Assets ## Report Assets
[Report Assets](./report.md#report-assets) are files specifically uploaded by the user for inclusion in generated reports and labels. [Report Assets](./templates.md#report-assets) are files specifically uploaded by the user for inclusion in generated reports and labels.
You can add asset images to the reports and labels by using the `{% raw %}{% asset ... %}{% endraw %}` template tag: You can add asset images to the reports and labels by using the `{% raw %}{% asset ... %}{% endraw %}` template tag:

View File

@ -11,17 +11,6 @@ Custom labels can be generated using simple HTML templates, with support for QR-
Simple (generic) label templates are supplied 'out of the box' with InvenTree - however support is provided for generation of extremely specific custom labels, to meet any particular requirement. Simple (generic) label templates are supplied 'out of the box' with InvenTree - however support is provided for generation of extremely specific custom labels, to meet any particular requirement.
## Label Types
The following types of labels are available
| Label Type | Description |
| --- | --- |
| [Part Labels](./labels/part_labels.md) | Print labels for individual parts |
| [Stock Labels](./labels/stock_labels.md) | Print labels for individual stock items |
| [Location Labels](./labels/location_labels.md) | Print labels for individual stock locations
| [Build Labels](./labels/build_labels.md) | Print labels for individual build order line items |
## Label Templates ## Label Templates
Label templates are written using a mixture of [HTML](https://www.w3schools.com/html/) and [CSS](https://www.w3schools.com/css). [Weasyprint](https://weasyprint.org/) templates support a *subset* of HTML and CSS features. In addition to supporting HTML and CSS formatting, the label templates support the Django templating engine, allowing conditional formatting of the label data. Label templates are written using a mixture of [HTML](https://www.w3schools.com/html/) and [CSS](https://www.w3schools.com/css). [Weasyprint](https://weasyprint.org/) templates support a *subset* of HTML and CSS features. In addition to supporting HTML and CSS formatting, the label templates support the Django templating engine, allowing conditional formatting of the label data.

View File

@ -1,118 +0,0 @@
---
title: Build Labels
---
## Build Line Labels
Build label templates are used to generate labels for individual build order line items.
### Creating Build Line Label Templates
Build label templates are added (and edited) via the [admin interface](../../settings/admin.md).
### Printing Build Line Labels
Build line labels are printed from the Build Order page, under the *Allocate Stock* tab. Multiple line items can be selected for printing:
{% with id='print_build_labels', url='report/label_build_print.png', description='Print build line labels' %}
{% include 'img.html' %}
{% endwith %}
### Context Data
The following context variables are made available to the Build Line label template:
| Variable | Description |
| --- | --- |
| build_line | The build_line instance |
| build | The build order to which the build_line is linked |
| bom_item | The bom_item to which the build_line is linked |
| part | The required part for this build_line instance. References bom_item.sub_part |
| quantity | The total quantity required for the build line |
| allocated_quantity | The total quantity which has been allocated against the build line |
| allocations | A queryset containing the allocations made against the build_line |
## Example
A simple example template is shown below:
```html
{% raw %}
{% extends "label/label_base.html" %}
{% load barcode report %}
{% load inventree_extras %}
{% block style %}
{{ block.super }}
.label {
margin: 1mm;
}
.qr {
height: 28mm;
width: 28mm;
position: relative;
top: 0mm;
right: 0mm;
float: right;
}
.label-table {
width: 100%;
border-collapse: collapse;
border: 1pt solid black;
}
.label-table tr {
width: 100%;
border-bottom: 1pt solid black;
padding: 2.5mm;
}
.label-table td {
padding: 3mm;
}
{% endblock style %}
{% block content %}
<div class='label'>
<table class='label-table'>
<tr>
<td>
<b>Build Order:</b> {{ build.reference }}<br>
<b>Build Qty:</b> {% decimal build.quantity %}<br>
</td>
<td>
<img class='qr' alt='build qr' src='{% qrcode build.barcode %}'>
</td>
</tr>
<tr>
<td>
<b>Part:</b> {{ part.name }}<br>
{% if part.IPN %}
<b>IPN:</b> {{ part.IPN }}<br>
{% endif %}
<b>Qty / Unit:</b> {% decimal bom_item.quantity %} {% if part.units %}[{{ part.units }}]{% endif %}<br>
<b>Qty Total:</b> {% decimal quantity %} {% if part.units %}[{{ part.units }}]{% endif %}
</td>
<td>
<img class='qr' alt='part qr' src='{% qrcode part.barcode %}'>
</td>
</tr>
</table>
</div>
{% endblock content %}
{% endraw %}
```
Which results in a label like:
{% with id='build_label_example', url='report/label_build_example.png', description='Example build line labels' %}
{% include 'img.html' %}
{% endwith %}

Some files were not shown because too many files have changed in this diff Show More