* 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
* 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
* 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
* 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>
* 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>
* 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
* 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>
* 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
* 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
* 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
* 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
* 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
* 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
* In debug mode, allow CORS from localhost origins
- Should allow more reliable connection from the vite frontend dev server
* Allow regex pattern to be specified externally
* Update docs
* Added first POC for label editor
* Added preview item selection
* Split code
* Fix import
* Use liquid lang and added custom tooltips
* Auto load first item for preview and add BOM part assembly filter
* Make the save&reload action more obvious
* Make save optional and use server stored template
* Fix icons and inherit model url
* Add label/report extra fields to serializer and default templates
* Bump api version to v176
* Remove generic and pass template to editor
* Added error overlay
* Moved default tempaltes in default folder
* Only show detail drawer back button if necessary
* Rename action dropdown disabled to hidden and add loading disabled to template editor
* Fix types
* Add icons to editor/preview tabs
* Add draggable split pane and make editors use full height
* Add SplitButton component
* add code editor tag description
* fix related model field if empty string
* remove debug console.log
* move code editor/pdf preview into their own folder
* Update api_version.py
* add support for multiple editors
* fix template editor error handleing while loading/saving code
* add documentation for the template editor
* remove docker-sqlite file
- Do not want to encourage use of sqlite
* Add Caddyfile
* Add default site URL to .env
- Matches Caddyfile
* Cleanup / simplify .env file
* Remove dev nginx conf file
* Further cleanup of .env file
* Update docker-compose.yml
- Use caddy image instead of nginx as proxy
* Set max body size
* gunicorn: enable external logging
* Update file structure
* Cleanup docker-compose file
* Update docker/docker-compose.yml
Co-authored-by: Matthias Mair <code@mjmair.com>
* Update docker/Caddyfile
Co-authored-by: Matthias Mair <code@mjmair.com>
* Fix for postgresql packages
- Need postgresql13-client to be installed, it contains pg_dump
- Without this, backup / restore *does not work*
* Create static_i18n dir if it does not exist
* Reduce output from collectstatic
* Revert gunicorn logging
- Want to see the logs in docker
* Fix trailing slash
Ref: https://github.com/inventree/InvenTree/pull/6551#issuecomment-1962423765
* tasks.py - pass 'nouv' option through
* Update package requirements:
- Allow installation of rapidfuzz without building
* Install uv as part of docker image
* Add environment variable to control downstream URL
* Do not use uv package manager by default
- Currently does not work "correctly" - ignores installed packages
- Requires further work to run reliably
* Fix docker-compose file
- Do not build locally
* Cleanup gunicorn file
- Remove unused lien
* Cleanup docker-compose.yml
- Simpler volume management
* Update Caddyfile
Add newline
* Update requirements.txt
Add newline
* Update tasks.py
Add missing blank line
* Simplify Caddyfile
* Adds option for customizing web port
* cleanup docker-compose.yml
- Better mapping of caddy data
- Cleaner volume setup
* Add django version template
- Ensure all docs links point to the current django version we are using
* docs: cleanup intro.md
* Cleanup serving_files.md
* Cleanup config.md
* docker install docs updates
* Enable code block copying
* Fix include file
* Fix link
* Update docker install docs
* Update docker.md
* Add info about demo dataset
* Tweak heading
* Update docs link checks
* Fix workflow
* Another fix
* More ignore pattearns
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* [FR] Add config option to fully disable installing plugins
Fixes#6531
* also restrict uninstalling
* Added test
* diff cleanup
* extend api to show if install was disabled
* PUI disable install buttons
* CUI disable install button if not available
* add config option
* Rephrase