Commit Graph

270 Commits

Author SHA1 Message Date
Lukas
38ad83e401
Add stock location type documentation (#7652) 2024-07-15 07:50:45 +10:00
Matthew Campbell
32147e34ee
Fix small typo in docs (#7651) 2024-07-15 07:50:17 +10:00
Lukas
23a394d740
Fix machine request pickeling and settings (#6772)
* Fix machine request pickeling

* fix precommit

* fix: shared state between workers and main thread for machine registry

* remove last usage of legacy PUI form framework to fix machine edit/delete modal

* reset cache before initialization

* update documentation

* fix: invalidating cache

* implement machine registry hash to check if a reload is required

* trigger: ci

* fix: request bug

* fix: test

* trigger: ci

* add clear errors and improve restart hook

* auto initialize not initialized machines when changing active state

* fix: tests
2024-07-13 00:22:40 +10:00
Oliver
767b76314e
Revision Improvements (#7585)
* Bump djangorestframework from 3.14.0 to 3.15.2 in /src/backend

Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.14.0 to 3.15.2.
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](https://github.com/encode/django-rest-framework/compare/3.14.0...3.15.2)

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

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

* fix req

* fix deps again

* patch serializer

* bump api version

* Fix "min_value" for DRF decimal fields

* Add default serializer values for 'IPN' and 'revision'

* Add specific serializer for email field

* Fix API version

* Add 'revision_of' field to Part model

* Add validation checks for new revision_of field

* Update migration

* Add unit test for 'revision' rules

* Add API filters for revision control

* Add table filters for PUI

* Add "revision_of" field to PUI form

* Update part forms for PUI

* Render part revision selection dropdown in PUI

* Prevent refetch on focus

* Ensure select renders above other items

* Disable searching

* Cleanup <PartDetail/>

* UI tweak

* Add setting to control revisions for assemblies

* Hide revision selection drop-down if revisions are not enabled

* Query updates

* Validate entire BOM table from PUI

* Sort revisions

* Fix requirements files

* Fix api_version.py

* Reintroduce previous check for IPN / revision uniqueness

* Set default value for refetchOnWindowFocus (false)

* Revert serializer change

* Further CI fixes

* Further unit test updates

* Fix defaults for query client

* Add docs

* Add link to "revision_of" in CUI

* Add playwright test for revisions

* Ignore notification errors for playwright

---------

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-12 14:37:32 +10:00
Oliver
6650f3e90c
[Feature] Build allocation export (#7611)
* CUI: Add "allocated stock" panel to build order page

* Implement CUI table for build order allocations

* Add "bulk delete" option for build order allocations

* Add row actions

* Add extra fields for data export

* Add build allocation table in PUI

* Add 'batch' column

* Bump API version

* Add playwright tests

* Fix missing renderer

* Update build docs

* Update playwright tests

* Update playwright tests
2024-07-11 14:33:53 +10:00
dependabot[bot]
cd1d4a4be0
Bump certifi from 2024.2.2 to 2024.7.4 in /docs (#7596)
* Bump certifi from 2024.2.2 to 2024.7.4 in /docs

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 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-07-09 21:42:39 +10:00
Matthias Mair
11e70c9ba0
bump urllib3 to 2.2.2 (#7578)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-07-08 08:14:57 +10:00
Oliver
8309eb628f
[Feature] Part lock (#7527)
* Add "locked" field to Part model

- Default = false

* Add "locked" field to PartSerializer

- Allow filtering in API

* Filter CUI tables by "locked" status

* Add "locked" filter to part table

* Update PUI table

* PUI: Update display of part details  page

* Add "locked" element

* Ensmallen the gap

* Edit "locked" field in CUI

* Check BomItem before editing or deleting

* Prevent bulk delete of BOM items

* Check part lock for PartParameter model

* Prevent deletion of a locked part

* Add option to prevent build order creation for unlocked part

* Bump API version

* Hide actions from BOM table if part is locked

* Fix for boolean form field

* Update <PartParameterTable>

* Add unit test for 'BUILDORDER_REQUIRE_LOCKED_PART' setting

* Add unit test for part deletion

* add bom item test

* unit test for part parameter

* Update playwright tests

* Update docs

* Remove defunct setting

* Update playwright tests
2024-07-07 11:35:30 +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
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
Matthias Mair
73c10e219c
style fixes (#7478) 2024-06-20 07:45:44 +10:00
Michael
12e76333a2
Added details on stock ownership control (#7474)
* Add documentation for stock ownership

* Add documentation for stock ownership

* tweaks to format
2024-06-19 16:16:04 +10:00
Matthias Mair
7b179aaf95
[Docs] Add more info on branching (#7407)
* Add some docs regarding branching
https://github.com/inventree/org/issues/45

* remove refs to release candiate branches

* Update docs/docs/develop/contributing.md

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

---------

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
2024-06-05 07:31:29 +10:00
Oliver
e83feb9414
Currency setting (#7390)
* Add new global setting for currency options

- Moving away from external configuration
- Refactor currency support code into new file

* Refactoring

- Move functions into currency.py

* Limit choices for default currency

* Improve validation

* Adds data migration for existing currency selection

* Docs updates

* Remove currency config from external settings

* bump api version

* Add debug message

* Add unit tests

* Fix after_change_currency func

* Fix after_change_currency func

* Revert change to after_chance_currency

* Revert other change
2024-06-03 12:53:30 +10:00
Oliver
cdac7465b2
Cache updates (#7388)
* Add redis container to development setup

* Improve configurability of global cache:

- Push configuration into separate file

* Settings cache default depends on global cache configuration

* Update docker compose file

* Remove debug flag

* Allow caching for registry checks

* Cleanup docstring

* Adjust defautl behaviour

* Update docs for caching

* Adjust default docker compose file

* Update docs for devcontainer

* Cleanup config template file

* Update docker docs

* Update cache behaviour
2024-06-02 21:43:31 +10:00
Oliver
798c0ed322
PO shipped complete (#7367)
* Add new setting to bypass "shipped" status

* Bypass "shipped" status optionally

* Update setting description string

* Update unit tests

* Refactor location of status_codes

* Link source code into docs

* Add stock status codes

* And the build order too

* Fix import
2024-05-30 12:44:57 +10:00
Oliver
b7b666b7f0
Include "config template" in docs (#7355)
- Extract data from file
- Add in "collapse" section
- Cleanup template file
2024-05-27 22:25:23 +10:00
Oliver
b402836dc4
Label printing bug fixes (#7329)
* Hide printing actions button for top level stock location

* Fix typo

* Add another check for null

* Remove debug statement

* Prevent display of multiple form-error notifications

* Fix pickling for print offloading

* Reset selected plugin

* Exclude the entire 'context' object when pickling a printing job
2024-05-27 09:12:29 +00:00
Oliver
797a0c10df
Docs code links (#7342)
* Update docs

- Add note about permission denied error

* Add macro for generating link to github code

* Implement similar feature for source directory links

* Adds helper function for link checking

* Allow for specification of "raw" file links

* Remove debug statement

* Generate list of available invoke tasks
2024-05-26 22:09:08 +10:00
Oliver
5f9348f56d
Update docs (#7339)
- Add note about permission denied error
2024-05-26 21:43:12 +10:00
Oliver
aa39582d89
Report printing refactor (#7074)
* Adds a new "generic" ReportTemplate model

* expose API endpoints

* Update model / migrations / serializer

* Add new mixin class to existing database models

* - Add detail view for report template
- Revert filters field behaviour

* Filter report list by provided item IDs

- Greatly simplify filtering logic compared to existing implemetation
- Expose to API schema

* Create data migration for converting *old* report templates

* Ignore internal reports for data migration

* Add report mixin to StockLocation model

* Provide model choices in admin interface

* Offload context data generation to the model classes

* Remove old report template models

* Refactor JS code in CUI

* Fix for API filtering

* Add data migration to delete old models

* Remove dead URL

* Updates

* Construct sample report templates on app start

* Bump API version

* Typo fix

* Fix incorrect context calls

* Add new LabelTemplate model

- ReportTemplate and LabelTemplate share common base
- Refactor previous migration

* Expose to admin interface

* Add in extra context from existing label models

* Add migration to create LabelTemplate instances from existing labels

* Add API endpoints for listing and updating LabelTemplate objects

* Adjust 'upload_to' path

* Refactor label printing

* Move default label templates

* Update API endpoints

* Update migrations

* Handle LookupError in migration

* Redirect the "label" API endpoint

* Add new model for handling result of template printing

* Refactor LabelPrinting mixin

* Unlink "labels" app entirely

* Fix typo

* Record 'plugin' used to generate a particular output

* Fix imports

* Generate label print response

- Still not good yet

* Refactoring label printing in CUI

* add "items" count to TemplateOutput model

* Fix for InvenTreeLabelSheetPlugin

* Remove old "label" app

* Make request object optional

* Fix filename generation

* Add help text for "model_type"

* Simplify TemplateTable

* Tweak TemplateTable

* Get template editor to display template data again

* Stringify template name

- Important, otherwise you get a TypeError instead of TemplateDoesNotExist

* Add hooks to reset plugin state

* fix context for StockLocation model

* Tweak log messages

* Fix incorrect serializer

* Cleanup TemplateTable

* Fix broken import

* Filter by target model type

* Remove manual file operations

* Update old migrations

- Remove references to functions that no longer exist

* Refactor asset / snippet uploading

* Update comments

* Retain original filename when editing templatese

* Cleanup

* Refactor model type filter to use new hook

* Add placeholder actions for printing labels and reports

* Improve hookiness

* Add new ReportOutput class

* Report printing works from PUI now!

* More inspired filename pattern for generated reports

* Fix template preview window

- Use new "output" response field across the board

* Remove outdated task

* Update data migration to use raw SQL

- If the 'labels' app is no longer available, this will fail
- So, use raw SQL instead

* Add more API endpoint defs

* Adds placeholder API endpoint for label printing

* Expose plugin field to the printing endpoint

* Adds plugin model type

* Hook to print labels

* Refactor action dropdown items

* Refactor report printing for CUI

* Refactor label print for CUI

- Still needs to handle custom printing options for plugin

* Fix migration

* Update ModelType dict

* playwright test fix

* Unit test fixes

* Fix model ruleset associations

* Fix for report.js

* Add support for "dynamic" fields in metadata.py

* Add in custom fields based on plugin

* Refactoring

* Reset plugin on form close

* Set custom timeout values

* Update migration

- Not atomic

* Cleanup

* Implement more printing actions

* Reduce timeout

* Unit test updates

* Fix part serializers

* Label printing works in CUI again

* js linting

* Update <ActionDropdown>

* Fix for label printing API endpoint

* Fix filterselectdrawer

* Improve button rendering

* Allow printing from StockLocationTable

* Add aria-labels to modal form fields

* Add test for printing stock item labels from table

* Add test for report printing

* Add unit testing for report template editing / preview

* Message refactor

* Refactor InvenTreeReportMixin class

* Update playwright test

* Update 'verbose_name' for a number of models

* Additional admin filtering

* Playwright test updates

* Run checks against new python lib branch

(temporary, will be reverted)

* remove old app reference

* fix testing ref

* fix app init

* remove old tests

* Revert custom target branch

* Expose label and report output objects to API

* refactor

* fix a few tests

* factor plugin_ref out

* fix options testing

* Update table field header

* re-enable full options testing

* fix missing plugin matching

* disable call assert

* Add custom related field for PluginConfig

- Uses 'key' rather than 'pk'
- Revert label print plugin to use slug

* Add support for custom pk field in metadata

* switch to labels for testing

* re-align report testing code

* disable version check

* fix url

* Implement lazy loading

* Allow blank plugin for printing

- Uses the builtin label printer if not specified

* Add printing actions for StockItem

* Fix for metadata helper

* Use key instead of pk in printing actions

* Support non-standard pk values in RelatedModelField

* pass context data to report serializers

* disable template / item discovery

* fix call

* Tweak unit test

* Run python checks against specific branch

* Add task for running docs server

- Option to compile schema as part of task

* Custom branch no longer needed

* Starting on documentation updates

* fix tests for reports

* fix label testing

* Update template context variables

* Refactor report context documentation

* Documentation cleanup

* Docs cleanup

* Include sample report files

* Fix links

* Link cleanup

* Integrate plugin example code into docs

* Code cleanup

* Fix type annotation

* Revert deleted variable

* remove templatetype

* remove unused imports

* extend context testing

* test if plg can print

* re-enable version check

* Update unit tests

* Fix test

* Adjust unit test

* Add debug statement to test

* Fix unit test

- Labels get printed against LabelTemplate items, duh

* Unit test update

* Unit test updates

* Test update

* Patch fix for <PartColumn> component

* Fix ReportSerialierBase class

- Re-initialize field options if not already set

* Fix unit test for sqlite

* Fix kwargs for non-blocking label printing

* Update playwright tests

* Tweak unit test

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-05-22 10:17:01 +10:00
dependabot[bot]
acdf7f5ec0
Bump mkdocstrings[python] from 0.25.0 to 0.25.1 in /docs (#7212)
* Bump mkdocstrings[python] from 0.25.0 to 0.25.1 in /docs

Bumps [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) from 0.25.0 to 0.25.1.
- [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.25.0...0.25.1)

---
updated-dependencies:
- dependency-name: mkdocstrings[python]
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* fix req

* bump rest of docs reqs

* group dependabot settings

---------

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-05-22 09:29:51 +10:00
Oliver
c1def12203
Add documentation on 'validate_model_deletion' (#7280)
* Add documentation on 'validate_model_deletion'

* Update code inclusion

* Set type annotation

* docstring updates

* Cleanup

* Hide summary

* Remove duplicated code
2024-05-21 18:50:56 +10:00
Oliver
e93d9c4a74
Batch code generation (#7000)
* Refactor framework for generating batch codes

- Provide additional kwargs to plugin
- Move into new file
- Error handling

* Implement API endpoint for generating a new batch code

* Fixes

* Refactor into stock.generators

* Fix API endpoint

* Pass time context through to plugins

* Generate batch code when receiving items

* Create useGenerator hook

- Build up a dataset and query server whenever it changes
- Look for result in response data
- For now, just used for generating batch codes
- may be used for more in the future

* Refactor PurchaseOrderForms to use new generator hook

* Refactor StockForms implementation

* Remove dead code

* add OAS diff

* fix ref

* fix ref again

* wrong branch, sorry

* Update src/frontend/src/hooks/UseGenerator.tsx

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

* Bump API version

* Do not override batch code if already generated

* Add serial number generator

- Move to /generate/ API endpoint
- Move batch code generator too

* Update PUI endpoints

* Add debouncing to useGenerator hook

* Refactor useGenerator func

* Add serial number generator to stock form

* Add batch code genereator to build order form

* Update buildfields

* Use build batch code when creating new output

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
2024-05-20 23:56:45 +10:00
Philipp Fruck
442bb73262
Docs: Update plugins and compose (#7263)
* docs: Update docker compose dev setup

* docs: Fix example plugin date

Date must be iso formatted, otherwise exception is raised

* docs: Update plugin paths to new folder structure

* docs: fix typo, remove temporary containers afterwards
2024-05-20 14:02:27 +10:00
Oliver
6a9d833251
Nginx example (#7207)
* Add sample nginx config file

- Taken from 0.13.x branch

* Add alternative setup for nginx

* Add brief note in the docs
2024-05-13 14:15:45 +10:00
dependabot[bot]
3d444b2bb2
Bump mkdocs-material from 9.5.19 to 9.5.21 in /docs (#7177)
* Bump mkdocs-material from 9.5.19 to 9.5.21 in /docs

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.19 to 9.5.21.
- [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.19...9.5.21)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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-05-09 07:04:15 +10:00
dependabot[bot]
c8f8f7d6c2
Bump jinja2 from 3.1.3 to 3.1.4 in /docs (#7173)
* Bump jinja2 from 3.1.3 to 3.1.4 in /docs

Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

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

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

* fix ref

---------

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-05-07 23:57:26 +10:00
Oliver
e4658eb899
Cookie mode (#7162)
* Add ability to set cookie mode

* Update docs

* Better validation of cookie mode

* Docs updates

* Update error msg

* Update config.md

Change default samesite mode to None

* Update settings.py

Default mode is None

* Update config_template.yaml

Change default value in config file template
2024-05-05 17:53:21 +10:00
dependabot[bot]
e4c227f876
Bump mkdocstrings[python] from 0.24.3 to 0.25.0 in /docs (#7130)
* Bump mkdocstrings[python] from 0.24.3 to 0.25.0 in /docs

Bumps [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) from 0.24.3 to 0.25.0.
- [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.24.3...0.25.0)

---
updated-dependencies:
- dependency-name: mkdocstrings[python]
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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-04-29 22:54:40 +10:00
Oliver
477da1fa65
Session cookie fix (#7133)
* Make session cookie insecure by default

* Update docs
2024-04-29 10:49:35 +00:00
Matthias Mair
83191d3fbf
Improve reproduciblity of image (#7120)
* hard-pin doc requirements

* update docs and commands

* hard pin container requirements

* check hashes in image build

* remove seperate uv install (is in base_requirements)

* containers already ships 3.11 - adjust packaging

* move build deps to general ci requirements

* install yarn using native tools

Closes https://github.com/inventree/InvenTree/security/code-scanning/95
Closes https://github.com/inventree/InvenTree/security/code-scanning/96

* merge install steps

* adapt install command args to be similar

* adapt docs to suggest safer install arg

* fix install path

* update dependabot settings
2024-04-29 11:04:45 +10:00
dependabot[bot]
47c797db88
Bump mkdocs from 1.5.3 to 1.6.0 in /docs (#7080)
Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.5.3 to 1.6.0.
- [Release notes](https://github.com/mkdocs/mkdocs/releases)
- [Commits](https://github.com/mkdocs/mkdocs/compare/1.5.3...1.6.0)

---
updated-dependencies:
- dependency-name: mkdocs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-25 10:49:29 +10:00
Matthias Mair
37956db5fc
Add PUI info banner to CUI (#7097)
* add intrestials to CUI

* Add intrestial to report settings

* add option to docs

* rename to banner
Fixes #6554

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>

* change name

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-04-23 21:05:48 +10:00
Matthias Mair
938c724395
Pin hashes in requirements (#7081)
* use global pin for requests

* unify on yaml for workflo files

* format workflow files

* pin action versions

* fix pinned version

* use system venv

* switch args

* remove uv for now and add setting for pyyaml

* use requirements file

* also switch on docker flow

* generate hashes

* added hashes to reqs

* add hashes for CI too

* add hash checking

* require hashes everywhere possible

* require hashes where possible in docker
2024-04-23 17:15:52 +10:00
Oliver
8f2ef39282
Remove coveralls integration (#7099) 2024-04-23 08:42:31 +10:00
Oliver
3f80a45cb5
Backup enhancements (#7077)
* Update backup docs

* Add note on advanced usage

* Add extra options for backup and restore

* Update restore task
2024-04-22 23:01:10 +10:00
Oliver
2fe0eefa8f
Adds "active" field for Company model (#7024)
* Add "active" field to Company model

* Expose 'active' parameter to API

* Fix default value

* Add 'active' column to PUI

* Update PUI table

* Update company detail pages

* Update API filters for SupplierPart and ManufacturerPart

* Bump API version

* Update order forms

* Add edit action to SalesOrderDetail page

* Enable editing of ReturnOrder

* Typo fix

* Adds explicit "active" field to SupplierPart model

* More updates

- Add "inactive" badge to SupplierPart page
- Update SupplierPartTable
- Update backend API fields

* Update ReturnOrderTable

- Also some refactoring

* Impove usePurchaseOrderLineItemFields hook

* Cleanup

* Implement duplicate action for SupplierPart

* Fix for ApiForm

- Only override initialValues for specified fields

* Allow edit and duplicate of StockItem

* Fix for ApiForm

- Default values were overriding initial data

* Add duplicate part option

* Cleanup ApiForm

- Cache props.fields

* Fix unused import

* More fixes

* Add unit tests

* Allow ordering company by 'active' status

* Update docs

* Merge migrations

* Fix for serializers.py

* Force new form value

* Remove debug call

* Further unit test fixes

* Update default CSRF_TRUSTED_ORIGINS values

* Reduce debug output
2024-04-20 23:18:25 +10:00
Oliver
76e1174986
Update docker_install.md (#7062)
Use raw file links
2024-04-18 09:07:34 +10:00
Emmanuel Ferdman
d24219fec3
Update broken links (#7019)
* Update broken links

* Update broken links
2024-04-17 19:42:59 +10:00
Oliver
d08a6ad18e
Fix links in docs (#6954)
* Fix links

* Fix another link
2024-04-04 23:54:44 +11:00
Matthias Mair
85e672831b
Some small style fixes (#6916)
* fix dockerfile syntax

* remove unused import

* Merge unnecessary if statements

* fix PUI package name

* remove unused vars

* Remove unneeded pass

* merge if to reduce likelyhood of future errors

* add ignroe script to secure against shell scripts

* fix possible collisions

* export strings

* fix types
2024-04-03 19:26:03 +11:00
Oliver
6be2ede5e8
Fix unit tests (#6932)
* Fix unit test

* Fix script pathing

* Fix pathing in version_check.py

* Fix mkdocs.yml
2024-04-03 06:50:13 +00:00
Matthias Mair
0bace3f3af
Code structure refactor (#5582)
* moved docker files to /contrib/container

* changed code owners to make more precise

* updated CI to use new subdirs

* added manual trigger for testing

* moved ci files

* moved assets into subdir

* moved deploy template file to contrib

* moved django files to src/backend

* updated paths in scripts etc

* updated reqs path

* fixed version file path

* fixed flake8 path

* fixed path to node ressources

* fixed task paths

* added dep path for node

* removed unused yarn lockfile

* removed unused ci script

* updated internal backend paths for tasks

* updated translation stats path

* fixed source path for coverage

* fixed main commit repo path

* fit in changes from testing

* gather packager improvements (#149)

* Matmair/issue5578 (#143)

* moved docker files to /contrib/container

* changed code owners to make more precise

* updated CI to use new subdirs

* added manual trigger for testing

* moved ci files

* moved assets into subdir

* moved deploy template file to contrib

* moved django files to src/backend

* updated paths in scripts etc

* updated reqs path

* fixed version file path

* fixed flake8 path

* fixed path to node ressources

* fixed task paths

* added dep path for node

* removed unused yarn lockfile

* removed unused ci script

* updated internal backend paths for tasks

* updated translation stats path

* fixed source path for coverage

* fixed main commit repo path

* fix docker path

* use project dir

* move project dir command

* fixed docker paths

* another fix?

* seperate tasks out

* remove tasks

* some debugging

* ci: add .deepsource.toml

* Update .deepsource.toml

* also ignore migrations

* more debugging

* fix path issues

* remove debug script

* fix style

* change locale path

* Fixed paths for requirements

* Added dummy requirements to fool packager

* fixed exec path

* remove deepsource

---------

Co-authored-by: deepsource-io[bot] <42547082+deepsource-io[bot]@users.noreply.github.com>

* Added docs for file structure

* Fixed style errors

* updated deepsource paths

* fix deepsource paths

* fixed reqs

* merge fixes

* move newly added dirs too

* fix reqs files

* another dep fix

* merge upstream/master

* revert removal of tags

* merge upstream

* enabled detection of old config files

* adapt coverage src

* also detect and support old location for plugins.txt

* style fix

* fix ~/init.sh location

* fix requirements path

* fix config to current master

* move new folders

* fix import order

* fix paths for qc_check

* fix docs build

* fix fix path

* set docker project dir

* just use a cd

* set image path?

* set file correct

* fix copy path

* fix tasks dir

* fix init path

* fix copy path

* set prject dir

* fix paths

* remove old prod files

* fix dev env path

* set docker file

* Fix devcontainer docker compose file

* fix login attempt values

* fix init.sh path

* Fix pathing for Docker

* Docker build fix

- Set INVENTREE_BACKEND_DIR separately

* Update init.sh

* Fix path

* Update requirements.txt

* merge

* fix rq merge

* fix docker compose usage

---------

Co-authored-by: deepsource-io[bot] <42547082+deepsource-io[bot]@users.noreply.github.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-04-03 12:16:59 +11:00
Matthias Mair
1553c43080
Document security measures (#6812)
* add security commitment

* fix badge path

* set token permissions
see https://github.com/inventree/InvenTree/security/code-scanning/48

* add more chapters

* break up flow text

* spellchecking

* Revert "set token permissions"

This reverts commit 6deb33000f.

* Add pattern for social media providers restrictive APIs
2024-03-25 09:12:49 +11:00
Oliver
a18a7af881
Allauth settings update (#6830)
* Allauth settings updates:

- Ref: https://docs.allauth.org/en/latest/account/rate_limits.html
- Auto-detect protocol if SITE_URL is provided
- Update rate limit setting definition
- Removed "deprecation warning" in logs

* Update docs

* Adjust default value for login attempt rate limit

Ref: https://docs.allauth.org/en/latest/account/rate_limits.html#rate-limits

* Fix format
2024-03-24 16:18:53 +11:00
dependabot[bot]
f35e470335
Update mkdocs-macros-plugin requirement in /docs (#6774)
Updates the requirements on [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin) to permit the latest version.
- [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/v0.7.0...v1.0.5)

---
updated-dependencies:
- dependency-name: mkdocs-macros-plugin
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 10:50:17 +11:00
Oliver
309263bf03
Tz docs (#6771)
* Add docs about timezone

* Add note on INVENTREE_AUTO_UPDATE

* Enable auto-update in config template

* Revert change to config_template.yaml
2024-03-21 09:56:56 +11: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
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