Commit Graph

15766 Commits

Author SHA1 Message Date
dependabot[bot]
13ee755ad3
Bump the dependencies group with 2 updates (#7541)
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.1.0 to 6.2.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](31159d49c0...15560696de)

Updates `github/codeql-action` from 3.25.10 to 3.25.11
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](23acc5c183...b611370bb5)

---
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-07-07 08:07:15 +10:00
Oliver
ab126a8c1b
New Crowdin updates (#7564)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-06 22:20:43 +10:00
Matthias Mair
74d3e28e8e
Ensure schema generation is more stable (#7562)
* Enable passing of enviroment variables

* keep server url static
see #6882 (3)

* keep plugin api out of schema
see #6882 (1)

* Add kwarg to override db settings

* keep currencies stable for schema generation
see #6882 (2)

* use str instead of bool

* add version bump
2024-07-06 22:19:58 +10:00
dependabot[bot]
71680f6fc3
Bump certifi from 2024.2.2 to 2024.7.4 in /contrib/dev_reqs (#7568)
* Bump certifi from 2024.2.2 to 2024.7.4 in /contrib/dev_reqs

Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.2.2 to 2024.7.4.
- [Commits](https://github.com/certifi/python-certifi/compare/2024.02.02...2024.07.04)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

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

* fix style

---------

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-07-06 22:19:36 +10:00
Oliver
1f6cd9fc54
[WIP] Data importer (#6911)
* Adds new model for DataImportSession

* Add file extension validation

Expose to admin interface also

* Switch to new 'importer' app

* Refactoring to help prevent circular imports

* Add serializer registry

- Use @register_importer tag for any serializer class

* Cleanup migration file

- Do not use one-time hard-coded values here

* Refactor code into registry.py

* Add validation for the uploaded file

- Must be importable by tablib

* Refactoring

* Adds property to retrieve matching serializer class

* Update helper functions

* Add hook to auto-assign columns on initial creation

* Rename field

* Enforce initial status value

* Add model for individual rows in the data import

* Add DataImportRow model

* Extract data rows as dict

* Update fields

- Remove "progress" field (will be calculated)
- Added "timestamp" field
- Added "complete" field to DataImportRow

* Auto-map column names

- Provide "sensible" default values

* Add API endpoint for DataImportSession

* Offload data import operation

- For large data files this may take a significant amount of time
- Offload it to the background worker process

* Refactor data import code

* Update models

- Add "columns" field to DataImportSession
- Add "errors" field to DataImportRow

* Move field mapping to a new model type

- Simpler validation

* Save "valid" status for each data row

* Include session defaults when validating row data

* Update content_excludes

- Ignore importer models in import/export

* Remove port from ALLOWED_HOST entries

* Skip table events for importer models

* Bug fixes

* Serializer updates

* Add more endpoints

- DataImportColumnMappingList
- DataImportRowList

* further updates:

- Add 'get_api_url' method
- Handle case where

* Expose "available fields" to the DataImportSession serializer

Uses the (already available) inventree metadata middleware

* Add detail endpoints

* Clear existing column mappings

* Add endpoint for accepting column mappings

* Add API endpoint exposing available importer serializers

* Add simple playground area for testing data importer

* Adds simple form to start new import session

- Needs work, file field does not currently function correctly

* data_file is *not* read_only

* Add check for file type

* Remove debug statements

* Refactor column mapping

- Generate mapping for each column
- Remove "columns" field
- Column names are calculated dynamically

* Fix uniqueness requirements on mapping table

* Admin updates

- Prevent deletion of mappings
- Prevent addition of mappings

* API endpoint updates

- Prevent mappings from being deleted
- Prevent mappings from being created

* Update importer drawer

* Add widget for selecting data columns

* UI tweaks

* Delete import session when closing modal

* Allow empty string value

* Complete column mapping

* Adds ability to remove rows

* Adjust drawer specs

* Add column 'description' to serializer

* Add option to hide labels in API form field

* Update column heading

* Fix frontend linting errors

* Revert drawer position

* Return correct type

* Fix shadowing

* Fix f-string

* simplify frontend code

* Move importer app

* Update API version

* Reintroduce export formats

* Add new models to RuleSet

* typescript cleanup

* Typescript cleanup

* Improvement for Switch / boolean field

* Display original row data on popover

* Only display mapped columns

* Add DataExportMixin class

- Replaces existing APIDownloadMixin
- Uses DRF serializers for exporting
- *much* more efficient

* Create new file: importer.mixins.py

* Add new mixin to existing views which support data export

* Better error handling

* Cleanup:

- Remove references to APIDownloadMixin
- Remove download_queryset method
- All now handled by API-based export functionality

* Replace table with InvenTreeTable

- Paginate imported rows
- Data can be searched, ordered,

* Make 'pathstring' fields read-only

* Expose list of valid importer types to the API

* Exclude read-only fields

* Cleanup

* Updates for session model

- Column is now editable on mapping object
- Field is no  longer editable
- Improve admin integration

* Adds new custom hook for controlling data import session

* Refactor column mapping widget

* Refactor ImportDataSelector

* Working on ImportDataSelector component

* Adds method for editing fields in import table

- Cell edit mode
- Row edit mode
- Form submission still needs work!

* Adds background task for removing old import sessions

* Fix api_version.py

* Update src/frontend/src/components/importer/ImportDataSelector.tsx

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>

* Update model verbose names

* Rename mixin class

* Add serializer mixin classes

- Will allow for fine-tuning of the import/export proces

* @register_importer requires specific mixin

* Check subclass for export

* Fix typos

* Refactor export serializer

- Keep operations local to the class

* Add shim class to process an individual row before exporting it

* Add mixin to existing serializers

* Add export functionality for company serializers

* Adds  placeholder for custom admin class

* Update mantine styling

* spacing -> gap

* Add functionality to pre-process form data before upload

* Remove old references to download_queryset

* Improvements for data import drawer:

- Pin title at top of drawer

* Further improvements

* Fix column selection input

* Formatting improvements

* Use a <Stepper> component for better progress display

* Cleanup text

* Add export-only fields to BuildItem queryset

* Expand "export" fields for BuildItem dataset

* Skip backup and static steps in CI

* Remove hard-coded paths

* Fix for "accept_mapping" method

* Present required fields first on import session

* Add "get_importable_fields" method

* Add method for commiting imported row to database

* Cleanup

* Save "complete" state after row import

* Allow prevention of column caching

* Remove debug statement

* Add basic admin table for import sessions

* Fix for table filter functions

- New mantine version requires string values

* Add filters for import session table

* Remove debug message

* fix for <FilterItem />

* Create new import session from admin page

* Cleanup playground

* Re-open an existing import session

* Memoize cell value

* Update <ImportDataSelector>

* Enable download of build line data

* Add extra detail fields

* Register data importers for the stock app

* Enable download of stock item tracking data

* Register importerrs for "company" app

* Register importers for the "order" app

* Add extra fields to purchase order line item serializer

* Update verbose names for order models

* Cleanup import data table rendering

* Pass session information through to cell renderer

* add separate 'field_overrides' field

* Expose 'field_overrides' to API

* Refactor import field selection

* Use override data if provided

* Fix data extraction

- Ignore columns which are not mapped

* Fix fields.pop

- Provide 'None' argument

* Update import data rendering

* Handle missing / empty column names when importing data

* Bug fixin'

* Update hook

* Adds button to upload data straight to table

* Cache "available_fields"

- Reduces API access time by 85%

* Fix calculation of completed_row_count

* Import individual rows from import session

* Allow import of multiple simultaneous records

* Improve extraction of metadata

- Especially for related fields
- Request object no longer required

* Implement suspended rendering of model instances

* Cleanup

* Implement more columns for StockTable

* Allow stock filtering by packaging field

* Fix "stock_value" column

* Improve metadata extraction

- Handle read_only_fields in Meta
- Handle write_only_fields in Meta

* Increase maximum number of importable rows

* Force data import to run on background worker

* Add export-only fields to StockItemSerializer class

* Data conversion when performing initial import

* Various tweaks

* Fix order of operations for data import

* Rename component

* Allow import/export of more model types

* Fix verbose name

* Import rows as a bulk db operation

* Enable download for PartCategoryTemplateTable

* Update stock item export

* Updates for unit tests

* Remove xls format for now

- Causes some bug in tablib
- Surely xlsx is OK?

* More unit test updates

* Future proof migration

* Updates

* unit tests

* Unit test fix

* Remove 'field_overrides'

- field_defaults will suffice

* Remove 'xls' as download option from frontend

* Add simple unit test for data import

* PUI tweaks

---------

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
2024-07-06 18:29:52 +10:00
Oliver
58f12f5ce5
[PUI] BOM table updates (#7561)
* Update BOM table for PUI

- Display "validated" column
- Allow ordering by "validated" column

* Update table rowActions

* Add row action to validate BOM line

* Enable bulk deletion of BOM items
2024-07-05 16:39:54 +10:00
Oliver
13dbfd0b14
[Build] Add extra validation options (#7560)
* Add new setting: BUILDORDER_REQUIRE_VALID_BOM

- Prevent build orders from being created if the assembly BOM has not been validated

* Add validation check when creating a build order

* Add unit tests
2024-07-05 12:46:34 +10:00
Matthias Mair
720651602b
Package is not checking for already existing installs (#7555)
* rename var

* Single-line installer is not looking for already exsisting installs
Fixes #6891

* move update script up

* fix check

* small syntax fix

* fix missing var assigment

* fix assigment

* better message

* log found settingsmore logging

* also check for 'null'

* fix name confusion
2024-07-05 09:21:07 +10:00
Matthias Mair
5844747e32
Fix SSO theme selection (#7556)
* Adjust caching key to be numeric for user

* Add strong usermodel to colortheme

* switch to using user model everywhere for colortheme

* add some types

* use pk instead of id

* fix migration clash

* fix request
2024-07-05 07:24:55 +10:00
Oliver
7f43040049
Fix 'symbol' field for CustomUnit (#7557)
* Fix 'symbol' field for CustomUnit

- Do not require 'symbol' to be unique

* Run check as part of validate_unique
2024-07-04 23:15:03 +10:00
Matthias Mair
62790cddc0
Display barcode text near qrcode (#7553)
* Add setting to add texts to modals

* Adjust style

* adjust icon
2024-07-04 08:46:45 +10:00
Oliver
b15eb35273
[PUI] Error pages (#7554)
* Add <PermissionDenied /> page

* Check permissions for admin center

* Wrap <PartDetail> page in an error handler

- Display client or server errors

* Add error handlers to other detail pages

* Refactor error pages

* Add playwright tests

* Refactor component locations

* Get test to work
2024-07-04 00:34:52 +10:00
Oliver
0c293fa896
Fix call to add_label_context (#7548)
- Remove reference to object_to_print
- Correctly pass model instance
2024-07-02 23:05:13 +10:00
Matthias Mair
dc3f2011fd
detect python version for installer (#7547) 2024-07-02 22:38:44 +10:00
Oliver
ade6cfb878
[PUI] Update table filters (#7544)
* Update part table filters

* Update stock location table filters

* Update part category table filters
2024-07-02 11:32:41 +10:00
Oliver
ee7a9626e8
New Crowdin updates (#7538)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-02 11:14:59 +10:00
Lavissa
da9ab4a64f
[PUI] Fix choice-based settings showing as string fields (#7543) 2024-07-02 10:25:22 +10:00
Oliver
ee97f0859d
New Crowdin updates (#7523)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-29 22:02:53 +10:00
Oliver
fd91085363
Calculate weighted average price when merging stock items (#7534)
* Calculate weighted average price when merging stock items

* refactor currency averaging

- Only add samples which have an associated value

* Revert to using two loops

* Check for div-by-zero

* Add unit testing for purchase price averaging
2024-06-29 20:43:49 +10:00
Oliver
3b3352119f
Fix import widget type (#7535) 2024-06-29 20:43:37 +10:00
Philipp Fruck
60e22c50cd
Feat: SSO group sync (#7293)
* feat: Add settings for SSO group sync

* feat: Handle SSO group sync

* fix(SSO): Add default group only if it is the only one

When syncing SSO groups on first user creation,
the default group should not be added if there is
already another group synced by the IdP

* docs: Add SSO goup sync instructions

* fix: Run pre-commit hooks

* i18n(SSO): Wrap settings name and description

* docs(SSO): Fix links to allauth docs

* fix(frontend): Add SSO_GROUP_KEY option

* add unittests for SSO

* docs(SSO): Make hint for example comfiguration a tip

* docs(SSO): Describe relation between SSO sync and signup group

* fix(SSO): Avoid potential key error

* feat(SSO): Create mapped group if it does not exist

* docs(SSO): Describe how groups can be created during signup

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-06-29 20:32:28 +10:00
Oliver
b924530627
Plugin static files fix (#7532)
* Improve logging messages

* Refactor

* Re-add import

- Weird?
2024-06-29 20:11:28 +10:00
Oliver
f67147587a
Add field info to user serializer (#7518)
* Add field info to user serializer

* Bump API version

* Adjust metadata translation lookup

* Improve field metadata introspection

* Add unit test
2024-06-26 23:11:54 +10:00
Oliver
c1b2cbef5e
[PUI] Table filters (#7519)
* Fix for table filter functions

- New mantine version requires string values

* Add playwright test for tables
2024-06-26 21:16:37 +10:00
Oliver
a9223970bd
New Crowdin updates (#7517)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-26 18:45:40 +10:00
Oliver
6cd0727714
Handle case where deltas is null (#7516) 2024-06-26 13:17:31 +10:00
Oliver
e920165901
Fix for BOM import (#7515) 2024-06-26 12:48:03 +10:00
Oliver
937824dceb
Top level cascade (#7514)
* Add "top_level" filter for PartCategory API endpoint

* Update CUI tables

* Update PUI table

* Similar updates for stock location table

* Fix "parent" field label

* Bump API version
2024-06-26 12:28:33 +10:00
Oliver
81ae9026b2
Fix table permissions for CUI (#7513) 2024-06-26 09:47:51 +10:00
Oliver
9c3914db0a
Handle null response case (#7512) 2024-06-26 08:26:38 +10:00
Matthias Mair
c9e9ef1754
Bump pre commit versions (#7255)
* bump pre-commit tools

* move uv config to pyproject

* style fix

* bump pre-commit deps again

* add config for code spell

* spelling fixes

* bump regex

* bump pre-commit

* bump versions again

* roll back regex version

* reverse uv bump

* compile for 3.12

* use 3.12 for ci

* remove unused env vars

* only cache main version

* set caching dep path

* remove caching distinction

* pip installl regex

* switch back to 3.9 default

* remove install test

* reset versions

* remove tomli

* Update playwright.config.ts

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-06-25 20:52:34 +10:00
Oliver
3ed2a4a16b
Ensure defined response (#7511) 2024-06-25 20:16:45 +10:00
Oliver
da42fdf06e
Plugin load fix (#7505)
* Cast setting to int

* Prevent single faulty plugin from killing *all* plugins

* Handle specific errors on _load_plugins

* Update unit test
2024-06-25 12:44:30 +10:00
Oliver
4989e86349
Error checking for attachment model type (#7506) 2024-06-25 11:48:00 +10:00
dependabot[bot]
c6ad902ccc
Bump docker/build-push-action in the dependencies group (#7502)
Bumps the dependencies group with 1 update: [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `docker/build-push-action` from 6.0.0 to 6.1.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](c382f710d3...31159d49c0)

---
updated-dependencies:
- dependency-name: docker/build-push-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>
2024-06-25 09:27:07 +10:00
Oliver
b58430b7f9
Allow search results to be opened in a new tab (#7500)
- Respond to "ctrl" or "shift" presses in search drawer
- Keep drawer open in this condition
2024-06-24 10:31:11 +10:00
Oliver
c2a755e3bd
Fix for example test report (#7498) 2024-06-23 22:25:23 +10:00
Oliver
54a9bcef57
Handle missing dulwich module (#7497)
- If "invoke version" called from outside venv, may not detect correct dulwich module
- Ref: https://github.com/inventree/InvenTree/issues/7444
2024-06-23 22:25:14 +10:00
Oliver
89196ef701
New Crowdin updates (#7492)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-23 22:15:21 +10:00
Oliver
5f512fa3ec
PUI bug fix (#7490)
- Handle null data case
2024-06-22 12:31:34 +10:00
Oliver
831b5f4f3f
New Crowdin updates (#7487)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-22 12:31:22 +10:00
dependabot[bot]
2cb5df288e
Bump urllib3 from 2.2.1 to 2.2.2 in /contrib/dev_reqs (#7467)
* Bump urllib3 from 2.2.1 to 2.2.2 in /contrib/dev_reqs

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.2.1...2.2.2)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

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

* fix reqs file

---------

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-06-22 08:35:35 +10:00
Matthias Mair
935243c2d5
More tests for users app (#7479)
* disable patch coverage

* also test for is_active flag

* ignore edge case regarding coverage

* add tests for api logout

* test login redirects

* style fixes

* fully utilise serializer for /api/user/roles api

* ignore logout mig from cov

* bump api version as we are now documenting the roles endpoint

* ignore on migration runs for coverage

* remove dead code

* ignore potential caching errors for coverage

* test default dj_rest_auth token endpoint

* move pragma

* just ignore whole block

* move ignore back

* test for token based token revocation
2024-06-21 23:49:52 +10:00
mp-strachan
5a6708a042
Fix non null field 'description' (#7488)
Fix typo in migration '0026_auto_20240422_1301.py' to resolve error: `TypeError: LabelTemplate() got unexpected keyword arguments: 'decription'`
2024-06-21 21:31:07 +10:00
Oliver
edd0680344
Handle case where data is undefined (#7486) 2024-06-21 09:09:09 +10:00
Oliver
8543e74c6e
New Crowdin updates (#7473)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-20 21:14:57 +10:00
Oliver
442f2594d0
Add "showmigrations" task to invoke (#7482)
- Helpful for debugging user installs
2024-06-20 21:14:47 +10:00
Oliver
758871b8a9
Fix fields for PurchaseOrderCancelSerializer (#7481)
- Throwing an error on an OPTIONS request
2024-06-20 20:48:15 +10:00
Gigahawk
545ab9205b
fix: add .vite folder in frontend releases (fixes #7476) (#7480) 2024-06-20 20:04:28 +10:00
Matthias Mair
39f3b900de
[PUI] Add 2FA login (#7469)
* Add `2fa_urls`

* Add new fields to serializer

* Add new interface to PUI interfaces

* fix url resolving

* add frontend redirect for MFA login

* redirect login if mfa is required

* Merege upstream/master into branch

* reset default login

* remove mfa states

* fix auth args

* add handler for MFA redirect auth

* Revert "Merege upstream/master into branch"

This reverts commit 717001d8f1.

* revert api version bump

* revert frontend error handling change

* reduce complexity

* reset schema text

* Add e2e test for MFA login url

* accept either POST or body data for login pre-check

* remove CUI test

* style fixes
2024-06-20 08:38:43 +10:00