Commit Graph

12028 Commits

Author SHA1 Message Date
Matthias Mair
21ed4b2081
Fix common spelling mistakes (#4956)
* add codespell

* first fixes

* doc fixes

* fix docstrings and comments

* functional changes

* docstrings again

* and docs again

* rename args

* add ignore

* use pre-commit for filtering instead

* ups

* fix typo in filter
2023-06-04 00:04:52 +10:00
Oliver
b0338e181e
Parameter validation via plugin (#4958)
* Expose part parameter validation to plugins

- Allow ValidationMixin plugins to validate part parameter values

* Update sample plugin

* Catch and re-throw error

* Update docs

* Improve plugin docs

* Simplify validation sample

* Calculate numeric value first
2023-06-03 21:27:31 +10:00
miggland
1d85b70313
Add Metadata to more models (#4898)
* Update models: add MetadataMixin

* Fix name of model in Metadata API definition

* Add API endpoints

* Update API version

* Fix syntax

* Add API endpoint for RO, RO line, RO line extra item

* Add Metadata to Contacts

* Fix link in API version

* Fix name of model

* Fix error?

* Fix error?

* Fix all errors, hopefully..

* Add tests for order, line, extraline metadata

Extend for PO, SO

* Add tests for metadata for Company-related models

* Fix spelling

* Consolidate metadata test for all part models into one test

* Add test for all Stock metadata

* Update stock test_api

* Add all metadata tests for orders

* Fix various errors in tests

* Fix model name

* Add migration files

* Update tests for metadata

* Resolve conflict around API version number

* Rename migration file

* Rename migration file

* Will Contact edit endpoint work better?

* Revert changes in URL definitions

* Remove test, duplicate

* Fix tests with fixed PK, not from fixtures, to use a dynamic PK

* Fix migration overlap
2023-06-02 19:26:20 +10:00
Oliver
c0dafe155f
Fix for 'available' filter (#4952)
- Available filter also requires "in stock"
2023-06-02 16:37:16 +10:00
Oliver
812b256e08
Shorten displayed linked by default (#4951) 2023-06-02 14:27:15 +10:00
miggland
936c8ad7fc
Metadata bugfixes (#4947)
* Fix name of model in Metadata API definition

* Add API endpoint for RO, RO line, RO line extra item

* Update InvenTree/order/api.py

Thanks @matmair - missed that I changed this later on

Co-authored-by: Matthias Mair <code@mjmair.com>

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2023-06-02 07:54:55 +10:00
Oliver
60f2f1ea86
Report files (#4946)
* Adds more report tags

- uploaded_file: Load qualified path for a media file
- encode_svg_image: Encode an svg image as base64 data

* Docs updates
2023-06-02 07:54:15 +10:00
Lukas
4d9e92011e
Fix/settings bugs and added model SettingKeyType typing (#4944)
* fix .gitignore and spelling issues

* Fix setting get not cached correctly

* Add model to settings key type

* Fix plugin setting slug url

* Fix typo

* Fix resetting of related setting field

* Improved model comment
2023-06-01 23:53:06 +10:00
Oliver
037654610e
Better rendering for parameter table (#4943)
- Use trueFalseLabel
2023-06-01 20:30:53 +10:00
Miklós Márton
46a808c064
Add user settings to remember the last/favourite label template (#4938)
* Add user settings to remember the last/favourite label template

Fixes #4932

* Remove settings_value from translated templates

Thanks Oliver for the hint!
2023-06-01 20:01:48 +10:00
Oliver
18d9ecd0f4
Tweak svg data cleaning: (#4941)
- Decode data if passed as bytes
2023-06-01 16:47:47 +10:00
Oliver
cb0f0e34d9
Improvements for parameteric part table (#4940)
- Initially only display columns which have data
2023-06-01 16:09:13 +10:00
Oliver
2c58b2fd36
New Crowdin updates (#4939)
* 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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-01 15:39:39 +10:00
Oliver
e21a5e62b8
Parameter types (#4935)
* Add fields to PartParameterTemplateModel

- checkbox: Is the field a 'checkbox'
- choices: List of valid options

* Update javascript

* Adds unit test for PartParameterTemplate

- Checkbox cannot have units
- Checkbox cannot have choices
- Choices must be unique

* Improve API filtering

- Add "has_choices" filter
- Add "has_units" filter

* Prune dead code

* Update js functions for creating / editing parameters

* Update part parameter form

- Rebuild the "data" field based on the selected template
- Supports "string" / "boolean" / "select"

* Adjust data input based on parameter type

- Choice displays available options
- Checkbox displays boolean switch
- Otherwise displays text input
- Adds more unit testing
- Updates to forms.js for improved functionality

* Calculate numeric value for boolean parameters

* Update docs

* Bump API version
2023-06-01 07:20:11 +10:00
Oliver
685cc1fd77
BOM table: remove quantity footer (#4930)
- Summing quantities of different parts does not make sense
- Especially when different parts have units
- i.e. "3 m + 22 litres = ??"
2023-05-31 17:25:51 +10:00
Lukas
99d122baa9
Refactor model helpers into own file (#4927)
* Refactor model helpers into own file to allow helper import when apps not loaded yet

* Import helper functions at module level

* Added missing imports where vscode couldnt help because its no explicit import
2023-05-31 09:18:42 +10:00
Oliver
92930d475c
Fix JS linting workflow (#4915)
* Add bad .js code

- Call function which has not been defined
- Should throw JS lint error

* update eslint

- Move to newer version of eslint
- Change default rules

* Fixes for tables.js

* Fixes for table_filters.js

* Fixes for stock.js

* Fix for sales_order.js and search.js

* Fix return_order.js

* Fixes for purchase_order.js

* More updates

- part.js
- plugin.js
- pricing.js

* Updates

- order.js

* Even morerer updates

- label.js
- modals.js
- model_renderers.js
- news.js
- notification.js

* More, MORE!

- build.js
- company.js
- charts.js
- filters.js
- forms.js
- helpers.js

* Final?

- api.js
- attachment.js
- barcode.js
- bom.js

* Fix 'useless-escape'

* Disable no-useless-escape rule
2023-05-30 22:55:53 +10:00
Oliver
0808382d06
Fix ReturnOrder serializer (#4923)
- Add in missing fields
2023-05-30 21:00:03 +10:00
Oliver
eca2172624
Add Finnish language support (#4921) 2023-05-29 22:05:38 +10:00
Oliver
3205527ebe
Change target of PurchaseOrder notification (#4905)
* Change target of PurchaseOrder notification

- Triggered when order is placed
- No longer when order is created

* unit test fixes
2023-05-29 21:04:31 +10:00
Ulices
32331875fe
Fix Unink to Unlink (#4919) 2023-05-29 15:56:58 +10:00
Oliver
95755c5453
js fixes (#4918)
- Do not call formatDecimal on a string
2023-05-29 11:36:12 +10:00
Oliver
b842d5ea67
New Crowdin updates (#4910)
* 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

* 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>
2023-05-28 22:13:15 +10:00
Miklós Márton
0b4a06ae7e
Fix completeSalesOrderShipment typo in sales_order.js (#4908) 2023-05-27 09:48:14 +10:00
Miklós Márton
21dafdee8e
- Bump djLint to 1.29.0 (from 1.25.0) in the CI linting scripts (#4907)
- Add alt attribute to the img tags in the templates (required by the bump)
2023-05-27 08:52:10 +10:00
Oliver
11f816a787
Fix for migration file (#4901)
- Catch *all* exceptions when migrating

(cherry picked from commit bcd068fc23637d815d7899d549f83b8bd8a26057)
2023-05-26 19:44:32 +10:00
Oliver
01e2376748
New Crowdin updates (#4875)
* 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

* 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>
2023-05-26 17:01:21 +10:00
miggland
4d76708bee
Add API Calendar for Return Orders (#4899)
* Add RO to calendar output

* Update title and description to be more descriptive

* Add documentation

* Add simple test for RO calendar

* Lint/syntax

* Lint

* Changes to title, description
2023-05-26 17:01:04 +10:00
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
Matthias Mair
717bb07dcf
Possible fix for git messages (#4882)
* yank git stuff out

* fix tests

* Add check for git to reduce warning logs
Fixes #4428

* reverse git removal

* and more resetting
2023-05-26 08:17:32 +10:00
Oliver
8268b9b105
Fix for data migration (#4892)
* Fix for data migration

- Catch *all* exceptions
- We don't want an unhandled exception to break data migration

* Add more exception handling

* Fix typo
2023-05-25 10:59:55 +10:00
Matthias Mair
fdd4169cd7
Improve cli experience (#4881)
* fix cli call to get a fully running invoke

* use relativ import
This is importend when imported from outside

* Add version command

* Add more information to version command

* make print easier to understand
2023-05-24 16:34:36 +10:00
Oliver
4079224658
Fix for PurchaseOrder template (#4885)
- Fixes bug which removes javascript incorrectly
2023-05-24 16:18:54 +10:00
Oliver
4d00c471e1
Change debug message for plugin events (#4884)
- Change from .info to .debug for less verbosity
2023-05-24 15:32:49 +10:00
Oliver
09e99e5f75
Remove debug message (#4883)
- Removes an old debug message which was left in by mistake
2023-05-24 13:48:38 +10:00
Oliver
91d79dc3ed
Improved error handling for email support (#4862)
* Improved error handling for email support

- Prevent email sending if email not configured
- Check for tx email address before sending

(cherry picked from commit de541f811ede030ea5eb3136132731e1dafccc31)

* Update InvenTree/email.py

Co-authored-by: Matthias Mair <code@mjmair.com>

* Update InvenTree/email.py

Co-authored-by: Matthias Mair <code@mjmair.com>

* Fix location of file email.py

* Allow dummy emails in testing

* Provide default email in testing mode

* Fix to get test working

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2023-05-24 07:33:31 +10:00
Oliver
96b7845d84
Fix for currency migration (#4873)
- Handle case where no currencies are provided
- Handle case where base currency is not in provided options

(cherry picked from commit b1bf086ae9)
2023-05-22 22:59:10 +10:00
Oliver
5992dcdfda
Handle ValidationError when creating a new setting (#4868)
- Duplicate keys can occur in some race conditions
- Catch and pass ValidationError
2023-05-22 12:12:02 +10:00
Oliver
63da2ae9f7
New Crowdin updates (#4852)
* 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

* 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>
2023-05-22 00:36:23 +10:00
Oliver
8dc45e49cd
Fix category filtering for parameteric part table (#4861) 2023-05-21 23:17:28 +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
Lukas
cb8ae10280
Refactor: BaseInvenTreeSetting (#4834)
* Added typing for settings

* Refactored common.BaseInvenTreeSetting model to make it more generic

* Use older syntax for union types

* Added protected option to typing

* Remove now unused code

* Remove old 'get_kwargs' method as it is replaced by 'get_filters_for_instance'

* Trigger ci
2023-05-19 09:51:30 +10:00
Oliver
61481b4eb0
New Crowdin updates (#4842)
* 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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-18 20:51:44 +10:00
Oliver
327381357b
Adds ability to partially scrap build outputs (#4846)
* BuildOrder updates:

- Use batch code generation when creating a new build output
- Allow partial scrapping of build outputs

* Fixes for stock table

* Bump API version

* Update unit tests
2023-05-18 14:04:57 +10:00
IvoLealMCS
120a710ad4
Add InvenTreePluginViewMixin to PartIndex (#4843) 2023-05-18 01:04:37 +10:00
Oliver
4785f465e8
Cleanup / consolidate unit testing code (#4831)
- Move testing code out of helpers.py
- Create new file unit_test.py
2023-05-17 07:35:26 +10:00
Oliver
f85b378115
New Crowdin updates (#4810)
* 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

* 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>
2023-05-17 00:38:05 +10:00
miggland
98d87c84e3
Shipment delivery date (#4825)
* Add delivery date setting to Shipment model

* Add delivery_date to serializer

* Correct test for is_delivered

* Add relevant fields to API and forms

* Add test

* Increment API version

* Move migration file because of conflict
2023-05-16 21:28:09 +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
Oliver
368f615d71
Bug fix for improperly configured SSO provider (#4822)
* Add sso template tags

* Check if SSO provider is valid on login page

* Add warning if SSO method is not correctly configured

* Template tweaks
2023-05-15 15:09:14 +10:00
Oliver
065f3e2404
Small visual tweaks for notifications tab (#4819) 2023-05-15 12:15:01 +10:00
Oliver
3e0b57f10a
Add "description" field to extra line items (#4815) 2023-05-15 11:13:38 +10:00
Oliver
caa7b84c3e
Allow tag fields to be empty (#4816)
Without this change, editing items (e.g. via the admin interface) fails if the tag field is not empty
2023-05-15 10:57:12 +10:00
Oliver
b04053d9b5
New Crowdin updates (#4801)
* 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

* 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>
2023-05-14 19:12:53 +10:00
Oliver
1d384572ec
Update CSS for table filter tags (#4803) 2023-05-13 22:44:04 +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
Matthias Mair
017ccaa27a
Cleanup plugin mixin registry (#4790)
* collect mixins dynamically

* remove unfinsihed option to reorder mixins

* clean up settings

* fix text

* fix mixin lookup

* stupid error

* fix assertations

* use regustered function instead of private dict

* switch to dict for reg

* fix test

* makke sure mixins also works with class

* cleanup

* fix reqs

* fix test assertations
2023-05-12 22:00:25 +10:00
Oliver
41cef1a190
Add reload functionality for build item table (#4799)
* Add reload functionality for build item table

* Update requirements.txt file

(cherry picked from commit c976d06ec75d17e4c2fd4e557eb0bda858ae391e)
2023-05-12 14:29:29 +10:00
Oliver
57502a1ad8
New Crowdin updates (#4760)
* 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

* 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

* 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>
2023-05-08 19:09:50 +10:00
miggland
84f8e33269
Add list of pending shipment to home page, with corresponding settings for user (#4775) 2023-05-08 00:25:51 +10:00
Jakob Haufe
89dfb6186f
Restore shopping cart icon in BO/Allocate Parts (#4780)
The shopping cart icon for parts already on order was originally
implemented in 1b421fb59a but got broken in 27aa16d55d as the return
value of `makeIconBadge` is discarded.

Additionally, the FontAwesome JS renderer doesn't seem to like
non-empty content for this, so even when adding it back to `icons`,
it didn't get rendered properly. Instead, the count has to be added
to the title.
2023-05-07 22:47:10 +10:00
Lukas
404113d739
Fix metadatalookup (#4784) 2023-05-07 10:02:11 +10:00
Ulices
4510cf2dd6
fix strarting -> starting (#4786) 2023-05-07 10:01:04 +10:00
Oliver
3b3ce81d11
Sales order button fix (#4782)
* Add (empty) set of API filters for contact table

* Fix typo
2023-05-06 18:49:21 +10:00
Oliver
09083d2de1
Build filters (#4773)
* Add optional callback to table filtering function

* Add custom filters to build item table
2023-05-06 08:39:10 +10:00
Ulices
434a00b55f
fix caluclations->calculations (#4774) 2023-05-06 08:38:48 +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
35d04c0357
Fix for "used in" calculation (#4770)
* Simplify query filtering for determining list of parts which require a component to build

* Fix .devcontainer file

(cherry picked from commit d4bd8ea0a9)

* Catch ValueError
2023-05-06 00:44:49 +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
Oliver
1c3d037baf
Bug fix for zero quantity pricing (#4765)
- Fix default value for formatPriceRange method
- Display empty value in table
2023-05-05 23:08:33 +10:00
Oliver
9920c3fd9c
Metadata fix (#4725)
* Add 'clean' method to MetadataMixin class

- Ensure that the "metadata" is a valid dict object

* Add "overwrite" option for set_metadata method

* Update unit tests

* full_clean -> clean

* Cleanup

* Fix for MetadataMixin

* Updates for unit tests

* Test
2023-05-05 14:06:19 +10:00
Oliver
c45e66935a
Stock transfer same location (#4757)
* Allow stock items to be transferred into the same location

* Add new code when moving into same location

* Update unit test

* Further unit test fixes
2023-05-05 12:55:31 +10:00
Oliver
e7317522a6
New Crowdin updates (#4750)
* 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

* 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

* 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>
2023-05-05 07:09:24 +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
baaa147fd0
Ignore variant stock when performing stocktake (#4752)
* Ignore variant stock when performing stocktake

- Including variant stock can cause duplicate counts of items
- Causes valuation numbers to be incorrect

* Fix unit tests

* Further unit test fixes
2023-05-02 23:57:40 +10:00
Oliver
6da108e031
Bug fix for label printing (#4751)
* Bug fix for label printing

- Do not use "debug mode" when printing using a plugin
- Fixes https://github.com/inventree/InvenTree/issues/4745

* Fix inverted logic
2023-05-02 23:09:41 +10:00
Oliver
3ff217d229
Fix for sales order tables (#4753)
- Allow line items to be allocated after partial shipment
- Fixes https://github.com/inventree/InvenTree/issues/4734
2023-05-02 22:55:53 +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
Oliver
09fabff551
Fix filters for part variant table (#4748)
- Slight adjustment to HTML tags
- Buttons were not displaying correctly inline
2023-05-02 14:47:02 +10:00
Oliver
149c4df231
Remove restriction on manual stock item installation (#4747)
- Allow stock item to be manually inside an item which is iteself installed in an item
- No practical reason for this limitation to exist
2023-05-02 14:46:54 +10:00
Oliver
d9864fce69
New Crowdin updates (#4737)
* updated translation base

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-02 14:46:46 +10:00
Oliver
20d8c2b4e6
Include error type when an error occurs updating exchange rates (#4728)
- Will allow us to further introspect errors received by sentry
2023-05-02 09:34:03 +10:00
Lavissa
6bd95f3b15
Link changes and in-table clipboards (#4697)
* Add clipboard to tables and external link changes

* Clipboard icon added to tables for screens >1200px wide. Enables
  copying of SKU/MPN/IPN from table cells where these otherwise are
  hyperlinks

* External links now open in new tabs with noreferrer

* Move external links into separate template

* All statically rendered external links have been moved out to a new
  template.
2023-05-02 08:13:50 +10:00
Miklós Márton
0b8feb2c4a
Display proper printing target name in the label printing modal dialog (#4727)
Fix #4717
2023-05-02 07:59:54 +10:00
Oliver
be856c3682
Scan in items fix (#4738)
* Clean up comments

* Bug fix

- Pass options.modal through if provided when creating new barcodeDialog

* Fix for scanning from item context into location
2023-05-01 23:50:20 +10:00
Matthias Mair
08c4aa4998
Make sure plugins are always on a new line (#4721)
* "Install Plugin" via GUI fails to add plugin to plugins.txt correctly for first plugin
Fixes #4719

* remove old change as it was not the root issue

* make sure plugins are always written on a new line
2023-05-01 23:26:23 +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
f6831558a4
Fix export of order data (#4714)
* Adds extra unit test for exporting sales orders

- Exporting sales orders to .xls currently throws exception

* Fix 'total_price' field when exporting orders

* Fix for unit test
2023-04-28 06:54:50 +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
miggland
8d28fc06be
Improve text when no sub-categories found (#4711)
Avoids confusion when looking for parts
2023-04-27 22:57:16 +10:00
Oliver
bb860227c8
New Crowdin updates (#4705)
* 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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-27 14:43:54 +10:00
Oliver
82e98dffb8
Add custom template loader class (#4706)
- Specifically to ignore caching for generated reports and labels
- Fixes https://github.com/inventree/InvenTree/issues/4611
2023-04-27 13:28:00 +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
36d17c082b
Homepage hide inactive (#4700)
* Add user setting for including "inactive" parts in results displayed on homepage

* Adds user setting to hide inactive parts on the homepage

Closes https://github.com/inventree/InvenTree/issues/4688
2023-04-26 15:45:14 +10:00
Oliver
f382d7ef21
Disable httpstat.us tests (#4699)
- Uptime of the eternal service is not great
- For now, disable tests
- Potentially reintroduce these at some point in the future
2023-04-26 14:27:13 +10:00
Oliver
eaa518852c
Mark "supplier" field as required on PurchaseOrder serializer (#4693)
- Fixes https://github.com/inventree/InvenTree/issues/4687
2023-04-26 12:35:55 +10:00
Lavissa
011b5915e1
Fix missed translation of overallocation string (#4681)
* Fix missed translation of overallocation string

* Added missing translation prefix on string for Overallocation REJECT choice

* Fix missing translation in part admin panel

* Added missing translation prefix on string for "variant of" column in
  admin panel
2023-04-25 22:41:31 +10:00
Matthias Mair
d7bdcd95a6
Fix plugin meta lookup (#4684)
* fix website lookup

* use the raw data on error
2023-04-24 08:28:50 +10:00