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

1334 Commits

Author SHA1 Message Date
Oliver
9fd882f95e
[PUI] Task table enhancements (#8369)
* Refresh task counts when updating tables

* Handle case where error is null
2024-10-26 12:40:24 +11:00
Oliver
3253a4a93c
[Bug] Ensure links are prepended with base URL on receipt (#8367)
* Ensure links are prepended with base URL on receipt

* Bug fix
2024-10-26 12:40:14 +11:00
Oliver
331692bb46
Notifications fix (#8360)
* Fix for app loading

- Allow collection for background worker too

* Improved logging

* Refactor MethodStorageClass

- Cache methods more intelligently
- Re-collect if null
2024-10-25 18:00:32 +11:00
Oliver
6be6c4b42f
[WIP] Build line filter fix (#8343)
* Remove 'allocations' from BuildLineSerializer

- Expensive to have a "many" serializer automatically used
- Adjust existing tables accordingly
- Fetch on demand

* WIP: Add some unit tests

* Adjust BuildLine queryset annotation

- Multi-level annotation proves to be very expensive
- Reduce complexity, save a bunch of time on queries
- Remove 'total_allocated_stock' field
- Adjust API query filter

* Optimize query by deferring certain fields

* Further query refinements

* Bump API version
2024-10-25 15:54:20 +11:00
Oliver
075b62757a
Bug fix for auto-allocation against build order (#8359) 2024-10-25 15:54:11 +11:00
Oliver
662cf7da3b
Log failed task (#8333)
* Bug fix for build models

* Notify staff users when a background task fails

* Improve object lookup for notification

* Handle url reversal error case

* Add unit testing
2024-10-24 22:15:01 +11:00
github-actions[bot]
6bf9a97f52
New Crowdin translations by GitHub Action (#8348)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-24 21:15:17 +11:00
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
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
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
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
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
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
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