Commit Graph

245 Commits

Author SHA1 Message Date
Oliver
5dd6f18495
Part units (#4854)
* Add validation to part units field

* Add "pack_units" field to the SupplierPart model

* Migrate old units to new units, and remove old field

* Table fix

* Fixture fix

* Update migration

* Improve "hook" for loading custom unit database

* Display part units column in part table

- Also allow ordering by part units
- Allow filtering to show parts which have defined units

* Adds data migration for converting units to valid values

* Add "pack_units_native" field to company.SupplierPart model

* Clean pack units when saving a SupplierPart

- Convert to native part units
- Handle empty units value
- Add unit tests

* Add background function to rebuild supplier parts when a part is saved

- Required to ensure that the "pack_size_native" is up to date

* Template updates

* Sort by native units first

* Bump API version

* Rename "pack_units" to "pack_quantity"

* Update migration file

- Allow reverse migration

* Fix for currency migration

- Handle case where no currencies are provided
- Handle case where base currency is not in provided options

* Adds unit test for data migration

* Add unit test for part.units data migration

- Check that units fields are updated correctly

* Add some extra "default units"

- each / piece
- dozen / hundred / thousand
- Add unit testing also

* Update references to "pack_size"

- Replace with "pack_quantity" or "pack_quantity_native" as appropriate

* Improvements based on unit testing

* catch error

* Docs updates

* Fixes for pricing tests

* Update unit tests for part migrations · 1b6b6d9d

* Bug fix for conversion code

* javascript updates

* JS formatting fix
2023-05-26 16:57:23 +10:00
Oliver
433ea4d0de
Documentation Improvements (#4894)
* Improvements for version banner

- Display at the bottom of the page
- Simplify text

* Use mkdocs version provider

* use 'navigation.instant'

* Support modern mkdocs features

- Much better navigation and improved features

* Content changes

* Add code to find previous versions

* Remove modern python syntax

* display output codes

* Hide version banner

* Extra debug message

* update terminology.md
2023-05-25 22:42:16 +10:00
Oliver
f76059b2b4
Reorganize FAQ section (#4872) 2023-05-22 20:02:42 +10:00
Oliver
59cbf17b02
Faq docker (#4871)
* Remove stat context variables

* Revert "Remove stat context variables"

This reverts commit 0989c308d0.

* Allow longer timeout for image download tests

* 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

* docs: Update FAQ section

- Add note regarding permissions for docker directories

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-22 17:17:59 +10:00
Oliver
9e77b9fc56
Parameter filtering (#4823)
* adds new field 'parameter type' to PartParameterTemplate model

* Move part parameter settings onto their own page

* Add "choices" and "regex" template types

* Adds validation for PartParameter based on template type

* javascript cleanup

* Fix for serializers.py

* Add unit testing for parameter validation

* Add filters

* Rename "type" field to "param_type"

- Should have seen that one coming

* Coerce 'boolean' value to True/False

* table update

* js linting

* Add requirement for "pint" package

* Add validator for physical unit types

- Revert a previous migration which adds "parameter type" and "validator" fields
- These will get implemented later, too much scope creep for this PR
- Add unit test for validation of "units" field

* Update PartParameter model

- Add data_numeric field (will be used later)
- Add MinLengthValidator to data field

* Run validation for part parameter data

- Ensure it can be converted to internal units

* Update admin interface to display partparameter values inline for a part

* Adds validation of part parameter data value

- Also converts to base units, and stores as "numeric" value
- Display "numeric" value in tables
- Create new file conversion.py for data conversion

* Update unit tests and fix some bugs

* Update docstring

* Add units to parameter columns in parameteric part table

* Allow part list to be ordered by a particular parameter value

- Annotate queryset with new "order_by_parameter" method
- Skeleton method for future work

* Bump API version

* Adds unit testing for sorting parts by parameter value

* Update historical data migrations

- Turns out RunPython.noop is a thing?

* Cache the unit registry

- Creating the unit registry takes a significant amount of time
- Construct when first called, and then cache for subsequent hits
- Massive improvement in performance

* Throw error on empty values when converting between units

* Data migration for converting existing part parameter values

* Handle more error cases

* Show parameteric table on top-level part page too

* Unit test for data migration

* Update credits in docs

* Improved error checking

* WIP docs updates

* Fix parameteric table filtering

* remove zoom property

* Fix for import path

* Update parameter docs

* Run background task to rebuild parameters when template changes

* Make "data_numeric" field nullable

- Defaulting to zero is not appropriate, as the actual value may be zero
- Sorting still seems to work just fine

* Fixes for unit test

* More unit test fixes

* Further fixes for unit tests

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2023-05-19 13:24:55 +10:00
Oliver
d5caa98936
Report helper docs (#4845)
* Add docs for more helper functions

* add docs about dot notation lookup
2023-05-18 01:04:19 +10:00
Oliver
b732b4ceb5
Add docs for more helper functions (#4844) 2023-05-18 00:07:19 +10:00
Oliver
5c7303fd53
Update mkdocs.yml (#4828)
Fix spelling error in docs
2023-05-16 22:56:07 +10:00
Oliver
397419f365
Build consume stock (#4817)
* Adds "consumed_by" field to the StockItem model.

- Points to a BuildOrder instance which "consumed" this stock
- Marks item as unavailable
- Allows filtering against build order

* Allow API filtering

* Adds table of "consumed stock items" to build order page

* Update stock table to show "consumed by" stock status

* Add "consumed_by" link to stock item detail

* Optionally add 'buildorder' details to installStockItem method

* Update methodology for completing a build item

- Instead of deleting stock, mark as "consumed by"

* Fix history entry for splitting stock

* Bug fix

* track "consumed_by" field for tracked items also

* Update build docs

* Update allocation documentation

* Update terminology.md

* Unit test updates

* Fix conflicting migrations

* revert change
2023-05-16 21:25:02 +10:00
Matthias Mair
1b94a271b6
Add faq entry for https://github.com/inventree/InvenTree/issues/4802#issuecomment-1546767130 (#4812) 2023-05-15 07:47:36 +10:00
Oliver
b2ceac2c4a
[Feature] Scrap Build Outputs (#4800)
* Update docs for status codes

* Adds API endpoint for scrapping individual build outputs

* Support 'buildorder' reference in stock tracking history

* Add page for build output documentation

* Build docs

* Add example build order process to docs

* remove debug statement

* JS lint cleanup

* Add migration file for stock status

* Add unit tests for build output scrapping

* Increment API version

* bug fix
2023-05-13 22:19:35 +10:00
miggland
634daa2161
Add flag to API which allows using pack size (#4741)
* Add flag to API which allows using pack size when adding stock items manually

* Check for use_pack_size before pop

* Add test data and tests

* Improve data handling

* Add form field for use_pack_size when adding stock

* Add description of pack size to docs

* Don't check for supplier part if it is None

* Move form field to after supplier part, for better logic

* Fix wrong function

* Fix tests

* Adjust purchase price when using pack size

* Adjust help text for purchase price

* Adjust help text for purchase price some more

* Fix tests for purchase price of added stock

* Update api_version.py
2023-05-13 21:32:25 +10:00
Lukas
17057f4266
Docs/devcontainer (#4787)
* Added empty problemMatchers to prevent vscode from asking

* Added first draft for devcontainer docs

* Add 3rd space to tips

* Fix wording

* Add 4rd space to tips

* Refphased intro text

* Fixed spelling mistakes and added note

* Added dynamic variables for devcontainer

* Added missing containerWorkspaceFolder vars other devcontainer files

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

* Added note for inventree core intelicense for plugin devs

* Added where is dev data stored question to faq

* Update docs/docs/start/devcontainer.md

* update toc

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2023-05-12 17:13:48 +10:00
Oliver
5886415aa7
Extend docs for report filename generation (#4781) 2023-05-06 09:49:32 +10:00
Lukas
d416e57ee3
Add option to hide plugin setting from auto-generated plugin setting page (#4767)
* Add option to hide plugin setting from auto-generated plugin setting page

* Change hide to hidden

* Added small note to docs about hidden settings

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

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2023-05-06 01:14:39 +10:00
Oliver
d7f75d3ab3
Project code docs (#4772)
* Add page for project code docs

* Add details on project codes

* more docs
2023-05-05 23:59:30 +10:00
Oliver
a0f18d82cb
Improve documentation on currency rendering (#4768)
* Improve documentation on currency rendering

* Fix .devcontainer file
2023-05-05 23:43:12 +10:00
Matthias Mair
f5c2591fd4
Add 'Tag' management (#4367)
* 'Tag' management
Fixes #83

* Add for ManufacturerPart, SupplierPart

* Add tags for StockLocation, StockItem

* fix serializer definition

* add migrations

* update pre-commit

* bump dependencies

* revert updates

* set version for bugbear

* remove bugbear

* readd bugbear remove isort

* and remove bugbear again

* remove bugbear

* make tag fields not required

* add ruleset

* Merge migrations

* fix migrations

* add unittest for detail

* test tag add

* order api

* reduce database access

* add tag modification test

* use overriden serializer to ensuer the manager is always available

* fix typo

* fix serializer

* increae query thershold by 1

* move tag serializer

* fix migrations

* content_types are changing between tests - removing them

* remove unneeded fixture

* Add basic docs

* bump API version

* add api access to the docs

* add python code

* Add tags to search and filters for all models
2023-05-04 09:02:48 +10:00
Oliver
61d613ff34
Base URL configuration options (#4749)
* Improve construct_absolute_url method

- Look for hard-coded site URL if provided
- Otherwise look for specified site URL
- Otherwise look at the provided request object

* Refactor existing code which used base URL setting

* Update docs

* Validate that a provided base URL is valid
2023-05-02 22:14:57 +10:00
Matthias Mair
10c3d101e8
Replace mklint with djlint (#4746)
* remove markuplint

* remove dedicated html step - will be done by pre-commit

* add djlint for django template linting

* Fix T003: Endblock should have name

* Fix H013: Img tag should have an alt attribute

* Fix H014: Found extra blank lines

* Fix T003: Endblock should have name

* Fix H013: Img tag should have an alt attribute

* small fixes

* Fix T001: Variables should be wrapped in a single whitespace

* Fix T003: Endblock should have name

* small fixes

* fix form method

* add entry to contributing

* fix template changes

* another fix

* use current version
2023-05-02 20:03:52 +10:00
Matthias Mair
5e99e54bbc
Update README.md with digitalocean info (#4742)
* Update README.md with digitalocean info

* update link for DO in docs
2023-05-01 19:42:14 +02:00
Oliver
ad4acef459
Plugin metadata docs (#4724)
* Add page for model metadata

* Add intro section

* Add info on direct access

* more updates
2023-05-01 23:33:44 +10:00
Matthias Mair
abee2cee88
Code style improvements (#4683)
* fix list comps

* mopre comp fixes

* reduce computing cost on any() calls

* add bugbear

* check for clean imports

* only allow limited relative imports

* fix notification method lookup

* fix notification method assigement

* rewrite assigment

* fix upstream changes to new style

* fix upstream change to new coding style
2023-04-28 20:49:53 +10:00
Oliver
f6021c4749
sentry.io improvements (#4712)
* Write function to catch sentry.io events before sending

- Will let us ignore certain types of errors which we are not interested in

* Cleanup

* Include release info

* Allow sentry reporting in debug mode

* Consolidate DRF sentry code into InvenTree/sentry.py

* Add more error types to ignore

* update docs
2023-04-28 06:54:31 +10:00
Oliver
e2c3b28640
Company docs updates (#4710)
* Refactor order documentation into simpler consolidated pages

* Reorganize images

* Add documentation on "Contact"

* Add imgae
2023-04-27 22:27:21 +10:00
Matthias Mair
3975a85742
Check if doc links are broken (#4686)
* add check for links

* fix style

* call silently

* add dep

* add path

* ignore readme as it contains necesarry broken links

* fix syntax

* check recursevly

* run in sync

* use linkcheckmd instaead

* use sync

* add requests

* revert fix to check if checks still work

* fix lookup

* fix old link

* run check verbose

* run async

* remove recurse

* introduce error for test

* fix link
2023-04-27 07:24:26 +10:00
Oliver
608f96c723
Add python example for deleting a part (#4703)
* Add python example for deleting a part

* Ignore PRs which are just docs from release notes
2023-04-26 23:18:03 +10:00
Oliver
5fcab2aec3
Specify order currency (#4698)
* Add 'order_currency' to the various external order models

- By default will use the currency specified for the supplier (or customer)
- Can be specified per order, also

* Display order currency on order pgae

* Add 'order_currency' field

* Enable "blank" currency option (to default to the currency specified by the referenced company

* Fix default currency code when adding line items

* Remove 'total_price_currency' serializer field

- Now replaced with 'order_currency' for greater flexibility

* Bump api_version.py

* Update default order report templates

* Updated docs

* More docs updaes

* Adjust unit tests

* Use 'order_currency' in order tables

* Update purchase order api unit tests
2023-04-26 17:35:15 +10:00
Oliver
8df207d8e1
Extend ReportMixin class to support labels (#4678)
* Extend ReportMixin context to shim label templates also

* Update docs
2023-04-22 23:46:43 +10:00
Oliver
50cbaff76d
Fixes for docs building (#4659) 2023-04-22 23:35:25 +10:00
Oliver
2ffd2354eb
Documentation integration (#4653)
* Add documentation under docs/ directory

* Add CI workflow for mkdocs configuration checking

* Add documentation issue template

* update pip-tools?

* Update .gitignore files

* Fix .gitignore rules

* Improve release notes page

* remove references to old repo
2023-04-22 22:40:29 +10:00
Oliver Walters
48cbd3be97 Remove (old) docs 2021-03-31 20:13:12 +11:00
Oliver Walters
d953f1a31e Remove some docs pages
- These are now being consolidated on the inventree.github.io page
2020-04-18 14:09:14 +10:00
Oliver
539b000460
Update start.rst
typo fix
2020-04-16 21:02:14 +10:00
Oliver Walters
4594f1e2b8 Update requirements documentation
- Add python3-dev and g++
- Add wheel to PIP requirements file
2020-04-16 09:56:32 +10:00
Oliver Walters
64c567474a Doc fix 2020-02-16 09:25:28 +11:00
Oliver Walters
d827070585 Fix docs 2020-02-02 18:11:29 +11:00
Oliver Walters
38be1fc696 Don't force backup step as part of **make update 2020-02-02 18:05:50 +11:00
Oliver Walters
6cd3b3176c Regenerate translation files
- Also fix documentation for making a virtual envirtonment
2019-12-09 22:17:21 +11:00
Oliver Walters
ef37eada2f Tweak docs 2019-12-05 23:07:36 +11:00
Oliver Walters
f648433e53 Add documentation for creating a virtual environment 2019-12-05 22:56:20 +11:00
Oliver Walters
225ad0ffa6 Add note in contribution file regarding translations 2019-09-27 10:07:34 +10:00
Oliver Walters
b56a1ade24 Make translation compilation a separate step
- Must be run after a translation file is updated
2019-09-26 10:21:14 +10:00
Oliver Walters
fcb47fce09 Make gettext a prerequisite rather than polluting the make file with apt commands that require sudo 2019-09-26 10:16:45 +10:00
Oliver Walters
9be528a3fb Add (brief) documentation page regarding translations 2019-09-26 10:07:18 +10:00
Oliver Walters
205567cfb4 cd to the correct directory to run the dev server 2019-09-13 15:47:34 +10:00
Oliver Walters
ee73ea714e Update docs for installing with PostgreSQL
- make target
- documentation
2019-09-09 16:11:26 +10:00
Oliver Walters
da5f2338eb Ensure that required packages are installed when performing update step 2019-09-09 14:14:38 +10:00
Oliver Walters
e81a4ffacd Add docs for common modules 2019-09-08 23:36:25 +10:00
Oliver Walters
d7f969613e Update makefile and docs 2019-09-08 20:45:01 +10:00
Oliver Walters
7ef2932f38 Add documentation on perfoming system upgrades 2019-09-04 10:54:15 +10:00
Oliver Walters
c988f9486e Re-order docs index 2019-09-02 17:59:10 +10:00
Oliver Walters
90254d1572 add a note about file encoding 2019-09-02 17:46:42 +10:00
Oliver Walters
37507f2b43 More cleanup of docs 2019-09-02 17:43:20 +10:00
Oliver Walters
47e9c44c43 Prefix correct directory in docs 2019-09-02 17:04:44 +10:00
Oliver Walters
92940f1333 Update makefile docs 2019-09-02 16:05:26 +10:00
Oliver Walters
d30cad2341 Emphasis on config.yaml 2019-09-02 16:05:19 +10:00
Oliver Walters
31f3ead5dc Andrew's eagle eyes 2019-09-02 15:52:19 +10:00
Oliver Walters
4de12033bb Change pip3 to python3-pip 2019-09-02 15:51:58 +10:00
Oliver Walters
e9efac403c Tweak install docs 2019-09-01 22:55:18 +10:00
Oliver Walters
e32048d3c6 Add documentation for data migration 2019-09-01 22:55:02 +10:00
Oliver Walters
d9cc03c5ca Improve installation documentation 2019-09-01 22:16:58 +10:00
Oliver Walters
d0f29ab83b Add note on MySQL collation option 2019-08-15 13:25:47 +10:00
Oliver Walters
475e1681de Doc fix 2019-08-14 12:54:38 +10:00
Oliver Walters
905c02d86f Copy config template to config file if it does not exist 2019-08-14 12:05:47 +10:00
Oliver Walters
0fa5cfdd66 Add doc for mysql installation 2019-08-14 11:32:18 +10:00
Oliver Walters
5ee07eae7c Update installation routine and docs
- Single call of "make install" does everything
- Add backup_dir option to yaml config file
2019-08-01 20:07:06 +10:00
Oliver Walters
31e6aa6906 doc fix 2019-07-12 00:15:47 +10:00
Oliver Walters
04efa2ece8 Add simple deployment documentation 2019-07-12 00:14:40 +10:00
Oliver Walters
07c95f2032 Doc tweaks 2019-07-11 23:15:24 +10:00
Oliver Walters
194c15492f MEDIA_ROOT is now provided in config.yaml 2019-07-10 23:41:33 +10:00
Oliver Walters
e231de6951 Documentation for allowed hosts / CORS headers 2019-07-10 23:33:46 +10:00
Oliver Walters
b941a4115f Documentation for settings file 2019-07-10 23:11:41 +10:00
Diego Herranz
064e09ee02 doc: python3 instead of python
Otherwise, python2 would be used in most systems.
2019-07-02 08:52:01 +01:00
Oliver Walters
2768a7cdf3 Added some docs 2019-06-18 01:49:07 +10:00
Oliver Walters
e28a435c07 Add entry point for order documentation 2019-06-15 17:13:28 +10:00
Oliver Walters
e91aa075b6 Fix a typo 2019-05-09 08:55:25 +10:00
Oliver Walters
a03027ec9b Add makefile option for quick backup 2019-05-07 07:46:29 +10:00
Oliver Walters
1d719f1ad3 Fixed image 2019-05-06 08:19:18 +10:00
Oliver Walters
c6a7d1c243 Added a bunch of developer documentation 2019-05-05 20:13:59 +10:00
Oliver Walters
7c45f8dc24 Remove absolute URL encoding
- Should now work on RTD
2019-04-28 08:11:29 +10:00
Oliver Walters
e512bc6536 Fix for autoapi-dirs 2019-04-28 01:17:28 +10:00
Oliver Walters
aa04941bf1 Add module-level docstrings for each app 2019-04-28 01:05:45 +10:00
Oliver Walters
b0487b33dc Change documentation root url to 'docs' 2019-04-28 00:58:59 +10:00
Oliver Walters
3a43a8ba72 Add custom links to app documentation 2019-04-28 00:57:29 +10:00
Oliver Walters
c87166a49a Prevent auto-addition of toc by autoapi
- Also fix links in sidebar
2019-04-28 00:37:20 +10:00
Oliver Walters
0d8f14d3e2 Add index and modindex to sidebar
- https://stackoverflow.com/questions/25243482/how-to-add-sphinx-generated-index-to-the-sidebar-when-using-read-the-docs-theme
2019-04-28 00:20:27 +10:00
Oliver Walters
4aef8eecea Force TOC to appear in sidebar for each page
- https://stackoverflow.com/questions/18969093/how-to-include-the-toctree-in-the-sidebar-of-each-page#19007358
2019-04-28 00:03:19 +10:00
Oliver Walters
5e6d49102d Add docstring documentation to the main InvenTree app 2019-04-27 21:21:58 +10:00
Oliver Walters
d9169a0dd1 Add docstrings for Build app 2019-04-27 20:35:14 +10:00
Oliver Walters
53ec42af03 Generate documentation from makefile
- Had to change 'docs' to 'documentation' to prevent directory clash
2019-04-27 17:22:23 +10:00
Oliver Walters
ad3defffe3 Use sphinx-autoapi to generate documentation files
- Select which files to ignore
- Only display items with a docstring
2019-04-27 17:19:51 +10:00
Oliver Walters
8d0df6654c Ignore migration files 2019-04-27 16:48:04 +10:00
Oliver Walters
e3440cbb90 Initialize sphinx documentation
- Change theme to sphinx_rtd_theme
- Ignore build files for docs
2019-04-27 16:09:52 +10:00
Oliver Walters
66cf8239fc Add initial requirements for documentation 2019-04-27 15:44:46 +10:00