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

16170 Commits

Author SHA1 Message Date
Oliver
328472701d
[PUI] Machines table refactor (#8352)
* Reorganize MachineManagementPanel

- Use Accordion
- More consistent with PluginManagementPanel

* Code cleanup

* Refactor machine drawer display

* Refactor MachineTypeDetailDrawer
2024-10-24 15:24:52 +11:00
Matthias Mair
9f9afa1593
bump dev deps (#8336) 2024-10-24 14:39:29 +11:00
Oliver
556ff4f15b
Settings validation enhancements (#8351)
* Enforce lower case for model name checks

* Enhance settings validation

- Add support for "float" settings type
- Improve validation code and error handling
2024-10-24 13:12:39 +11:00
Oliver
fb17dcce9a
Task group (#8332)
* Add 'group' to offload_task

- Make use of 'group' field in AsyncTask model
- Allows better db filtering

* Log error if low_stock check cannot be performed

* Ensure low-stock checks are performed by the background worker

* Change encoding of arguments to 'notify_low_stock_if_required'

- Pass part ID, not part instance
- Safer, but requires DB hit

* Fix typo

* Fix to allow tests to run
2024-10-24 00:06:44 +11:00
Oliver
ba3bac10a7
PUI: Show "Return from customer" option (#8345)
* PUI: Show "Return from customer" option

* Extend playwright tests

* Additional unit tests
2024-10-23 23:24:21 +11:00
dependabot[bot]
46cbdac6ba
Bump the dependencies group across 1 directory with 2 updates (#8327)
* Bump the dependencies group across 1 directory with 2 updates

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


Updates `mkdocs-macros-plugin` from 1.3.5 to 1.3.6
- [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.5...v1.3.6)

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

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

* 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-23 16:11:29 +11:00
github-actions[bot]
aa1e23d455
New Crowdin translations by GitHub Action (#8266)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-23 16:10:59 +11:00
simonkuehling
5ed0af20c8
use LABEL_DEFAULT_PRINTER user setting to pre-select plugin in label printing forms (#8330) 2024-10-23 15:18:02 +11:00
Oliver
a6bba144e7
Part pricing cleanup (#8340)
* Part pricing cleanup

- Improve / tweak rendering for PurchaseHistoryPanel

* Adjust playwright tests
2024-10-23 14:33:42 +11:00
Oliver
28146bbbf0
Fix display of purchase order lines (#8339) 2024-10-23 14:33:31 +11:00
Oliver
295f733ed9
Add "active" field to SupplierPart form (#8341)
- Previously missing from legacy interface
2024-10-23 12:55:25 +11:00
Oliver
bcc991198e
CUI: Fix for part pricing panel (#8338) 2024-10-23 11:00:02 +11:00
Matthias Mair
8d27144f78
bump container deps (#8337) 2024-10-23 09:52:35 +11:00
dependabot[bot]
66c37d7aeb
Bump anchore/sbom-action from 0.17.3 to 0.17.4 in the dependencies group (#8325)
Bumps the dependencies group with 1 update: [anchore/sbom-action](https://github.com/anchore/sbom-action).


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

---
updated-dependencies:
- dependency-name: anchore/sbom-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-10-23 09:06:06 +11:00
Oliver
cbe547b873
Add "View Part" action in BuildLineTable (#8335) 2024-10-23 07:16:38 +11:00
Oliver
ca31bb0322
[API] Sales order filters (#8331)
* Fix 'allocated' queryset annotation for SalesOrderLineItemSerializer

* Add 'allocated' filter for SalesOrderLineItemList

* Allow ordering by 'allocated' and 'shipped' values

* Updated unit testing

* Bump API version

* Update playwright tests
2024-10-23 07:16:26 +11:00
Oliver
2adb41f448
Hide "allocations" tab for items which are not in stock (#8334) 2024-10-23 07:16:14 +11:00
Oliver
cb0248d159
Markdown link fix (#8328)
* Improve cleaning of markdown content

* Update unit test with new check
2024-10-22 13:06:43 +11:00
Oliver
ddea9fa4b9
[PUI] Platform fixes (#8324)
* Add "IPN" column to build order allocated stock table

* Allow sorting and searching by IPN

* Handle allocations where allocated but required == 0

* Add "no info available" message to part scheduling

* Adjust PartSchedulingTable

* Icon fix

* Add "latest serial number" information to PartDetail page

* Cleanup code for serial-number placeholder in forms

* Logic fix for displaying non-unity pack quantity

* Fix description field on SupplierPart page

* Fix duplicate table column
2024-10-22 12:17:24 +11:00
Oliver
e219b7c914
Add documentation about user management (#8321) 2024-10-21 10:05:23 +11:00
Oliver
90f726e325
[PUI] Tweaks for part purchase order table (#8319)
* Improve API query

* Table ordering fixes for PartPurchaseOrdersTable
2024-10-20 15:01:05 +11:00
Oliver
29726d8d0d
Refactoring / Enhancements (#8307)
* Create simply PartSalesPanel component

* Updates

* Add API endpoint for SalesHistory

- And serializers
- Basic, needs lots of work still

* Fix for PartDetail page

* SalesOrder page updates

* More page updates

* Update API endpoint

* Backend improvements

* add API endpoint

* Front-end rendering

* Make frontend generic

* Fix for CompanyTable

* Make back-end API more generic

* More API improvements

* Implement history for purchasing

* API / UI fixes

* Remove debug statements

* Support file download

* Add endpoint for build order history

* Implement UI for build order history

* Revert backend

* Revert frontend

* Remove unsed imports

* Cleanup permission checks

* Bump API version

* Improve token management code

- Do not request token if other cookies are unavailable
- Do not fetch user data if token is unavailable
- Prevents connection error logs

* Fix for CompanyTable - onRowClick
2024-10-20 12:48:29 +11:00
Matthias Mair
16d0fb4798
bump pre-commit (#8318) 2024-10-20 12:06:05 +11:00
Oliver
5f905aab9d
Fix breadcrumb for <BuildOrderDetail /> (#8305)
* Fix breadcrumb for <BuildOrderDetail />

* Add delay for playwright tests
2024-10-18 15:24:20 +11:00
Oliver
17bf7bb5e3
[Plugin] Enhancements for serial number validation (#8311)
* Error handling for plugin.increment_serial_number

* Improve error handling for plugin validation functions

* Add Part.get_next_serial_number method

- Simplify call for incrementing

* ValidationMixin: add "part" to increment_serial_number func

* Pass part information through to serial number functions

* Fix circular imports

* Allow "get_latest_serial_number" to use plugin system

* Better working example for plugin sample

* Update SampleValidatorPlugin

* Fix indent

* Add code comment

* Cleanup code logic

* Revert previous commit

* Update unit tests
2024-10-18 13:45:35 +11:00
Oliver
c9a4e6bf7d
Fix for add_tracking_entry in build.create_output (#8310)
- Also add new end-to-end unit tests
2024-10-18 11:41:04 +11:00
Oliver
d58d34af25
[CUI] Shipment fixes (#8309)
* Fix warning in "complete shipment" dialog

- Broken due to recent API change / refactor

* Request item detail for sub-table

* Fix "ship items" button
2024-10-18 10:25:55 +11:00
Oliver
48dd3d37c4
Bug fix: Manually create serialized stock (#8306)
* Bug fix: Manually create serialized stock

- fixes bug which extraced location as a string, rather than the model instance

* Fix for StockList.create
2024-10-17 19:45:07 +11:00
Oliver
9e0a4c6a7e
Improve API query (#8302) 2024-10-16 20:51:09 +11:00
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