2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-27 19:16:44 +00:00

16032 Commits

Author SHA1 Message Date
Matthias Mair
0872beaba9
[PUI] Switch linting to biome (#8317)
* bump pre-commit

* add biome

* autofixes

* use number functions

* fix string usage

* use specific variable definition

* fix missing translations

* reduce alerts

* add missing keys

* fix index creation

* fix more strings

* fix types

* fix function

* add missing keys

* fiy array access

* fix string functions

* do not redefine var

* extend exlcusions

* reduce unnecessary operators

* simplify request

* use number functions

* fix missing translation

* add missing type

* fix filter

* use newer func

* remove unused fragment

* fix confusing assigment

* pass children as elements

* add missing translation

* fix imports

* fix import

* auto-fix problems

* add autfix for unused imports

* fix SAST error

* fix useSelfClosingElements

* fix useTemplate

* add codespell exception

* Update pui_printing.spec.ts

* Update pui_printing.spec.ts

* add vscode defaults
2024-11-12 11:03:08 +11:00
Chris Thorn
e7cfb4c3c0
Add level indicators and path to stock location and part category dropdowns (#8366)
* Add level indicators and path to stock location dropdown

* Add level indicators and path to part category dropdown

* Updated stock location string to include location path

* Fix PUI form test (set location)

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-11-12 09:48:16 +11:00
dependabot[bot]
ff81cb61f2
Bump the dependencies group with 3 updates (#8463)
Bumps the dependencies group with 3 updates: [anchore/sbom-action](https://github.com/anchore/sbom-action), [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `anchore/sbom-action` from 0.17.6 to 0.17.7
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](251a468eed...fc46e51fd3)

Updates `actions/attest-build-provenance` from 1.4.3 to 1.4.4
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](1c608d11d6...ef244123eb)

Updates `github/codeql-action` from 3.27.0 to 3.27.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](662472033e...4f3212b617)

---
updated-dependencies:
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: actions/attest-build-provenance
  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-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-11-12 09:47:29 +11:00
Oliver
ea1cc4d8dc
Fix for useReturnOrderLineItemFields (#8462)
- Remove 'responsible' field from form-set
- Not actually available on the endpoint
2024-11-11 12:28:44 +11:00
Matthias Mair
9cd0394dc4
Remove unneeded AjaxView usage (#8461)
* remove unneeded AjaxView usage

* add schema

* bump schema version

* make schema more acurate

* exclude not found view

* make script also axept base api
2024-11-11 09:11:20 +11:00
dependabot[bot]
5464bc5a8a
Bump the dependencies group across 1 directory with 5 updates (#8426)
Bumps the dependencies group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4.2.1` | `4.2.2` |
| [actions/setup-python](https://github.com/actions/setup-python) | `5.2.0` | `5.3.0` |
| [anchore/sbom-action](https://github.com/anchore/sbom-action) | `0.17.4` | `0.17.6` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.26.13` | `3.27.0` |
| [crowdin/github-action](https://github.com/crowdin/github-action) | `2.2.0` | `2.3.0` |



Updates `actions/checkout` from 4.2.1 to 4.2.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](eef61447b9...11bd71901b)

Updates `actions/setup-python` from 5.2.0 to 5.3.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](f677139bbe...0b93645e9f)

Updates `anchore/sbom-action` from 0.17.4 to 0.17.6
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](8d0a6505bf...251a468eed)

Updates `github/codeql-action` from 3.26.13 to 3.27.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f779452ac5...662472033e)

Updates `crowdin/github-action` from 2.2.0 to 2.3.0
- [Release notes](https://github.com/crowdin/github-action/releases)
- [Commits](95d6e895e8...2d540f18b0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: anchore/sbom-action
  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
- dependency-name: crowdin/github-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>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2024-11-11 06:18:32 +11:00
Oliver
255a5d083e
[PUI] Part allocations (#8458)
* Add new backend filters for BuildLine API

* PUI: Better display of part allocations against build orders

* Add 'order_outstanding' filter to SalesOrderLineItem API

* Add new table showing outstanding SalesOrder allocations against a part

* Update playwright test

* Cleanup

* Bump API version

* Add more table columns

* Tweak UsedInTable

* Another table tweak

* Tweak playwright tests
2024-11-09 20:22:26 +11:00
Oliver
ad39d3fd95
Invoke error handling (#8454)
* Add exception handler in tasks.py

- Catch UnexpectedExit
- Print clear message on the command that failed
- Re-throw exception

* Change c.run to run(c)

- Pass all invoke commands through the exception handler

* Add more info to version command

* Pretty colors

* Remove dummy error

* Improve invoke task output:

- Add colors for different message types
- Add success messages for critical tasks

* Tweaks

* Improve output commands
2024-11-09 09:16:17 +11:00
Michael
9fb93b899c
Add doc on external stock locations (#8457)
* Add example for INVENTREE_CUSTOMIZE environment variable

* Search also for IPN in allocated parts for build

* Changed example

* Added doc about external stock locations
2024-11-09 00:36:53 +11:00
github-actions[bot]
a8e833a226
New Crowdin translations by GitHub Action (#8436)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-08 23:05:35 +11:00
Oliver
2c294d6ebe
Sales order improvements (#8445)
* Migration for SalesOrderAllocation

- Allow allocation against order with null shipment

* Enhaced query efficiency

* Further API cleanup

* Adjust serializer

* PUI updates

* Enable editing of allocation shipment

* Improve shipment filtering

* Add sub-table for salesorderlineitem

* Add helper method to SalesOrder to return pending SalesOrderAllocations

* Fix for CUI

* Update form for CUI

* Prevent SalesOrder completion with incomplete allocations

* Fixes for StockItem API

* Frontend refactoring

* Code cleanup

* Annotate shipment information to SalesOrder API endpoint

* Update frontend PUI

* Additional filtering for SalesOrderAllocation

* Bump API version

* Hide panel based on user permissions

* js linting

* Unit test fix

* Update playwright tests

* Revert diff

* Disable playwright test (temporary)

* View output from build table
2024-11-08 23:05:24 +11:00
Oliver
656950aea3
UI consolidation (#8450)
* UI consolidation

- Combine "suppliers" and "manufactuers" onto same tab

* Update StylishText.tsx

Remove unused import
2024-11-08 23:05:13 +11:00
Matthias Mair
cd9f491dc6
Remove coupling of tests to cui (#8389)
* remove coupling of tests to cui

* all testing for PUI absolute urls

* remove overlapping test

* refactor middleware check

* move static things into global

* factor out test target

* re-add api exception

* keep using settings.js for now
2024-11-08 19:36:33 +11:00
Oliver
8f24119f29
Fix for stock item edit (#8451)
- Pass stockItem instance through to form
2024-11-08 13:22:46 +11:00
Oliver
011108cb50
Adjustments to default template file (#8440)
* Adjustments to default template file

- Do not specify SAMESITE_COOKIE options by default
- Fallback to the values in settings.py

* Update config_template.yaml
2024-11-08 10:50:13 +11:00
Matthias Mair
fade7e3d04
narrw scope of cleanup (#8441) 2024-11-07 11:20:51 +11:00
Oliver
c062d5e48d
Cleanup modals (#8432)
* Cleanup modals

* Fix for playwright test

* Playwright test updates
2024-11-06 21:53:37 +11:00
Oliver
e46ae1a4e6
Enable ordering of BomList by 'reference' (#8437) 2024-11-06 10:29:16 +11:00
Oliver
245803b0d4
[PUI] Updates for AdminButton (#8434)
* [PUI] Updates for AdminButton

- Hide if django admin interface is disabled
- Use correct admin URL

* Adjust InfoView

* Add playwright tests
2024-11-06 09:27:43 +11:00
Oliver
93a8090e99
Fix for links in notification drawer (#8435) 2024-11-06 08:15:19 +11:00
Oliver
f470d30493
Improve optional chaining checks (#8431)
- Fixes bug where part_detail is potentially undefined
2024-11-06 06:04:13 +11:00
Oliver
7b640a4f88
Build hide incomplete (#8433)
* PUI panel tab updates

Hide build order tabs for cancelled or complete orders

* Fix a // TODO entry
2024-11-06 00:45:39 +11:00
Oliver
d6745137f6
Enable printing actions for PartTable (#8430) 2024-11-05 23:57:49 +11:00
Matthias Mair
56bd66ddd4
fix link to MIT license (#8386)
* fix link to MIT license

* ignore opensource.org in linting
2024-11-05 10:11:45 +11:00
dependabot[bot]
bc6d45fa81
Bump mkdocs-material from 9.5.42 to 9.5.43 in /docs in the dependencies group across 1 directory (#8428)
* 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.42 to 9.5.43
- [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.42...9.5.43)

---
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-11-05 09:09:43 +11:00
github-actions[bot]
b4310bf91e
New Crowdin translations by GitHub Action (#8412)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-04 22:33:04 +11:00
Oliver
00bd92e27c
Add docs on running playwright tests (#8424) 2024-11-04 21:23:30 +11:00
Oliver
4df42cd776
PO receive fix (#8423)
* Add "active" filter to PurchaseOrderLineItem.part field

* Fix for allocation serial numbers to incoming items

* Validate serial numbers per line item
2024-11-04 14:10:17 +11:00
Oliver
c9079d9a0e
Ignore MissingRate errors (#8420)
* Improved permission checking for data importing

- Permission checks on the imported model type

* Improved validation for DateField

* Ignore MissingRate errors

- Do not send these to sentry
2024-11-03 18:23:34 +11:00
Oliver
abad36786f
Importer permissions (#8419)
* Improved permission checking for data importing

- Permission checks on the imported model type

* Improved validation for DateField

* Fix for unit test
2024-11-03 17:43:09 +11:00
Oliver
504655c92d
Fix for potential MissingKey error (#8422) 2024-11-03 17:42:24 +11:00
Oliver
b25b3493d9
Remove unnecessary code (#8418) 2024-11-03 13:05:04 +11:00
Oliver
546bd945fc
Logic fix for build output creation (#8417) 2024-11-03 13:04:55 +11:00
Oliver
d1c2213836
Offload initial email task (#8413)
- Prevent blocking on email task
- Allow worker to try multiple times
- Don't pass 500 error back to form validation
2024-11-03 09:56:28 +11:00
Oliver
4308f0c2f9
Bug fix for plugin table (#8411)
- Allow "deactivation" of missing plugin
- Required before it can be deleted
2024-11-03 00:22:26 +11:00
github-actions[bot]
d11b7d3a7c
New Crowdin translations by GitHub Action (#8355)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-02 21:46:12 +11:00
Oliver
6cca66cafa
More error logging during plugin loads (#8408)
- Ensure all errors are logged
2024-11-02 21:09:49 +11:00
Oliver
cc6a2f4548
Re-render panels when context changes (#8407) 2024-11-02 11:59:40 +11:00
Oliver
18e5b0df58
[PUI] Dashboard refactor (#8278)
* Refactor plugin components into <RemoteComponent />

* Clean up footer

* Allow BuildOrder list to be sorted by 'outstanding'

* Fix model name

* Update BuildOrderTable filter

* Add StockItemTable column

* Working towards new dashboard

* Cleanup unused imports

* Updates: Now rendering some custom widgets

* Define icons for model types

* Add icon

* Cleanup / refactor / delete

- Complete transfer of files into new structure

* Follow link for query count widgets

* Add some more widgets to the library

* Remove old dashboard link in header

* Remove feedback widget

* Bump API version

* Remove test widget

* Rename "Home" -> "Dashboard"

* Add some more widgets

* Pass 'editable' property through to widgets

* Cleanup

* Add drawer for selecting new widgets

* Allow different layouts per user on the same machine

* Fixes

* Add ability to *remove* widgets

* Add helpful button

* Add a keyboard shortcut

* Refactoring

* Add backend code for serving custom dashboard items

* Load dashboard items from plugins

* Tweak for dashboard item API query

- Refetch if user changes
- Tweak "loaded" value
- Prevent refetchOnMount

* Add message if no dashboard widgets are displayed

* Refactoring main navigation menu

- Group into sections
- Cleanup / consolidation
- General refactoring

* Remove playground

* Add backend field for storing dashboard layout

* Add extra type definitions for UseInstance

* Manual labels for builtin dashboard items

- Otherwise they will change with translation locale

* Shorten labels for more plugins

* Adjust DashboardMenu

* Reduce stored data

* Add widget filter by text

* Remove back-end settings

* Update playwright tests for dashboard

* Updated tests

* Refactor backend API for fetching plugin features

* Further fixes for back-end code

* More back-end fixes

* Refactor frontend:

- Custom panels
- Custom dashboard items

* Further backend fixes

* Yet more backend fixes

- Improve error handling

* Fix for custom plugin settings rendering

* Enable plugin panels for part index and stock index pages

* Cleanup

* Fix nav menu

* Update typing

* Helper func to return all plugin settings as a dict

* Update API version date

* Fix for UseInstancea

* typing fix

* Tweak layout callbacks

* Pass query parameters through to navigation functions

* Improve custom query display

* Add "news" widget

* Ensure links are prepended with base URL on receipt

* Update NewsWidget

* Bug fix

* Refactor template editor tests

* Refactor unit testing for test_ui_panels

* Unit test for dashboard item API endpoint

* Update comment

* Adjust playwright tests

* More playwright fixes

* Hide barcode scanning options if disabled

* Tweak dashboard widget

* Fix custom panel title

* Update documentation around UIMixin class

* Cleanup

* Additional docs

* Add icon def for 'error' ModelType

* Add error boundary to TemplateEditor component

* Fix so that it works with template editors and previews again

* Tweak error messages

* API unit test fixes

* Unit test fix

* More unit test fixes

* Playwright test tweaks

* Adjust error messages
2024-11-02 08:48:29 +11:00
Oliver
c4031dba7f
Purchase Order Destination (#8403)
* Add "destination" field to PurchaseOrder

* Add 'destination' field to API

* Add location to PurchaseOrderDetail page

* Display "destination" on PurchaseOrderDetail page

* Pre-select location based on selected "destination"

* Fix order of reception priority

* Auto-expand the per-line destination field

* Add "Purchase Order" detail to StockItemDetail page

* Bug fix in PurchaseOrderForms

* Split playwright tests

* Docs updates

* Bump API version

* Unit test fixes

* Fix more tests

* Backport to CUI

* Use PurchaseOrder destination when scanning items
2024-11-01 11:10:25 +11:00
Oliver
871cd905f1
[PUI] Table refactor (#8395)
* Refactor table header items out into new file

* Improve BomItem API query

* Allow table header to be removed entirely

* revert BomTable

* Re-add "box" component

* Reimplement partlocked attribute

* Fix for PartDetail

- Revert to proper panels

* Updated playwright tests

* Additional tests
2024-11-01 07:23:26 +11:00
Oliver
801b32e4e3
Prevent multiple background workers without global cache (#8401)
* Prevent multiple background workers without global cache

* Documentation updates

- New page dedicated to InvenTree process stack
- Update links
- Consolidate information

* Update mkdocs.yml
2024-11-01 07:23:08 +11:00
Oliver
913a05cf45
[Bug] Fix for create_child_builds (#8399)
* Fix for create_child_builds

- Account for concurrency between multiple worker processes
- Ensure db commits are atomic
- Add random delays between build creation

* Check for existing build order

* Initially force  task off to background worker

* Revert force_async change
2024-10-31 13:59:53 +11:00
Oliver
feefa60a8f
Fix image size restriction in PageDetail header (#8398) 2024-10-31 13:13:50 +11:00
Oliver
8822194b0d
[PUI] stock table (#8396)
* [PUI] Add extra fields to StockItemTable

* Add SKU and MPN to StockItem export data

* Enable sorting

* Bump API version
2024-10-31 12:34:28 +11:00
dependabot[bot]
a826096e37
Bump the dependencies group across 1 directory with 3 updates (#8382)
* Bump the dependencies group across 1 directory with 3 updates

Bumps the dependencies group with 3 updates in the /docs directory: [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin), [mkdocs-include-markdown-plugin](https://github.com/mondeja/mkdocs-include-markdown-plugin) and [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin).


Updates `mkdocs-git-revision-date-localized-plugin` from 1.2.9 to 1.3.0
- [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.9...v1.3.0)

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

Updates `mkdocs-macros-plugin` from 1.3.6 to 1.3.7
- [Release notes](https://github.com/fralau/mkdocs_macros_plugin/releases)
- [Changelog](https://github.com/fralau/mkdocs-macros-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fralau/mkdocs_macros_plugin/compare/v1.3.6...v1.3.7)

---
updated-dependencies:
- dependency-name: mkdocs-git-revision-date-localized-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: mkdocs-include-markdown-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: mkdocs-macros-plugin
  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-10-29 21:45:39 +11:00
Oliver
8a7a2da07b
[PUI] notifications fix (#8392)
* Include actual model name in notification repot

* Include model_id in API

* Refactoring for NotificationDrawer

- Add error boundary
- Separate rendering func for individual entry
- Allow router navigation
- Better link introspection
- Add tooltip for notification description

* Add URL support for errors

* Allow navigation to an individual error in the admin center

* Updates

* Add rendering method for 'error' model type
2024-10-29 15:00:34 +11:00
Oliver
40f456fbc9
[PUI] Build allocation sub tables (#8380)
* Add helpers methods for table row expansion

* Render a simplified "line item sub table"

- Akin to CUI implementation
- But like, better...

* Edit / delete individual stock allocations

* Improvements for BuildLineTable and BuildOutputTable

* Improvements for table fields

* Refactoring

* Refactor BuildLineTable

- Calculate and cache filtered allocation values

* Code cleanup

* Further fixes and features

* Revert new serializer field

- Turns out not to be needed

* Add playwright tests

* Bug fix for CUI tables

- Ensure allocations are correctly filtered by output ID

* Adjust CUI table
2024-10-29 11:36:32 +11:00
Oliver
178f939e42
Update docker_install.md (#8387) 2024-10-29 09:33:07 +11:00
Michael
6fc9c7b0ec
Add example for INVENTREE_CUSTOMIZE environment variable (#8314)
* Add example for INVENTREE_CUSTOMIZE environment variable

* Search also for IPN in allocated parts for build

* Changed example
2024-10-29 09:07:58 +11:00