Commit Graph
100 Commits
Author SHA1 Message Date
OliverandGitHub 8404e2232f Reduce severity of error message (#9209)
- Currently flooding sentry.io with reports
2025-03-01 16:12:01 +11:00
OliverandGitHub 6c52f00c16 Call machine func (#9191)
* Force label printing to background worker

* Refactor "check_reload" state of machine registry

- In line with plugin registry
- More work can be done here (i.e. session caching)

* Better handling of call_plugin_function

* Wrapper for calling machine function

* Use AttributeError instead

* Simplify function offloading

* Check plugin registry hash when reloading machine registry

* Cleanup

* Fixes

* Adjust unit test

* Cleanup

* Allow running in foreground if background worker not running

* Simplify call structure
2025-02-28 21:07:56 +11:00
OliverandGitHub 92a9423c21 Remove restriction on row action (#9201) 2025-02-28 16:43:25 +11:00
OliverandGitHub 28259a1ad6 Add loading indicator for custom panels (#9194) 2025-02-27 15:25:56 +11:00
OliverandGitHub 92edbf41ab Add 'note' field to form (#9186) 2025-02-26 13:56:28 +11:00
OliverandGitHub 3940544a70 Allow custom icons to be cleared (#9185)
* Allow custom icons to be cleared

- Closes https://github.com/inventree/InvenTree/issues/9182

* Bump API version

* Update unit test

* Loosen test requirements
2025-02-26 13:25:44 +11:00
OliverandGitHub 94c2157d3c Handle case of null stock location (#9183) 2025-02-26 09:26:11 +11:00
OliverandGitHub 1a4a2b21d7 Include plugin file location in "invoke version" (#9176) 2025-02-26 08:41:11 +11:00
OliverandGitHub df60b1bc22 Allow reload of stock table if multiple new items are created (#9178) 2025-02-25 21:37:43 +11:00
OliverandGitHub 58a03d960a Refactor API token display (#9168)
* Refactor API token display

* Tweaks

- Fix accessor ID
- Add filtering

* Revert ordering fields
2025-02-25 07:03:22 +11:00
OliverandGitHub cfdafcd791 Dashboard item rendering fixes (#9163) 2025-02-23 21:39:22 +11:00
OliverandGitHub c9666ff8ec Remove 'url' field from serializers (#9150)
* Remove 'url' field from serializers

- Not used in any official client
- Inconsistent use across models

* Bump API version

* Adjust unit tests

* Fix API version
2025-02-23 21:07:34 +11:00
OliverandGitHub 9d1d0fa66b Cleanup backend code (#9158)
* Cleanup backend code

* Re-add # TODO
2025-02-23 17:51:51 +11:00
OliverandGitHub 56de14610f Fix CI pipelines (#9159)
* Use python venv in CI workflows

* Revert action.yaml

* Include invoke path in sys info

* Fix typo
2025-02-23 16:32:00 +11:00
OliverandGitHub 05fa36df72 TODO Cleanup (#9152) 2025-02-23 09:31:02 +11:00
OliverandGitHub 07423ff247 Slight tweaks to forms (#9149) use 2025-02-22 23:33:35 +11:00
OliverandGitHub 347f7ea050 [UI] Barcode scanner update (#9151)
Use BARCODE_WEBCAM_SUPPORT setting
2025-02-22 23:33:17 +11:00
OliverandGitHub 8df34cefd6 [UI] Settings render (#9148)
* Update sample plugin

* Inline rendering of model based settings

* Spelling fix

* Add playwright testing
2025-02-22 21:59:06 +11:00
OliverandGitHub 84d3a716e0 [UI] Reduce test sensitivity (#9146) 2025-02-22 20:06:34 +11:00
OliverandGitHub 7098ac74d2 [UI] Stock batch codes (#9145)
* Display batch code in stock item preview

* Show batch code in stock operations modal

* Refactor StockForms

* More table refactoring
2025-02-22 19:52:18 +11:00
OliverandGitHub 4cacf83294 Update plugin docs (#9144)
- Add examples for new types of settings features
2025-02-22 17:47:33 +11:00
OliverandGitHub bd7e515856 Harden playwright tests (#9141) 2025-02-22 17:14:14 +11:00
OliverandGitHub 74e3122581 Mixin cleanup (#9142)
* Remove legacy SettingsContentMixin

- Only used for rendering into old UI
- No longer useful

* Refactor path for NavigationMixin

* Fix typos

* Fix borked import
2025-02-22 17:13:29 +11:00
OliverandGitHub e447e4037b UI cleanup (#9140)
* Refactor SecurityContext page:

- Add Accordion to separate different groups
- Fix "make primary" button (requires PATCH)
- Responsive grid design

* Add splash screen background to more pages

* Adds playwright testing for email setup

* Refactoring

* Fix playwright tests
2025-02-22 17:13:12 +11:00
OliverandGitHub 44cca7ddf2 [UI] Search Improvements (#9137)
* Harden playwright tests

* Refactor search drawer

- Allow result groups to collapse

* Add tooltip

* Fix menu position

* Navigate through to complete list of results

* Refactor table headers

* Add index pages for SupplierPart and ManufacturerPart models

* backend: allow split search by company type

* Fix panel naming bug

* Fix model URLs

* Split company results by company type

- Allows better routing to results list

* Remove debug msg

* Fix 'button within button' issue

* Additional playwright tests
2025-02-22 15:00:25 +11:00
OliverandGitHub 09cdf72bda Handle undefined values (#9139) 2025-02-22 11:52:11 +11:00
OliverandGitHub 1f84f24514 Batch code fix (#9123)
* Fix batch code assignment when receiving items

* Add playwright tests

* Harden playwright tests

* Refactoring
2025-02-22 08:34:45 +11:00
OliverandGitHub bc9dbf7df4 Barcode validation fix (#9127)
* Fix logic for adding items to SalesOrder

* Same thing for purchase orders

* Update serializers.py

Revert typo fix

- Otherwise, we need to do an API bump and the PR can't be back-ported!
2025-02-21 22:17:55 +11:00
OliverandGitHub 6930ae7122 Ignore inactive parts (#9125) 2025-02-21 20:55:22 +11:00
OliverandGitHub ab4eff19d3 [UI] Pricing chart fixes (#9119)
* Fix default values for pricing override

* Fix broken calculation for sale pricing

- Was previously excluding COMPLETED orders

* Fix for PricingOverviewPanel

* Fix for InvenTreeMoneySerializer

- Numbers should be represented as numbers!

* Front-end wrangling too

* Fix unit test
2025-02-21 19:09:57 +11:00
OliverandGitHub 15ad62494f [Docker] Alpine image fix (#9118)
* Revert to alpine3:20 / postgres:16

* Remove old hack

- No longer needed as we are using python 3.11

* Update package requirements for devcontainer

Also fixes some docker warnings from the alpine Dockerfile

* Specify SITE_URL

* Reduce log output during docker image testing
2025-02-21 18:02:39 +11:00
OliverandGitHub 96bca652c4 Logic fix for label printing plugin (#9117) 2025-02-21 16:06:04 +11:00
OliverandGitHub e492774808 Use postgres for playwright testing (#9104)
* Use postgres for playwright testing

- Should reduce issues with parallel tests

* Fix deps

* Harden playwright tests
2025-02-19 20:33:54 +11:00
OliverandGitHub 7e7f745c89 Updates to admin interface (#9103) 2025-02-19 15:09:34 +11:00
OliverandGitHub 8cbddd489d Devcontainer updates (#9101)
* Update docker image

- Required changes to pass display through from host OS

* Update docs

* Update devcontainer docs
2025-02-19 11:04:20 +11:00
OliverandGitHub 480536a023 PartThumbTable updates (#9094)
- Change columns based on viewport width
- Use debounced value
- Enable pagination
- Fix pagination on backend API
2025-02-18 13:48:44 +11:00
OliverandGitHub a3ffc01d88 Remove 'is_ajax' helper (#9095)
- Old, dead code
- No longer needed
2025-02-18 13:48:35 +11:00
OliverandGitHub 0404d5c137 [dev] Devcontainer tweak (#9092)
* Remove blocking steps from devcontainer setup

* Ensure postCreateCommand.sh fails

* Mount postgres db to separate dir

- Avoid ownership issues of 'dev' dir

* Bump devcontainer docs
2025-02-18 12:24:49 +11:00
OliverandGitHub 6f939931ca Docker postgres fix (#9041)
* Update docker image

- Move from alpine 3.19 to alpine 3.21
- Move from postgres13_client to postgres17_client

* Update docker-compose file

- Move from postgres:13 to postgres:16
- Move from redis:7.0 to redis:7-alpine

* Update docs

* Update docker docs

* Separate Dockerfile for devcontainer

- Debian based (python3.11-bookworm)
- Install essential system packages

* Instal postgres client

* Further devcontainer updates

- Bump postgresql image from 13 to 15
- Store psql data in the dev/psql directory
- Install required frontend packages

* Use --host mode for frontend server

* Tweak devcontainer docs

* Bump pre commit config file

* Revert "Bump pre commit config file"

This reverts commit bbfd875ac8.
2025-02-15 08:00:12 +11:00
OliverandGitHub 8367c32e84 Remove dead code related to BOM import (#9079)
* Remove dead code related to BOM import

- Now handled by generic import tool
- Replaces https://github.com/inventree/InvenTree/pull/8756

* Bump API version
2025-02-15 07:59:43 +11:00
OliverandGitHub 944a4f28be Setting filter (#9076)
* Expose "model_filters" to settings API

* Enable settings filters in the front-end

* Fix return types

* Bump API version
2025-02-14 19:15:42 +11:00
OliverandGitHub cca1912220 Adds "is_variant" filter for Part API (#9077)
* Adds "is_variant" filter for Part API

* Bump API version
2025-02-14 17:08:27 +11:00
OliverandGitHub caa0498aa3 [UI] Test Result Table Tweak (#9075)
Control row expansion property for StockItemTestResultTable
2025-02-14 10:00:46 +11:00
OliverandGitHub f27a84a7e5 Bug fix for receiving line item event (#9071)
- Use StockItem ID correctly
- Provide line ID
2025-02-13 14:39:05 +11:00
OliverandGitHub 7049e84ac3 Fix for data import (#9060)
- Prevent shadow overwrite of default_values dict
- Remove dead code
2025-02-12 07:24:24 +11:00
OliverandGitHub 3a423c3e40 [Setup] Enhance version information output (#9049)
* Improve output of 'invoke version'

- Display backup path
- Handle undefined paths without error

* Provide colorized output
2025-02-08 12:12:11 +11:00
OliverandGitHub 49824ddf31 Fix typos in settings.py (#9048) 2025-02-08 10:45:47 +11:00
OliverandGitHub e1f25a03d4 Tweak playwright tests (#9027) 2025-02-04 22:52:01 +11:00
OliverandGitHub 445fa45394 Enhance creation of default settings (#9028)
- Remove cache requirement
- Replaces https://github.com/inventree/InvenTree/pull/9021
2025-02-04 22:51:51 +11:00
OliverandGitHub b6c7a636fd Extend plugin docs (#9025) 2025-02-04 15:41:57 +11:00
d363c408f8 [Pricing] Add option to convert received items currency (#8970)
* Add new global setting

* Convert to base currency on receipt

* Fix total price rendering in PO table

* Fix for tasks.py

* Update .gitignore

- Ignore auto-generated files

* Update docs

Improved documentation for pricing/currency support

* Updates

* Fix caching for default currency

- Now managed better by session caching

* Add unit test for new feature

* Playwright test fixes

* Validate copying of media files

* Validate media files

* Adjust playwright setup

* Allow multiple attempts to fetch release information

* Tweak unit tests

* Revert changes to .gitignore file

- Just trying stuff at this point

* Add debug msg

* Try hard-coded paths

* Remove debug prints

* Abs path for database

* More debug

* Fix typos

* Revert change to db name

* Remove debug statements (again)

* Cleanup playwright tests

* More test tweaks

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2025-02-03 18:34:15 +11:00
OliverandGitHub a760d00c96 Cleanup BomItemSerializer (#9017)
- Consolidate functions
- Code cleanup
2025-02-03 13:50:17 +11:00
OliverandGitHub 2a6434ead8 Report bugfix (#9013)
- Ensure default label templates exist
- Ensure default report templates exist
2025-02-02 23:28:28 +11:00
OliverandGitHub 56bfbfb1b4 Tweak for data import (#9010)
- Do not override specified default values
2025-02-02 09:25:28 +11:00
OliverandGitHub c077e2b605 [Bug] mport fix (#9008)
* Better handling of request object in serializers

* Pass request object through

- Required to extract user information

* Strip column header during import

- Prevent mismatch due to whitespace

* Fix for "minimum stock" field

* Fix for part serializer

* Extract default values on import

* Remove outdated migration message

* Bump API version
2025-02-02 07:57:06 +11:00
OliverandGitHub eba004d835 [UI] Report ouputs (#9003)
* Typo fixes

* Display table of generated reports

* Display generated label outputs

* Translation

* Allow sorting of API Endpoints

* Add template detail to output serializers

* Add extra table column
2025-02-01 22:44:52 +11:00
OliverandGitHub bef6270ff6 Login form tweaks (#9005)
* Login form tweaks

- Improve consistency
- Add tooltips

* Cleanup ServerInfo list

* Slight layout tweaks
2025-02-01 17:39:18 +11:00
OliverandGitHub 855afde4e5 Report print update (#9002)
* Refactor label printing

- Move "print" method to template
- Allows for internal calls to printing (e.g. plugins)

* Generate dummy request

- Required to trick WeasyPrint

* Refactor reportprinting

* Add timeout for unit test

* More unit tests

* Tweak unit test

* Updated comment
2025-02-01 17:08:33 +11:00
OliverandGitHub 821b311d73 [CI] Playwright testing improvements (#8985)
* Run playwright tests in headless mode

* Add navigation helper

* Validate files

* test fix

* Remove 'headless'

* Fixes

* Fix for 'navigate' helper

* Further updates
2025-02-01 16:29:13 +11:00
OliverandGitHub f663e008df Fix for gitignore (#8987) 2025-01-29 23:35:29 +11:00
OliverandGitHub eee4916350 Order start dates (#8966)
* Add 'start_date' field to orders

- PurchaseOrder
- SalesOrder
- ReturnOrder

* Add serializer field

* Add API filters

* Add table columns

* Add fields to forms

* Table filters

* Add validation check

* Refactor BuildOrderTable

* Update detail page

* Bump API version

* Allow sorting by start_date

* Fix for purchase order field

* Update detail pages

* Update playwright tests

* Updated playwright tests

* Documentation updates

* Updated playwright tests
2025-01-29 22:45:39 +11:00
OliverandGitHub 0c56a3132b Fix for chart rendering (#8981)
- Graphs like numbers, not strings, I guess...
2025-01-29 17:38:12 +11:00
OliverandGitHub 01b74da255 [UI] Part pricing breaks (#8975)
* Un-hide pricing panels

* Change positioning

* Enhanced playwrigh testing
2025-01-29 15:52:25 +11:00
OliverandGitHub c67e80b50e Fix user role caching issues (#8973)
* Fix user role caching issues

* Handle null user case

* Fix typo

* More spelling fixes
2025-01-28 20:39:05 +11:00
OliverandGitHub 16b03a7371 Fix for 'issued_by' field on BuildDetail page (#8962) 2025-01-27 23:45:48 +11:00
a13f5681a1 SalesOrder migration unit test (#8814)
* Unit test for SalesOrder data migration

* make field checks more stable

* Adjust migration  strategy

* Fix for data migration

* Simplify login test for playwright

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2025-01-27 21:01:02 +11:00
OliverandGitHub 630d165c22 [Enhancement] Request cache (#8956)
* Middleware for caching against request

* Create helpers for setting / getting session cache

* Settings objects check session cache first

* Ensure setting is removed from session cache when updated

* Cleaner implementation

* Fix cache cleanup

- ONLY allow access if there is a request object
- Ensure cache is deleted once session is over

* Skip plugin registry reload check
2025-01-27 14:45:11 +11:00
OliverandGitHub ddcb7980ff [Refactoring] Data Export (#8950)
* Allow extraction of "child" fields when exporting serialized data

* Update StockItemSerializer

* Add missing default attribute

* Cleanup export for BuildItemSerializer

* Refactor BuildLineSerializer

* Refactor BomItemSerializer

* Auto-exclude tags from export (for now)

* Cleanup SupplierPartSerializer

* Updated unit test

* Cleanup

* Bump API version

* Reduce serializer complexity

* Refactor StockLocation API endpoints

* Cleanup API

* Enhanced docstrings
2025-01-27 14:03:40 +11:00
OliverandGitHub d5928f038d Add check for minimum invoke version (#8952) 2025-01-26 11:44:57 +11:00
OliverandGitHub 640d5852e4 Docs updates: (#8951)
* Docs updates:

- Fix error related to key access
- Fix rendering of settings tables
- Add setting key as mouseover text

* Revert config
2025-01-26 11:00:14 +11:00
OliverandGitHub ab7e6385c2 Notification cleanup (#8945)
- Prevent spamming of duplicate notifications
2025-01-26 07:18:38 +11:00
OliverandGitHub e9bc4645ca Build category filter (#8940)
* Add 'category' filter to BuildList

- Allows filtering by part category

* Add filter element to build table

* Bump API version
2025-01-22 22:22:03 +11:00
OliverandGitHub 19d7825fa6 Cleanup dead code (#8939)
- Used for old UI plugins
- No longer referenced
2025-01-22 21:04:39 +11:00
OliverandGitHub 8e8b7158b7 Plugin reload fix (#8922)
* Add option to disable auto-reload of dev server

* Force plugin reload

* Add unit testing for plugin reload

- Requires modifications to registry.py
2025-01-22 16:34:13 +11:00
OliverandGitHub fddaaf9844 Code cleanup (#8931)
- Remove TemplatePrintBase class
- Not referenced in code
2025-01-21 09:55:44 +11:00
OliverandGitHub f602c439ca Fix docstring for Build model (#8928) 2025-01-21 01:56:57 +11:00
OliverandGitHub 68d3620bb2 Include location detail in build output table (#8923)
* Include location detail in build output table

* Raise validation error if trying to split an in-production item
2025-01-21 01:41:13 +11:00
OliverandGitHub 2575c7276c Import fix (#8924)
* Exclude "tags" fields from data import

- May reintroduce at a later date
- Currently, no support for editing tags in frontend

* Refactor
2025-01-21 01:24:36 +11:00
OliverandGitHub 95874d9097 Update SalesOrderAllocationTable (#8911)
* Update SalesOrderAllocationTable

- Add 'description' column for part
- Add 'IPN' column for part

* Fix unit test
2025-01-21 00:37:36 +11:00
OliverandGitHub 7ad49949c8 Build start date (#8915)
* Add 'start_date' to Build model

* Add to serializer

* Add filtering and ordering

* Update BuildOrderTable

- Add new column
- Add new filtering options

* Add sanity check for start_date

* Add 'start_date' field to BuildOrder form

* Update docs

* Bump API version

* Tweak unit testing

* Display 'start_date' on build page

* Refactor UI tests

* Fix for 'date' field in forms

* Add additional unit tests

* Fix helper func

* Remove debug msg
2025-01-21 00:37:23 +11:00
OliverandGitHub 87ccf52562 Reintroduce setting for project codes (#8920)
* Re-introducde old setting

* Optionally hide project code column

* Control visibility of table filters

* Hide fields from forms
2025-01-20 23:29:20 +11:00
OliverandGitHub 37c8418f0e Pass locale information through to plugins (#8917) 2025-01-20 15:40:32 +11:00
OliverandGitHub 40c5910311 Cleanup UserManagementPanel (#8914)
- Split items using <Accordion />
2025-01-20 13:18:31 +11:00
OliverandGitHub 5de65891c3 Allow CORS for /plugin/ URLs (#8898)
- Ref: https://github.com/inventree/inventree-order-history/issues/17#issuecomment-2591275055
2025-01-15 14:45:58 +11:00
OliverandGitHub c7e960728d Upload timeout (#8895)
* Increase upload timeout for attachments

* Increase default API timeout

- To account for distant connections

* Use longer timeout when uploading files

* Debug for RTD testing

* Adjust commit extraction

* Cleanup debug output

* Include more vars in output

* Move debug output to top of file

* Add useful link
2025-01-15 14:02:43 +11:00
OliverandGitHub 412bba50ba Slight tweak to <DetailsTable> (#8890)
* Slight tweak to <DetailsTable>

* Responsive layout for user settings

* Make menu links responsive

* Update <FactCollection />

* Update part pricing panels
2025-01-14 13:42:03 +11:00
OliverandGitHub 46f6450ee1 [UI] Responsiveness Improvements (#8885)
* Shorten string in page title

* Style fixes

* Adjust cell width props

* Refactor <PageDetail> component

- Improve responsiveness

* Simplify <ItemDetailsGrid />

* Refactor <DetailsImage>
2025-01-14 10:38:48 +11:00
OliverandGitHub dd5aa5f4e4 Allow null value for expiry_date field (#8886)
* Allow null value for expiry_date field

* Bump API version
2025-01-13 14:31:03 +11:00
OliverandGitHub b06b762895 [UI] Reactive Details Columns (#8883)
* Adapt details column count

- Based on element width

* Pin minimum size of thumbnail

* Cleaner implementation

* Revert again

- Use element size, not screen size
2025-01-12 14:58:52 +11:00
OliverandGitHub c75630d1bd Add Serbian to LanguageContext.tsx (#8880) 2025-01-12 09:06:44 +11:00
OliverandGitHub 7eac3d7d42 Forms refactor (#8876)
- Use dayjs for cleaner code
2025-01-12 08:18:42 +11:00
OliverandGitHub 000419255a Adjust StockItem form (#8869)
- Auto-set expiry date
2025-01-11 09:22:53 +11:00
OliverandGitHub c99aae5a28 Updated docstring (#8868) 2025-01-10 18:10:42 +11:00
OliverandGitHub dcff7a5ccd Simplify translated string (#8860) 2025-01-08 12:55:56 +11:00
OliverandGitHub c815455461 Datamatrix (#8853)
* Implement datamatrix barcode generation

* Update documentation

* Update package requirements

* Add unit test

* Raise error on empty barcode data

* Update docs/hooks.py
2025-01-08 12:06:00 +11:00
OliverandGitHub 9138e31e58 Created by (#8848)
* Add 'created_by' field to order API endpoints

* Add 'created_by' filter

* Allow ordering by 'created_by' field

* Update UI tables

- Show "Created By" column
- Column sorting
- Column filtering

* Cleanup order detail pages

* Bump API version

* Refactor table filters

* Fix BuildOrderTable filters
2025-01-08 10:07:38 +11:00
OliverandGitHub 296c54a1d7 [UI] API Context (#8851)
* Create ApiContext provider

* Utilize new context

* Remove api from global context

* Refactor <InvenTreeTable>

- No longer need hard-coded API constant

* Refactor useInstance hook

* Refactoring

- QueryCountDatshboardWidget
- NotesEditor
- RenderInstance

* Refactor multiple tables

* Fix typos

* Refactor useFilters hook

- Allow plugins to use this hook!

* Further refactoring

* Refactor API forms

* Cleanup context routing

* Fix provision order
2025-01-08 07:34:06 +11:00
OliverandGitHub 3a62bdd276 Ensure error is raised (#8849) 2025-01-07 17:07:07 +11:00
OliverandGitHub b42edbf2ab Fix for notification (#8840)
label -> title
2025-01-07 15:00:48 +11:00
OliverandGitHub dcf0bb103e Order creation fix (#8846)
* Bug fix for PurchaseOrder

- Correctly record the user who created a PO
- Code refactoring

* Updated unit tests
2025-01-07 14:59:22 +11:00