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

15991 Commits

Author SHA1 Message Date
Oliver
59fa3bb4ff
Order table variants (#8295)
* BuildOrderTable: Show variants

- Allow filtering of build orders by part variant

* Add "include_variants" filter for SalesOrder table

- A bit tricker!

* Add "include_variants" filter to PartPurchaseOrdersTable

* Enable filtering ReturnOrder by "part" attribute

* Add similiar functionality for SalesOrderAllocation

* Add similar filter for BuildAllocation table

* Add migration file
2024-10-16 20:19:11 +11:00
Oliver
0c9e986796
Table date filters (#8299)
* Add date filtering for tables

* Update filters for build order table

* Update other tables

* Typing fix

* Fix filter type
2024-10-16 20:18:59 +11:00
Oliver
7c19e51d80
Simplify display of "locked" part status (#8297)
* Simplify display of "locked" part status

- REmove big badge
- Show subtle icon

* Update playwright test
2024-10-16 19:43:10 +11:00
Oliver
181e1dd9cc
Clear allocations when manually returning an item into stock from a customer (#8298) 2024-10-16 17:13:26 +11:00
Alexis Vézina
d59994ea75
Fix GH Link in links.tsx (#8292) 2024-10-16 07:27:06 +11:00
Matthias Mair
61ca68090a
bump backend deps (#8290) 2024-10-16 07:03:59 +11:00
dependabot[bot]
96377f9156
Bump the dependencies group across 1 directory with 3 updates (#8283)
* Bump the dependencies group across 1 directory with 3 updates

Bumps the dependencies group with 3 updates in the /docs directory: [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin), [mkdocs-material](https://github.com/squidfunk/mkdocs-material) and [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings).


Updates `mkdocs-macros-plugin` from 1.2.0 to 1.3.5
- [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.2.0...v1.3.5)

Updates `mkdocs-material` from 9.5.39 to 9.5.40
- [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.39...9.5.40)

Updates `mkdocstrings[python]` from 0.26.1 to 0.26.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.26.1...0.26.2)

---
updated-dependencies:
- dependency-name: mkdocs-macros-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
...

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-16 07:03:38 +11:00
Oliver
e808fad98d
[PUI] Add "index" page for build orders (#8287)
* Add "index" page for build orders

- Make consistent with other pages
- Allow plugin panels here
- Prepare for future development

* Rearrange URLs for "manufacturing"

- Provide same format as other order types
- Allow for other sub-pages under "manufacturing" in the future

* Fix breadcrumbs

* Adjust playwright tests
2024-10-15 23:57:30 +11:00
dependabot[bot]
fb9c117e37
Bump the dependencies group with 3 updates (#8280)
Bumps the dependencies group with 3 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [anchore/sbom-action](https://github.com/anchore/sbom-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/upload-artifact` from 4.4.1 to 4.4.3
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](604373da63...b4b15b8c7c)

Updates `anchore/sbom-action` from 0.17.2 to 0.17.3
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](61119d458a...f5e124a5e5)

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

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  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-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-10-15 17:29:11 +11:00
Oliver
b1d9a23928
[CUI] Fix rendering issues for barcodes (#8286)
- Prevent barcode data from being "escaped"
- Run through bleach to brevent malicious data injection
2024-10-15 14:50:29 +11:00
Oliver
14d92b8727
Fix bug in merge_stock_items (#8284)
- self() -> self
2024-10-15 14:20:14 +11:00
Oliver
eeab8d30fb
[PUI] Table query params (#8279)
* Pass more information through in redirect after login

- Include query parameters in redirect

* InvenTreeTable: Update filters based on URL query parameters

* Add button to remove custom URL query filters
2024-10-14 13:10:53 +11:00
Oliver
7d3eb433d6
Remove <Playground> from PUI frontend (#8276)
* Remove <Playground> from PUI frontend

- Components are now mature enough with sufficient examples in the codebase

* Remove dead code
2024-10-13 20:58:53 +11:00
Oliver
8aade768c3
[PUI] subscribe (#8272)
* Add "starred" icon to part category table

* Edit "starred" status for PartCategory in PUI

* Edit "starred" state of part in PUI

* Playground fix
2024-10-12 11:55:23 +11:00
Oliver
7443d21854
[Refactor] Serial generation (#8246)
* Refactor "update_serial_number" method

* Refactor serial number validation

- Query is much more efficient now
- Does not have to check each serial number individually
- Makes use of existing Part class method

* Refactor creation of multiple stock items

* Fix for singular item creation

* Refactor serializeStock method:

- Push "rebuild tree" to background worker
- Use bulk_create actions

* Refactor createion of serialized build outputs

* Prevent 1+N DB hits

* Cleanup

* Cleanup

* Reinstate serial number checks

* Add limit for serial number extraction

* Fix cache config

* Revert cache settings

* Fix for unit tests

* Playwright tests

* Bug fix

* Force False cookie mode in testing

* Revert aria-label for PanelGroup items

- No longer works as expected with playwright locators

* Fix playwright vtest

* Further updates

* Playwright test adjustments

* Remove duplicate locator
2024-10-12 10:08:57 +11:00
Oliver
f77c8a5b5b
[PUI] Stock Detail (#8274)
* Add "in_stock" attribute to StockItem API

* Add "unavailable" badge to StockDetail page

* Hide stock actions menu for "unavailable" stock

* Fix renderer for StockItemTable

* refactor stock table display

* Add 'date' type details field

* Disable "expiry" information on StockDetailPage

* Icon fix

* Bump API version
2024-10-11 23:39:07 +11:00
Oliver
48bb5fd579
Hide "allocated" column for inactive builds (#8273) 2024-10-11 17:59:43 +11:00
Oliver
33eba14d3f
[PUI] Sales order shipments (#8250)
* Refactor AttachmentPanel into common component

* Remove unused imports

* Add very basic implementation for SalesOrderShipmentDetail page

* Refactor NotesPanel into common component

* Fetch customer data

* Add some placeholder actions

* Updates for shipment detail page

* Adjust SalesOrderShipment API

* Add badges

* Implement API filter for SalesOrderAllocation

* Display allocation table on shipment page

* Add placeholder action to edit allocations

* Improvements for SalesOrderAllocationTable

* Improve API db fetch efficiency

* Edit / delete pending allocations

* Fix for legacy CUI tables

* API tweaks

* Revert custom attachment code for SalesOrderShipment

* Implement "complete shipment" form

* Allocate stock item(s) to sales order

* Fixes for TableField rendering

* Reset sourceLocation when form opens

* Updated playwrigh tests

* Tweak branch (will be reverted)

* Revert github workflow
2024-10-10 22:43:22 +11:00
Oliver
35969b11a5
[PUI] Notes Editor UX (#8265)
* Rearrange icons

* Remove isDirty flag

- Mucks around with editor focus
- Need to revisit this

* Fix playwright test

* Fix playwright test
2024-10-10 21:00:22 +11:00
dependabot[bot]
a3f045e12c
Bump django from 4.2.15 to 4.2.16 in /src/backend (#8257)
* Bump django from 4.2.15 to 4.2.16 in /src/backend

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

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

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

* fix req

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2024-10-10 21:00:10 +11:00
Oliver
914f59c4cc
[Breaking] Samesite Cookie Fix (#8269)
* Adjust samesite cookie behaviour:

- In DEBUG mode, turn off entirely
- Allow False value (note: *not* a string)
- Force insecure cookie in DEBUG mode

* Change default value in config file template

* Update docs

* Adjust COOKIE_SECURE based on SAMESITE setting
2024-10-10 20:18:14 +11:00
Oliver
8e34fddfaa
Samesite cookie fix (#8262)
- Closes https://github.com/inventree/InvenTree/issues/8254
2024-10-09 23:10:01 +11:00
Oliver
dde6aab8b4
Translation fixes (#8263)
* Translation fixes

- Simplifies translations strings
- Removes some similar duplicate strings
- Reduces passing of tokens into translation

* Adds script for detecting close matches in translation source strings

* Updates for custom script

* Detect duplicate strings (ignoring case)

* Fix some duplicate backend strings

* Fix duplicate strings in frontend

* Fix more duplicate strings

* Run check_source_strings in CI

* Fixes for unit tests

* Fix another broken string

* Revert some changes

* Fix f-string

* Fix old migration files

* Reduce front-end duplication

* Further updates

* Revert change

* Updates
2024-10-09 22:32:34 +11:00
Oliver
0b87dc9372
[PUI] Part IPN display (#8264)
* Add IPN column to order tables

* Fix display on SupplierPartDetail page

* Update manufacturer part detail page
2024-10-09 21:50:29 +11:00
Oliver
67434b319b
[PUI] Build output labels (#8261)
* Enable printing actions from "build order output" table

* Adjust action order
2024-10-09 16:33:25 +11:00
Oliver
e8c72d60b5
TemplateEditor: Handle fetch error (#8260)
* TemplateEditor: Handle fetch error

- Handle error condition where template cannot be loaded from server

* Remove test code
2024-10-09 16:13:32 +11:00
github-actions[bot]
13ef30768f
New Crowdin translations by GitHub Action (#8242)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-09 05:08:48 +00:00
Oliver
c1b551d2e0
Allow orders to be completed without any "lines" (#8258)
* Allow orders to be completed without any "lines"

Note: There may be "extra lines" for these orders!

* Fix for unit test
2024-10-09 15:46:41 +11:00
Volker
560f57333c
fix part qr lable (#8255) 2024-10-08 21:03:22 +11:00
Oliver
198a39a33c
[Refactor] Sales Order Shipment (#8249)
* Refactor serial number allocation

* Refactor API query

Note: This should be further improved, not to automatically return *all* allocation data

* Push expensive operations off to background worker

* Bump API version
2024-10-08 08:00:32 +11:00
dependabot[bot]
44d9484715
Bump the dependencies group with 6 updates (#8253)
Bumps the dependencies group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4.2.0` | `4.2.1` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.6.1` | `3.7.1` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `3.6.0` | `3.7.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.4.0` | `4.4.1` |
| [codecov/codecov-action](https://github.com/codecov/codecov-action) | `4.5.0` | `4.6.0` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.26.10` | `3.26.12` |


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

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

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

Updates `actions/upload-artifact` from 4.4.0 to 4.4.1
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](50769540e7...604373da63)

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

Updates `github/codeql-action` from 3.26.10 to 3.26.12
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e2b3eafc8d...c36620d31a)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: sigstore/cosign-installer
  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: 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-10-08 07:38:23 +11:00
Oliver
798e25a9dc
[PUI] Plugin settings UI (#8228)
* Visual tweaks for admin pages

* Provide admin js file via API

* Backend fixes

* Tweak error detail drawer

* Refactor plugin detail panel

- Split out into separate files
- Use <Accordion />
- Display custom configuration (if available)

* Refactoring

* Add custom configuration to sample UI plugin

* Bump API version

* Add separate API endpoint for admin integration details

* Refactor plugin drawer

* Null check

* Add playwright tests for custom admin integration

* Enable plugin panels in "settings" pages

* Fix for unit test

* Hide "Plugin Settings" for plugin without "settings" mixin

* Fixes for playwright tests

* Update playwright tests

* Improved error message
2024-10-07 22:25:56 +11:00
Oliver
36e3159c1a
Unit Test Fixes (#8245)
* Add @types/dompurify

* JS fix

* Update allowed tags
2024-10-07 20:17:31 +11:00
Oliver
846b17aa1d
Merge commit from fork
* Sanitize markdown when rendering notes fields

* Update helpers.py

* Update mixins.py

* format

* format

* Allow horizontal rule in markdown

* Display returned error mesage

* More instructive error msg

* Specify output_format to markdown.markdown

Ref: https://python-markdown.github.io/reference/markdown/serializers/

* Cleanup

* Adjust allowable markdown tags

* Add unit test for malicious markdown XSS

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-10-07 08:57:47 +11:00
Oliver
a323bf0007
[PUI] download image (#8230)
* Add placeholder for download image button

* Implement image download functionality

* Increase timeout

* Show timeout notification

* Icon cleanup
2024-10-06 21:49:13 +11:00
Oliver
c914d1c5af
Add additional information on demo dataset (#8243) 2024-10-06 21:30:09 +11:00
Dean
a1024f1a67
Fix build item over-allocation checks (#8235) 2024-10-06 21:08:40 +11:00
Joe Rogers
7e7cfb8ee1
Add missing namespaces to contributing page (#8239) 2024-10-06 07:59:10 +11:00
Oliver
f8c7635a8d
Set maximum height for part charts (#8232) 2024-10-03 09:41:11 +10:00
Dean
69bc5808d2
Shipment Attachments (#8231)
Create shipment attachments on parent order.
2024-10-03 08:31:38 +10:00
Oliver
5759b60a48
Merge commit from fork
* Sanitize markdown when rendering notes fields

* Revert "Sanitize markdown when rendering notes fields"

This reverts commit 373ebfbef0ce25fa58cb4e635e99f35b5e4df07c.

* Mask error message when downloading image
2024-10-02 14:24:45 +10:00
Oliver
7bffa49f3c
PUI: Return item from customer (#8227)
- Add manual form to return a stock item from customer
2024-10-01 23:33:35 +10:00
Oliver
c23f2828f5
New event triggers (#8226)
- When splitting a stock item
- When moving a stock item
2024-10-01 23:12:47 +10:00
Dean
fe7bbc2436
Shipment Reports (#8194)
* Shipment Reports

* bump api version due to changed enums

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-10-01 10:30:52 +10:00
Matthias Mair
96a2517402
A bit more testing (#8053)
* add more admin testing

* fix assertations

* add test for importer admin

* Add tests for https://github.com/inventree/InvenTree/pull/7164

* add common/attachment test

* fix test

* add tests

* remove unused definition - the view is read only

* Revert "remove unused definition - the view is read only"

This reverts commit 4cad8d16f395c447acffc241d90757cdf72109c0.

* more tests in report

* Update tests.py

* make lookup dynamic

* make report assertation dynamic

* add migration test

* extend validation plugin tests

* disable flaky test

* Add test for barcode/uid transition

* test reverse migration

* cleanup new test

* remove empty action

* split and refactor API tests

* refactor test

* Add test for error conditions

* fix double entry

* more migration tests

* also test no history

* fix assertation

* add another migration test

* fix typo

* fix manufacturer filter

* test more filters

* even more filter tests

* move top level test to right place

* add todos for tests that could be more expressive

* add test for checking duplicate serials

* ignore cautious catches
2024-10-01 08:27:57 +10:00
dependabot[bot]
019b08af3f
Bump the dependencies group with 2 updates (#8223)
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.8.0 to 6.9.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](32945a3392...4f58ea7922)

Updates `github/codeql-action` from 3.26.9 to 3.26.10
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](461ef6c76d...e2b3eafc8d)

---
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-10-01 07:37:11 +10:00
Matthias Mair
31bbd394c9
Bump mkdocs-material (#8217)
* 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.36 to 9.5.39
- [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.36...9.5.39)

---
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>
2024-10-01 07:36:49 +10:00
Matthias Mair
af6f179f7e
bump pre-commit refs (#8219) 2024-10-01 07:36:29 +10:00
Oliver
5638895f54
Filter StockTrackingTable by user (#8222) 2024-10-01 00:24:26 +10:00
Oliver
ccd8a520eb
Remove unused function (#8221) 2024-10-01 00:10:12 +10:00