Commit Graph

15260 Commits

Author SHA1 Message Date
Xander Luciano
97ec4d00ef
Make modal footer fixed (#6696) (#6699)
* Quick attempt at fixed form footer

* slightly improve on lower res devices

* Squashed commit of the following:

commit 06c7ebfc21
Author: Oliver <oliver.henry.walters@gmail.com>
Date:   Sat Mar 16 09:11:57 2024 +1100

    Update docker_install.md (#6723)

    * Update docker_install.md

    Add note about external access

    * Update docker_install.md

commit a00d5ab4b5
Author: Oliver <oliver.henry.walters@gmail.com>
Date:   Fri Mar 15 17:53:58 2024 +1100

    Disable BOM requirement (#6719)

    * Add new setting STOCK_ENFORCE_BOM_INSTALLATION

    - Defaults to True (legacy)

    * Add logic to bypass BOM check

    * Update CUI to reflect new logic

    * Render InstalledItemsTable in PUI

commit 160d014e44
Author: Oliver <oliver.henry.walters@gmail.com>
Date:   Fri Mar 15 17:12:53 2024 +1100

    [PUI] Details Pages (#6718)

    * Add "details" view to SupplierPart page

    * Fix PartActions

    * Add placeholder for actions

    * Add "title" option to DetailsTable

    * Add edit form to supplier part page

    * Fix link to manufacturer part

    * Add "details" view to ManufacturerPartDetail page

    * Add edit for ManufacturerPart

    * Create new manufacturer part from company table

    * Tweak ActionIcon

commit 57a1a81e9b
Author: Oliver <oliver.henry.walters@gmail.com>
Date:   Fri Mar 15 12:24:17 2024 +1100

    Reporting: Build line label fix (#6717)

    * Fix "BuildLine" label in PUI

    - Point to "buildline" not "build"

    * Prevent escape closing template ediror

    * Update report docs

    * Fix for format_number

    - Prevent number from being represented as scientific notation

commit 0196dd2f60
Author: Lavissa <lavissawow@gmail.com>
Date:   Fri Mar 15 02:06:18 2024 +0100

    [PUI/Feature] Integrate Part "Default Location" into UX (#5972)

    * Add default parts to location page

    * Fix name strings

    * Add Stock Transfer modal

    * Add ApiForm Table field

    * temp

    * Add stock transfer form to part, stock item and location

    * All stock operations for Item, Part, and Location added (except order new)

    * Add default_location category traversal, and initial PO Line Item Receive form

    * .

    * Remove debug values

    * Added PO line receive form

    * Add functionality to PO receive extra fields

    * .

    * Forgot to bump API version

    * Add Category Default to details panel

    * Fix stockItem query count

    * Fix reviewed issues

    * .

    * .

    * .

    * Prevent root category from checking parent for default location

commit 6abd33f060
Author: Oliver <oliver.henry.walters@gmail.com>
Date:   Fri Mar 15 00:24:48 2024 +1100

    Report enhancements (#6714)

    * Add "enabled" filter to template table

    * Cleanup

    * API endpoints

    - Add API endpoints for report snippet
    - List endpoint
    - Details endpoint

    * Update serializers

    - Add asset serializer
    - Update

    * Check for duplicate asset files

    - Prevent upload of duplicate asset files
    - Allow re-upload for same PK

    * Duplicate checks for ReportSnippet

    * Bump API version

commit cbd94fc4b5
Author: Oliver <oliver.henry.walters@gmail.com>
Date:   Thu Mar 14 23:06:11 2024 +1100

    Fix for caddyfile (#6712)

    - Add "authorization" to Access-Control-Allow-Headers
    - CORS requests actually *work* now

commit ec5ff6408d
Author: Lukas <76838159+wolflu05@users.noreply.github.com>
Date:   Thu Mar 14 13:03:30 2024 +0100

    handle report previewing errors (#6709)

commit 267ff67f05
Author: Oliver <oliver.henry.walters@gmail.com>
Date:   Thu Mar 14 15:11:27 2024 +1100

    [PUI] Updates (#6707)

    * Add button to edit part category

    * Fix useMemo()

    * Edit stock location

commit 610ea7b0b1
Author: Oliver <oliver.henry.walters@gmail.com>
Date:   Thu Mar 14 12:09:14 2024 +1100

    Report: Add date rendering (#6706)

    * Validate timezone in settings.py

    * Add helper functions for timezone information

    - Extract server timezone
    - Convert provided time to specified timezone

    * Add more unit tests

    * Remove debug print

    * Test fix

    * Add report helper tags

    - format_date
    - format_datetime
    - Update report templates
    - Unit tests

    * Add setting to control report errors

    - Only log errors to DB if setting is enabled

    * Update example report

    * Fixes for to_local_time

    * Update type hinting

    * Fix unit test typo

commit 7de87383b5
Author: Oliver <oliver.henry.walters@gmail.com>
Date:   Wed Mar 13 21:37:56 2024 +1100

    Update .env (#6700)

    Fix comment - no need to change Caddyfile in most cases

commit 2fef34852c
Author: Oliver <oliver.henry.walters@gmail.com>
Date:   Wed Mar 13 20:37:05 2024 +1100

    Unit tests for HOST settings (#6698)

    - CORS
    - ALLOWED_HOSTS

* Make ApiForms shrinkable, spoiler long group list

* Improve API Form Scroll Behavior

* Fix incorrect modal component

* Force load all modal fields to trigger loading animation

* Show loading overlay while fetching fields
2024-03-20 21:00:43 +11:00
Oliver
5de56f5cd8
[PUI] Parameter title (#6763)
* Change panel heading

"Parameters" -> "Part Parameters"

* Remove old code
2024-03-20 07:24:51 +00:00
Oliver
0b7bfdb4a4
Parameter table editing (#6760)
* table updates

- Store page data in tablestate
- Store record count data in  table state

* Expose "records" to table state

* edit or add parameters from ParametricPartTable

- Click on parameter cells to edit / add

* Mark fields as disabled

* Update table

- Display edit icon on hover

* Fix callback
2024-03-20 02:10:47 +00:00
Oliver
45ecebaf19
Fix docs: Remove INVENTREE_BASE_URL (#6757)
- Actual name is INVENTREE_SITE_URL
- Ref: https://github.com/inventree/InvenTree/discussions/6751
2024-03-20 10:51:06 +11:00
Lukas
838f6818c5
Fix PUI build workflow (#6754)
* Fix PUI build workflow

* Fix PUI build release workflow
2024-03-20 08:58:50 +11:00
Oliver
8ccc4fa012
Name details (#6752)
* Add "name" details entry to part detail page

* Add icon
2024-03-19 04:54:16 +00:00
Oliver
303cbb6864
[PUI] Tweaks (#6750)
* Remove extraneous header

* Update checkbox column in PartParameterTemplateTable

* Render boolean values for checkbox parameter columns

* Fix for table column names query

- Ensure it always fires
2024-03-19 02:41:53 +00:00
Oliver
6a7ea919e1
Add Latvian language support (#6749)
* Add Latvian language support

* Add empty frontend translation

* Add messages.d.ts
2024-03-19 12:25:15 +11:00
dependabot[bot]
7811ba5578
Bump django from 4.2.10 to 4.2.11 (#6745)
* Bump django from 4.2.10 to 4.2.11

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

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

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

* fix dep

* remove version id

---------

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-03-19 10:21:49 +11:00
Oliver
46810fdbff
Test result table (#6747)
* Display error message if "pass test" button fails

* Remove error var
2024-03-18 23:00:52 +00:00
Lavissa
0a67975f16
Add ability to test event triggers (#6746) 2024-03-18 22:09:47 +00:00
Oliver
ca8f0cee9f
Error handling fix (#6741)
* Handle case where error message is *not* a dict

* Encode as list
2024-03-18 21:28:04 +11:00
Oliver
ae6803095c
Typo fix (#6742)
- Referenfce -> reference
2024-03-18 06:41:55 +00:00
Oliver
664063583f
Test result table fix (#6740)
* Fix stock.js

- Remove incorrect icon code

* Add TEST_STATION_DATA setting

- Controls whether test station fields are added

* Add setting to control test station fields

- Default to off to preserve old behaviour
2024-03-18 05:36:00 +00:00
Oliver
82654eabdc
Site access tweaks (#6738)
* Adjust docker filter

- Run if settings.py changes

* Revert API version

* Adjust logic in settings.py

- Only exit if in main server thread

* Update qc_checks.yaml

* Add wildcard for CSRF_TRUSTED_ORIGINS in DEBUG mode

* Update wildcard

* Simplify settings.py logic
2024-03-18 15:27:56 +11:00
Oliver
bf9dd164e1
Fix CSS for long details field (#6739) 2024-03-18 14:02:39 +11:00
Oliver
23f0950a76
Site access updates (#6731)
* Throw error on invalid site access policy

- If ALLOWED_HOSTS is empty, exit
- If CSRF_TRUSTED_ORIGINS is empty, exit
- Closes https://github.com/inventree/InvenTree/issues/6730

* Set parameters for devcontainer

* Update documentation

* Ignore server exit in testing mode

* Add INVENTREE_SITE_URL to CI

* Further CI updates

* Update settings.py

* Unit test updates

* More unit test updates

* Bump API version

* Re-introduce checks in settings.py

- Allow more lenient behaviour in TESTING mode
2024-03-18 12:53:48 +11:00
Miklós Márton
0c661f4f83
Add additional test fields (#6149)
* Add new fields for the test results:
- Test start timestamp
- Test finish timestamp
- Test station name

* Add is_retest field to the stock_stockitemtestresult items

* Remove unnecessary print from migration

* Fix test result start/finished date rendering on UI

* Remove is_retest field

* Rerun pre-commit run --all-files to fix formatting

* Fix migrations

* Bump API version

* Fix API version again
2024-03-18 09:24:33 +11:00
Oliver
c82713328d
Worker thread fix (#6733)
* Do not enforce INVENTREE_LOG_LEVEL in dockerfile

- Already defaults to WARNING anyway
- Prevents override in config file

* Enable plugin loading in worker thread
2024-03-18 09:22:06 +11:00
dependabot[bot]
7905c556cf
Bump follow-redirects from 1.15.4 to 1.15.6 in /src/frontend (#6732)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-17 10:20:06 +11:00
Xander Luciano
1d9b39ab33
Code cleanup, convert promises to async/await. (#6726) 2024-03-17 09:21:52 +11:00
Oliver
06c7ebfc21
Update docker_install.md (#6723)
* Update docker_install.md

Add note about external access

* Update docker_install.md
2024-03-16 09:11:57 +11:00
Oliver
a00d5ab4b5
Disable BOM requirement (#6719)
* Add new setting STOCK_ENFORCE_BOM_INSTALLATION

- Defaults to True (legacy)

* Add logic to bypass BOM check

* Update CUI to reflect new logic

* Render InstalledItemsTable in PUI
2024-03-15 06:53:58 +00:00
Oliver
160d014e44
[PUI] Details Pages (#6718)
* Add "details" view to SupplierPart page

* Fix PartActions

* Add placeholder for actions

* Add "title" option to DetailsTable

* Add edit form to supplier part page

* Fix link to manufacturer part

* Add "details" view to ManufacturerPartDetail page

* Add edit for ManufacturerPart

* Create new manufacturer part from company table

* Tweak ActionIcon
2024-03-15 06:12:53 +00:00
Oliver
57a1a81e9b
Reporting: Build line label fix (#6717)
* Fix "BuildLine" label in PUI

- Point to "buildline" not "build"

* Prevent escape closing template ediror

* Update report docs

* Fix for format_number

- Prevent number from being represented as scientific notation
2024-03-15 01:24:17 +00:00
Lavissa
0196dd2f60
[PUI/Feature] Integrate Part "Default Location" into UX (#5972)
* Add default parts to location page

* Fix name strings

* Add Stock Transfer modal

* Add ApiForm Table field

* temp

* Add stock transfer form to part, stock item and location

* All stock operations for Item, Part, and Location added (except order new)

* Add default_location category traversal, and initial PO Line Item Receive form

* .

* Remove debug values

* Added PO line receive form

* Add functionality to PO receive extra fields

* .

* Forgot to bump API version

* Add Category Default to details panel

* Fix stockItem query count

* Fix reviewed issues

* .

* .

* .

* Prevent root category from checking parent for default location
2024-03-15 12:06:18 +11:00
Oliver
6abd33f060
Report enhancements (#6714)
* Add "enabled" filter to template table

* Cleanup

* API endpoints

- Add API endpoints for report snippet
- List endpoint
- Details endpoint

* Update serializers

- Add asset serializer
- Update

* Check for duplicate asset files

- Prevent upload of duplicate asset files
- Allow re-upload for same PK

* Duplicate checks for ReportSnippet

* Bump API version
2024-03-14 13:24:48 +00:00
Oliver
cbd94fc4b5
Fix for caddyfile (#6712)
- Add "authorization" to Access-Control-Allow-Headers
- CORS requests actually *work* now
2024-03-14 23:06:11 +11:00
Lukas
ec5ff6408d
handle report previewing errors (#6709) 2024-03-14 23:03:30 +11:00
Oliver
267ff67f05
[PUI] Updates (#6707)
* Add button to edit part category

* Fix useMemo()

* Edit stock location
2024-03-14 04:11:27 +00:00
Oliver
610ea7b0b1
Report: Add date rendering (#6706)
* Validate timezone in settings.py

* Add helper functions for timezone information

- Extract server timezone
- Convert provided time to specified timezone

* Add more unit tests

* Remove debug print

* Test fix

* Add report helper tags

- format_date
- format_datetime
- Update report templates
- Unit tests

* Add setting to control report errors

- Only log errors to DB if setting is enabled

* Update example report

* Fixes for to_local_time

* Update type hinting

* Fix unit test typo
2024-03-14 12:09:14 +11:00
Oliver
7de87383b5
Update .env (#6700)
Fix comment - no need to change Caddyfile in most cases
2024-03-13 10:37:56 +00:00
Oliver
2fef34852c
Unit tests for HOST settings (#6698)
- CORS
- ALLOWED_HOSTS
2024-03-13 09:37:05 +00:00
Xander Luciano
128fa95f71
Fix undefined tabValue (#6694) 2024-03-13 08:05:53 +00:00
Oliver
891c4fef6a
ParametricPartTable Updates (#6692)
* Add parameter units to ParametricPartTable

* Fix conversion aliases
2024-03-13 16:02:40 +11:00
Oliver
b33314659b
Cleanup settings.py (#6691)
- Remove INTERNAL_IPS array
- Used previously for debug_toolbar integration
2024-03-13 03:44:37 +00:00
Oliver
2f852c8aa2
Caddy fix (#6690)
* Caddyfile updates

- Provide CORS headers for /static/ and /media/

* Adjust config_template

- Make more open by default
2024-03-13 03:27:26 +00:00
Oliver
6389493c33
Test key fix (#6685)
* Fix for generateTestKey

- Check for zero-length key

* Ensure test template name would generate valid key

* Add unit test

* Improve generateTestKey method

- Allow for non-latin chars

* Update generateTestKey

- Improve check for valid char
2024-03-13 12:36:06 +11:00
Oliver
6033e87359
Auth endpoint updates (#6683)
- Allow CORS requests to /auth/
- Do not redirect
2024-03-12 22:11:17 +00:00
Oliver
011f19cf61
Allowed host fix (#6682)
* Update ALLOWED_HOSTS

- Simplify backup logic
- Remove schema prefix

* Fix typo
2024-03-12 22:06:47 +00:00
Oliver
e764833f1f
settings.py - fix default value (#6681)
- Use None instead of empty dict
2024-03-12 21:53:19 +00:00
Oliver
c185a267da
Handle more caching exception pathways (#6678) 2024-03-12 03:53:02 +00:00
Oliver
60f3e849e7
New Crowdin updates (#6659)
* updated translation base

* 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 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-03-12 03:33:07 +00:00
Oliver
2926d7596b
Fix typecasting in settings.py (#6676)
- Properly cast dict values
- Fixes https://github.com/inventree/InvenTree/issues/6668
2024-03-12 03:15:26 +00:00
Oliver
f5a42172ac
Cache exception handling (#6675)
* Improve cache loading for setting

- Handle generic exception
- Do not cache if importing data

* More generic exception handling

* Handle more cache exceptions
2024-03-12 03:09:28 +00:00
Oliver
8719dd7e1e
Feet and inches (#6674)
* Conversion: Handle feet and inches

- Support ' for feet
- Support " for inches

* Add unit test

* Doc updates
2024-03-12 03:04:10 +00:00
Oliver
6920efb456
Set ACCOUNT_EMAIL_SUBJECT_PREFIX (#6673)
- Copy value from EMAIL_SUBJECT_PREFIX
- Used for django-allauth
- Ref: https://github.com/inventree/InvenTree/discussions/6672
2024-03-12 02:37:20 +00:00
Oliver
a613a7b9fc
Use whitenoise for static file handling (#6662)
* Update config_template.yaml file

* Adjust ALLOWED_HOSTS behaviour

- Only add wildcard * in DEBUG mode
- Exit if ALLOWED_HOSTS not defined

* Tweak error message

* Use whitenoise for serving static files

- Any requests to /static/ are handled by whitenoise
- If an external reverse proxy (e.g. Caddy) is being used, this will not make a difference

* Update python package requirements

* Add extra log output

* Update ENV for CI checks

* Updates

- Thow error but do not exit
- Revert CI changes
2024-03-08 11:11:30 +11:00
Oliver
8aab19b578
Fix for RelatedModelField (#6657)
- Cache initial data in memo
- Fixes https://github.com/inventree/InvenTree/issues/6654
2024-03-07 23:13:57 +11:00
Oliver
d842942fa9
Fix comment in docker-compose.yml (#6656)
- Reference Caddy, not nginx
2024-03-07 14:40:09 +11:00