Commit Graph

11711 Commits

Author SHA1 Message Date
Oliver
da2e58cc18
Search field fix for admin interface (#3976)
* Search field fix for admin interface

* Fix also for MPN field
2022-11-21 21:52:05 +11:00
geniesis
10ae170d2a
allauth default login protocol setting (#3975) 2022-11-21 19:41:22 +11:00
Oliver
a008d360af
Simple typo fix (#3968) 2022-11-20 21:54:52 +11:00
Matthias Mair
798e95910c
fix typing (#3966) 2022-11-20 19:20:58 +11:00
Oliver
5869a008c5
Remove SettingEditForm (#3964) 2022-11-19 23:10:02 +11:00
Miklós Márton
0716238f3b
Implement structural stock locations (#3949)
* Implement structural stock locations

* Bumped API version
2022-11-19 22:24:18 +11:00
Oliver
bc8a6ae4b8
Part image delete (#3963)
* Add button to remove an associated image from a part

- Also fixes some issues with onclick event propagation

* Similar feature for company image
2022-11-19 21:53:48 +11:00
Oliver
99844d5b2f
New Crowdin updates (#3938)
* 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>
2022-11-18 20:56:08 +11:00
Oliver
2a148a2f46
Markdown notes fix (#3946)
* Improve 'remove_non_printable_characters' method in helpers.py

- Requires fancy 'negative-lookahead' regex to negate existing unicode regex

* Adds  extra test for markdown fields

- Ensure that newline characters are retained
- Very necessary for markdown formatting!
- Update field cleaning to allow newlines in some very specific cases

* Bug fix

* Better edge case handling
2022-11-18 13:36:38 +11:00
Miklós Márton
73c1c50d01
Support structural part categories (#3931)
* Support structural part categories

Structural categories cannot have parts assigned (only sub-categories)

Fixed #3897

* Fixed unit test

* Fix Oliver's review comments
2022-11-18 08:10:06 +11:00
Oliver
1e1662ef0f
Add setting to determine if supplier price breaks are used in overall price calculations (#3943) 2022-11-17 09:27:07 +11:00
Oliver
d7c4dd1f01
Home page adjust (#3942)
* Change "build stock needed" to off by default on homepage

* Turn off "BOM requires validation" by default

* Hide depleted stock on homepage by default
2022-11-17 09:07:54 +11:00
Oliver
95645c7b14
Notification fix (#3939)
* Fix docstring for NotificationMessage class

* Fix for 'refresh' button in notification table

* Simplify API for marking notifications as 'read'

- Simply update the detail serializer
- No requirement for extra API endpoints
- Same updates for news feed entry
- Hide 'read' news on the home page
- Add ability to mark news items as read via table

* Bug fix for build.js

* Fix for part category template
2022-11-17 08:26:19 +11:00
Oliver
54e7dd28e5
New Crowdin updates (#3904)
* 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

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.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>
2022-11-15 09:21:21 +11:00
Oliver
06266b48af
Part pricing cache (#3710)
* Create new model for storing Part pricing data

Currently this model does not "do" anything but will be used for caching pre-calculated pricing information

* Define function for accessing pricing information for a specific part

* Adds admin site support for new PartPricing model

* Specify role for PartPricing model

* Allow blank values for PartPricing model fields

* Add some TODO entries

* Update migration files to sync with latest master

* Expose API endpoint for viewing part pricing information

* Update migration file

* Improvements:

- Updated model with new fields
- Code for calculating BOM price
- Code for calculating internal price
- Code for calculating supplier price
- Updated unit testing

* Fix (and test) for API serializer

* Including min/max pricing data in part serializer

* Bump API version

* Add pricing overview information in part table

- Adds helper function for formatting currency data
- No longer pre-render "price strings" on the server

* Overhaul of BOM API

- Pricing data no longer calculated "on the fly"
- Remove expensive annotation operations
- Display cached price range information in BOM table

* Filter BOM items by "has pricing"

* Part API endpoint can be filtered by price range

* Updpated API version notes

* Improvements for price caching calculations

- Handle null price values
- Handle case where conversion rates are missing
- Allow manual update via API

* Button to manually refresh pricing

* Improve rendering of price-break table

* Update supplier part pricing table

* Updated js functions

* Adds background task to update assembly pricing whenever a part price cache is changed

* Updates for task offloading

* HTML tweaks

* Implement calculation of historical purchase cost

- take supplier part pack size into account
- improve unit tests

* Improvements for pricing tab rendering

* Refactor of pricing page

- Move javascript functions out into separate files
- Change price-break tables to use bar graphs
- Display part pricing history table and chart
- Remove server-side rendering for price history data
- Fix rendering of supplier pricing table
- Adds extra filtering options to the SupplierPriceBreak API endpoint

* Refactor BOM pricing chart / table

- Display as bar chart with min/max pricing
- Display simplified BOM table

* Update page anchors

* Improvements for BOM pricing table display

* Refactoring sales data tables

- Add extra data and filter options to sales order API endpoints
- Display sales order history table and chart

* Add extra fields to PartPricing model:

- sale_price_min
- sale_price_max
- sale_history_min
- sale_history_max

* Calculate and cache sale price data

* Update part pricing when PurchaseOrder is completed

* Update part pricing when sales order is completed

* Signals for updating part pricing cache

- Whenever an internal price break is created / edited / deleted
- Whenever a sale price break is created / edited / deleted

* Also trigger part pricing update when BomItem is created  / edited / deleted

* Update part pricing whenever a supplier price break is updated

* Remove has_complete_bom_pricing method

* Export min/max pricing data in BOM file

* Fix pricing data in BOM export

- Calculate total line cost
- Use more than two digits

* Add pricing information to part export

Also some improvements to part exporting

* Allow download of part category table

* Allow export of stock location data to file

* Improved exporting of StockItem data

* Add cached variant pricing data

- New fields in part pricing model
- Display variant pricing overview in "pricing" tab

* Remove outdated "PART_SHOW_PRICE_HISTORY" setting

* Adds scheduled background task to periodically update part pricing

* Internal prices can optionally override other pricing

* Update js file checks

* Update price breaks to use 6 decimal places

* Fix for InvenTreeMoneySerializer class

- Allow 6 decimal places through the API

* Update for supplier price break table

* javascript linting fix

* Further js fixes

* Unit test updates

* Improve rendering of currency in templates

- Do not artificially limit to 2 decimal places

* Unit test fixes

* Add pricing information to part "details" tab

* Tweak for money formatting

* Enable sort-by-price in BOM table

* More unit test tweaks

* Update BOM exporting

* Fixes for background worker process

- To determine if worker is running, look for *any* successful task, not just heartbeat
- Heartbeat rate increased to 5 minute intervals
- Small adjustments to django_q settings

Ref: https://github.com/inventree/InvenTree/issues/3921
(cherry picked from commit cb26003b92)

* Force background processing of heartbeat task when server is started

- Removes the ~5 minute window in which the server "thinks" that the worker is not actually running

* Adjust strategy for preventing recursion

- Rather than looking for duplicate parts, simply increment a counter
- Add a "scheduled_for_update" flag to prevent multiple updates being scheduled
- Consolidate migration files

* Adds helper function for rendering a range of prices

* Include variant cost in calculations

* Fixes for "has_pricing" API filters

* Ensure part pricing status flags are reset when the server restarts

* Bug fix for BOM API filter

* Include BOM quantity in BOM pricing chart

* Small tweaks to pricing tab

* Prevent caching when looking up settings in background worker

- Caching across mnultiple processes causes issues
- Need to move to something like redis to solve this
- Ref: https://github.com/inventree/InvenTree/issues/3921

* Fixes for /part/pricing/ detail API endpoint

* Update pricing tab

- Consistent naming

* Unit test fixes

* Prevent pricing updates when loading test fixtures

* Fix for Part.pricing

* Updates for "check_missing_pricing"

* Change to pie chart for BOM pricing

* Unit test fix

* Updates

- Sort BOM pie chart correctly
- Simplify PartPricing.is_valid
- Pass "limit" through to check_missing_pricing
- Improved logic for update scheduling

* Add option for changing how many decimals to use when displaying pricing data

* remove old unused setting

* Consolidate settings tabs for pricing and currencies

* Fix CI after changing settings page

* Fix rendering for "Supplier Pricing"

- Take unit pricing / pack size into account

* Extra filtering / ordering options for the SupplierPriceBreak API endpoint

* Fix for purchase price history graph

- Use unit pricing (take pack size into account)

* JS fixes
2022-11-14 15:58:22 +11:00
Miklós Márton
8ceb1af3c3
Add support for recursively delete the stock locations (#3926) 2022-11-14 08:07:16 +11:00
Oliver
60e44700a9
Fix for barcode URL generation (#3924)
* Fix for barcode URL generation

* Refactor the fix entirely

- move the URL generation out of MakeBarcode function
- Improved unit testing - actually render a label template

* Updates for CI

* CI fix
2022-11-13 15:43:51 +11:00
Oliver
44270e064e
Fixes for background worker process (#3922)
- To determine if worker is running, look for *any* successful task, not just heartbeat
- Heartbeat rate increased to 5 minute intervals
- Small adjustments to django_q settings

Ref: https://github.com/inventree/InvenTree/issues/3921
2022-11-12 14:14:54 +11:00
Oliver
6eeb983f1d
Adds 'outstanding task count' to the health API endpoint (#3920) 2022-11-11 15:10:27 +11:00
Oliver
0bb2dd5c3e
Bug fix for PurchaseOrder template (#3913)
* Bug fix for PurchaseOrder template

- PurchaseOrder.is_pending method did not exist
- Thus was evaluating to "false" in the template

* UI fixes
2022-11-10 14:38:56 +11:00
Oliver
57a20be5c3
Remove client-side length validation in form inputs (#3911)
* Remove client-side length validation in form inputs

- Let the server throw an error (so the user sees it)

* Update instances of models.URLField to InvenTreeURLField
2022-11-10 12:51:15 +11:00
Matthias Mair
fb77158496
Add news reader (#3445)
* add model for feed entries

* add task to update feed entries

* Add API routes

* Fix name in model

* rename model

* fix read endpoint

* reduce duplication in NewsFeed API endpoints

* reduce duplicated code

* add ui elements to index

* add missing migrations

* add ressource route

* add new model to admin

* reorder fields

* format timestamp

* make title linked

* reduce migrations to 1

* fix merge

* fix js style

* add model to ruleset
2022-11-10 12:20:06 +11:00
Miklós Márton
f6cfc12343
Add option to recursively delete part categories (#3435)
* Add option to recursively delete part categories

Fixes #3384

* - Added test (broken ATM)
- Refactored parameters to booleanish

* Fix styling issues reported by flake8

* Working on unit testing

* Added on_commit debugging callback

* Separate the recursive part of the deletion into another method
to make sure that the delete operation is performed in a single transaction

* Trying transactions with @transactions.atomic

* Fix flake8 reported issues

* Removed unused debug callback

* Fixed tests for category recursive deletion

* Fix flake reported issues

* Fix flake reported issues
Again

* Remove unrelated formatting changes

* Fixed a part of review comments
2022-11-08 11:57:00 +11:00
Oliver
92260f2059
Add 'barcode_hash' data to more API serializers: (#3906)
* Add 'barcode_hash' data to more API serializers:

- part
- stock location
- supplier part

* Bump API version

* Make 'barcode_hash' fields read-only via the API

* Fix for Part serializer
2022-11-07 22:36:15 +11:00
Oliver
0c0e61432d
Adds a report template tag for dict access (#3905)
* Adds a report template tag for dict access

(cherry picked from commit 7df2f0f878e312a6f94a2c24304643cde91012de)

* Add unit test for new template tag
2022-11-07 21:24:25 +11:00
Oliver
1691f45578
Order editing updates (#3902)
* Add extra setting to guard whether purchase order items can be edited "after the fact"

* Improvements for "extra" purchase order line table

* Similar changes for sales order table

* Improvements for image download helper

(cherry picked from commit 43b0d3ca55)
2022-11-07 13:56:50 +11:00
Oliver
494a016dad
New Crowdin updates (#3898)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-06 13:46:47 +11:00
Oliver
b50a6826ef
Builtin plugins (#3889)
* Allow loading of "builtin" plugins, even if "plugins" are not explicitly loaded

* Updates for 'admin' buttons:

- Make them work like proper links
- Hidden if 'hide_admin_link' customization option is set
- Check for user staff status

* Cleanup rendering of "plugins" display

* Consolidate InvenTree barcode plugins into single plugin class

* Hide "install plugin" button if plugins are not enabled

* Add info message is external plugins are not enabled

* Fixes for loading plugins

- Always load 'builtin' plugins
- Refactor calls to "is_active" at various points in codebase

* Various tweaks

- Improve builtin plugin descriptions
- Spelling fixes

* Adjust plugin detail for builtin plugins

* Simplify barcode plugin class

* Simplify template rendering

* Bug fix for inventree barcode plugin

* Revert "Simplify template rendering"

This reverts commit 3a6755a659.

* Re-re-improve template rendering

- Required as the template has been refactored for both "active" and "inactive" plugins

* Fixing unit tests for barcode plugin

* Ensure that barcode scan actions do not take a "long time":

- Add a default timeout of 0.1s to any POST or GET request in the testing framework
- Can be overridden by calling method if desired

* Display plugin "builtin" status in admin panel

* Fix unit tests for plugin API

* Further unit testing fixes

* Version number tweaks

* Further tweaks for unit testing

* Allow longer timeout for report printing via API

* Increase default timeout for API tests

- Sometimes CPU spike can cause the test to fail :|

* label printing can take a bit longer

* Remove timeout requirement from API tester

- Too variable to be reliable for CI
2022-11-05 01:05:54 +11:00
miggland
fe1b8cbfce
Add metadata model to Company (#3895)
* Add Metadata mixin to Company model

* Add migration file

* Lint

* Fixes due to style

* Syntax error

* Lint

* as this exposes a new endpoint to the API, increment the API version number with a brief description:
2022-11-03 22:21:16 +11:00
Oliver
278e9cfdc1
New Crowdin updates (#3874)
* 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

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.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>
2022-11-03 08:37:03 +11:00
Oliver
652f4aa7c4
Translatable strings for plugins (#3893) 2022-11-02 09:22:29 +11:00
Oliver
c7a2def353
Allow editing of extra line items in order table (#3888)
* Allow editing of extra line items in order table

* Allow addition of extra line items even if order is not "pending"

* Allow addition and editing of extra line items for sales orders

* javascript linting
2022-11-02 07:32:14 +11:00
Oliver
db45b6f9dc
Location barcode actions (#3887)
* Reorder action buttons for stock location

* Tweak position of "New Location" button

* Tweak loaction of "New Category" button for part category page

* Working on skeleton for new barcode dialog

* Scan location into location

* Add configurable input delay for processing barcode scan data
2022-11-01 22:18:10 +11:00
Miklós Márton
9beefd09f7
Remove special character restrictions in parameter template names (#3883)
* Remove special character restrictions in parameter template names

Fixes #3852

* Added migration
2022-10-31 11:28:49 +11:00
Oliver
5922d9fbff
Fix mode switching for part category table (#3881)
* Fix mode switching for part category table

* Fix for StockLocation table
2022-10-30 15:04:48 +11:00
Oliver
3dd92416fe
Fix for label printing plugin hook (#3879) 2022-10-29 22:45:58 +11:00
Oliver
55c8b73b0a
Floating point API bug (#3877)
* Add unit tests for internalpricebreak

- Exposes an existing bug

* Ensure that rounding-decimal and prices are rounded correctly

- Force remove trailing digits / reduce precision
2022-10-29 14:18:19 +11:00
Matthias Mair
5263ccdca3
Add checks for url changes #3864 (#3869) 2022-10-29 09:39:04 +11:00
Oliver
e6461929b0
Link to API documentation in "about" window (#3871) 2022-10-28 18:16:44 +11:00
Oliver
61c6054049
Part name validation fix (#3870)
* Check that part name format is actually valid

* Expand exception handling when generating part "full_name"

* Do not enforce client-side sanitization of form data

- Form data sanitization is now handled server side
2022-10-28 15:56:16 +11:00
Oliver
1c17977f4d
New Crowdin updates (#3853)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-28 09:07:33 +11:00
Oliver
cff4d9745b
Serial increment fix (#3863)
* Add extra unit tests

* Fix logic errors when generating groups of serial numbers

* Fixes for unit tests
2022-10-27 14:00:18 +11:00
Matthias Mair
b13e0c3138
[BUG] Confirmation Email uses local ip for link URL (#3829)
Fixes #3827
2022-10-26 13:08:15 +11:00
Oliver
13ef7d6910
Enable build order search in quick-search window (#3856)
* Add user setting to enable search preview for build orders

* Add search results entry
2022-10-26 09:57:30 +11:00
Oliver
fe56a046cc
Fix bug which prevented loading of test results (#3855) 2022-10-26 09:57:22 +11:00
Miklós Márton
f3dee187bc
Make PartCategories to be filterable by name and description (#3854)
* Make PartCategories to be filterable by name and description

* Bump API version
2022-10-26 09:46:28 +11:00
Oliver
13cfadaf29
Prevent assigning of empty barcode data (#3851)
* Prevent assigning of empty barcode data

* Make similar check for barcode scan endpoint

* Fixes for unit tests
2022-10-26 09:25:27 +11:00
Oliver
824a44a486
Improvements for CI tests (#3850)
* Improvements for CI tests

* Add delay between retries

* Reduce tiemeout for request

* Change exception type we are looking for
2022-10-25 21:53:44 +11:00
Oliver
c07d5207e0
New Crowdin updates (#3834)
* 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>
2022-10-25 13:27:09 +11:00
Oliver
2843799912
Fix decimal rendering in progress bars (#3849) 2022-10-25 10:58:18 +11:00
Matthias Mair
d2049a1cd0
[BUG] reverse proxy (#3847)
Add more docs regarding headers
Fixes #3807
2022-10-25 09:32:54 +11:00
Oliver
a898ebce40
Fix email notification setting (#3832)
* Coerce setting value to a boolean

* Ignore inactive users when sending notification emails

* Only send UI notifications to active users

* Fixes for unit tests
2022-10-22 18:56:38 +11:00
Oliver
c120de90ae
Build table improvements (#3833)
* Add extra columns to build order table

* Optimize build table update

* Improve loading speed of 'test results' in build output table
2022-10-22 18:56:23 +11:00
Oliver
9d39d5b00f
Improve redraw speed of build allocation table (#3831)
- Reload table data in one go, rather than one row at a time
- Reduces redraw time (in one example) from ~4s to ~0.05s
2022-10-22 14:16:55 +11:00
Oliver
121d68aa87
Bom table load fix (#3826)
* Optimize loading of BOM table

- Do not use updateByUniqueId (inefficient!)
- Instead, process and reload the entire table

* Optimize part parameter table

* Revert testing change

* javascript linting
2022-10-21 17:05:10 +11:00
Oliver
4ca2aa6cd8
Housekeeping Settings (#3821)
* Add new settings for controlling how long logged data is retained

* Update existing tasks to use new user-configurable values

- Also add a task to delete failed task logs

* Add background task to remove old notification logs
2022-10-20 23:27:09 +11:00
Oliver
c3f6b75b30
Attachment bug fix (#3818)
* Prevent name check on null attachment file

(cherry picked from commit c4ed1e23a01f278d696c2853337bdde0a682c6c5)

* Unit testing for uploading attachments via API

(cherry picked from commit 592548065f7b69f58b8aaaaea506e3ec653a63df)
2022-10-20 22:43:14 +11:00
Oliver
811e3ea299
New Crowdin updates (#3795)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-19 10:41:29 +11:00
Oliver
906ae218aa
[Plugin] Allow custom plugins for running validation routines (#3776)
* Adds new plugin mixin for performing custom validation steps

* Adds simple test plugin for custom validation

* Run part name and IPN validators checks through loaded plugins

* Expose more validation functions to plugins:

- SalesOrder reference
- PurchaseOrder reference
- BuildOrder reference

* Remove custom validation of reference fields

- For now, this is too complex to consider given the current incrementing-reference implementation
- Might revisit this at a later stage.

* Custom validation of serial numbers:

- Replace "checkIfSerialNumberExists" method with "validate_serial_number"
- Pass serial number through to custom plugins
- General code / docstring improvements

* Update unit tests

* Update InvenTree/stock/tests.py

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

* Adds global setting to specify whether serial numbers must be unique globally

- Default is false to preserve behaviour

* Improved error message when attempting to create stock item with invalid serial numbers

* Add more detail to existing serial error message

* Add unit testing for serial number uniqueness

* Allow plugins to convert a serial number to an integer (for optimized sorting)

* Add placeholder plugin methods for incrementing and decrementing serial numbers

* Typo fix

* Add improved method for determining the "latest" serial number

* Remove calls to getLatestSerialNumber

* Update validate_serial_number method

- Add option to disable checking for duplicates
- Don't pass optional StockItem through to plugins

* Refactor serial number extraction methods

- Expose the "incrementing" portion to external plugins

* Bug fixes

* Update unit tests

* Fix for get_latest_serial_number

* Ensure custom serial integer values are clipped

* Adds a plugin for validating and generating hexadecimal serial numbers

* Update unit tests

* Add stub methods for batch code functionality

* remove "hex serials" plugin

- Was simply breaking unit tests

* Allow custom plugins to generate and validate batch codes

- Perform batch code validation when StockItem is saved
- Improve display of error message in modal forms

* Fix unit tests for stock app

* Log message if plugin has a duplicate slug

* Unit test fix

Co-authored-by: Matthias Mair <code@mjmair.com>
2022-10-18 23:50:07 +11:00
Matthias Mair
269b269de3
Fix task register (#3805)
* fix schedule registration

* add collection step for tasks

* make tasks register configurable

* extend docs

* Also run InvenTree setup in testing

* fix import loading method

* fix wrong task registration

* do not test

* do only distinct testing

* ignore import error for coverage
2022-10-18 16:54:10 +11:00
Matthias Mair
3956a45c48
Add settings for backups (#3806)
Fixes #3794
2022-10-18 12:38:57 +11:00
Matthias Mair
3bd64e9098
Raise error if version fails (#3792)
* add comment where feature should be

* add triggermethod for superusers

* Add plugin version warning

* switch to simple error logging

* switch import mechanism

* move import down

* reintroduce db notifications

* adding mising import

* add db entry

* Only log to DB if plugin was regsitered

* fix merge

* remove db logging
2022-10-18 09:55:56 +11:00
Matthias Mair
9cfbe1061d
[FR]Unit test for Schema allowance (#3538)
* [FR]Unit test for Schema allowance
Fixes #3420

* move schema loding into a runtime obj
2022-10-18 09:38:43 +11:00
Oliver
c1064906d6
Revert "Switch to registry for tasks" (#3803)
* Revert "Switch to registry for tasks (#3790)"

This reverts commit 0bea2c7b56.

* Remove decorator
2022-10-17 23:20:36 +11:00
Matthias Mair
0bab40fe88
Plugin API refactor (#3637)
* out-of-scope: refactor plugin lookup

* lookup by settings (runtime not predefined)

* Add registry function to set state of plugin quickly

* Ensure plugin is active before assertations
2022-10-17 22:08:28 +11:00
Matthias Mair
0b0594c7ff
Reduce duplication in plugin testing (#3800)
* move plugin loading into mixin

* move to mixin

* remove unneeded test step?

* fix merge
2022-10-17 20:29:54 +11:00
Matthias Mair
b456a15dfc
Switch backup action to new schedule syntax (#3801) 2022-10-17 11:26:35 +11:00
Matthias Mair
0bea2c7b56
Switch to registry for tasks (#3790)
* Add general registering functions
Fixes #3787

* switch over to new method

* move to static type

* fix unclear naming
2022-10-17 09:53:59 +11:00
Matthias Mair
182bc29053
Add db an media backups (#3783)
* [FR] Add backup into inventrees lifecycle
Fixes #3778

* Add env to testing enviros

* block backup from running app commands

* Add more commands

* fix postgres version

* Update used env

* add daily task to run backups

* add installer changes
2022-10-17 00:09:31 +11:00
Matthias Mair
2800d843e0
Add package-based install method (#3743)
* Add runtime

* add procfile

* add settings for packaging

* use heroku buildpack

* maybe a hash works?

* try brnach instead of tag or hash

* remove reference alltogether

* maybe this syntax?

* switch back to normal buildpack

* and heroku again

* try official sample

* maybe a tar?

* just git clone?

* lower version

* lower version

* switch of settings

* try this again

* maybe install python before?

* no sudo?

* just build for ubuntu?

* set runtime lower and use custom buildpack

* remove initial command

* add release command

* do not collect static while releaseing

* switch to custom backend

* Update .pkgr.yml

* new backend

* upgrade runtime version

* consolidate env

* update python version

* add debian as target

* fix os name

* extend requirements

* remove release command

* remove ssl dep

* add worker command

* add scripts

* debug listing

* make scripts executable

* use python3

* add python install

* add python as dep

* debug step

* switch to app home

* set paths right

* check local command

* remove path

* update path

* add sample install script

* more debugging

* dbg msg

* more enviroment stuff

* more dbugging

* more defined install script

* reduce function

* add debug script

* and more

* remove before

* reduce lines

* cleanup deps

* maybe this way?

* rm "

* rename env

* fix files

* use dot annotation

* ls

* add msgs

* move activation

* ref?

* use source

* use point annotation

* remove activate

* create env and add it to the enviroment

* use full paths

* move python init

* use modern python

* use version numbers for ubuntu

* add default env vars ( for now)

* use export

* use shorthand command

* add more variables

* use apphome reference in paths

* add wasyprint dependencies

* also use wheels

* add gettext for comiling messages

* add nginx setting

* remove postgres from required stack

* refactor fiel configs

* make sure parent dirs exsist

* add wheels

* move python setup again

* update packe name

* update gunicron command

* move to config

* try cleaner procfile

* use python 3 wheels

* update service def

* Add enviroment settings to packaging

* restart nginx

* remove slack

* change nginx config name

* fix styles

* set permissions on update

* Add single line install to README

* move nginx names back

* use production sample as nginx config

* fix sed statement

* cleaner nginx setup

* keep configs in config file instead of packaging index

* fix sed connamds to remove spaces

* reintroduce spaces

* Also disable debug mode

* fix file permissions

* remove unneeded commands

* readd missing spaces

* add admin user generation

* Show public ipadress in final message

* small cleanups

* Add log to setup

* remove logging

* remove logging parts

* chown all dirs

* run update command as right user already

* set path before running command

* fix permission setup

* switch right assignment

* run commands with sudo

* pass in envs

* preserve only selected enviroment

* show enviroment variables

* silence curl

* fix envs

* clean up final message

* move nginx file to variable

* make admin creation conditional

* a bit more overview for setup variables

* test if nginx is available

* unlink instead of delet

* clean up functions

* well that was dumb

* ok double dumb - now i tested it

* use config for admin generation

* fix logic

* show value - not call it

* switch functions to sh

* fix syntax

* add admin data to exposed envs

* remove keeping of admin pwd

* switch to true/false

* make nginx file location configureable

* use gunicorn instead

* fix syntax

* set base dir

* move env to seperate function

* Also use/write database settings

* use conf values if available

* format sh

* update passed envs

* fix dep

* enable installing extra packages via env (ie database backends)

* ann more logging steps

* add more debuggin steps

* get local envs

* add more debug and reorder

* more code for testing

* fix call

* Add debug msg

* turn install quiet

* fix syntax

* reduce debugging

* add log step

* add datestamp

* add marker to inv execution

* fix syntax

* add codeowner
2022-10-16 10:14:18 +11:00
Oliver
c6709a7055
New Crowdin updates (#3777)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-16 01:24:04 +11:00
Oliver
99d822ecdb
Check user permissions before linking or un-linking barcodes (#3772)
* Check user permissions before linking or un-linking barcodse

* Bump API version

* Permission fixes for unit tests

* Fix permission issues

* Unit test fixes
2022-10-13 12:14:36 +11:00
Matthias Mair
366475f783
Language settings not saved after session end (#3779)
Fixes #3722
2022-10-13 10:56:52 +11:00
Oliver
193b69eeb5
Adjust display of extra "add bom item" button at bottom of BOM table (#3773) 2022-10-12 16:34:57 +11:00
Oliver
9002a1e5b3
New Crowdin updates (#3765)
* 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>
2022-10-12 14:07:15 +11:00
Oliver
1c6eb8096f
Display build output status code (#3771)
* Display build output status code

* JS linting
2022-10-12 09:23:41 +11:00
Oliver
86b72549a2
Plugin load fix (#3768)
* Catch potential secondary PackageNotFoundError

* Plugin template tweaks
2022-10-11 23:15:24 +11:00
Oliver
c146256170
Allow auto-loading of plugins in certain conditions (#3762)
Ref: 52af196694
2022-10-09 09:07:51 +11:00
Oliver
67740581fe
New Crowdin updates (#3756)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-09 09:06:59 +11:00
Oliver
cc68cd83a9
Bug fix for boolean settings (#3760)
* Fix for boolean settings

- Ensure "user" attribute is provided
- Fix for *all* boolean user settings

* Refactor boolean setting into separate template

* Fix order-of-operations

* Fix settings for specific plugins
2022-10-08 23:46:08 +11:00
Richard Lawson
fbc99257bd
Fixes #3514 (#3754)
Added BOM button to bottom of Bill of Materials table on part detail view
2022-10-07 13:23:53 +11:00
Oliver
5d6423fb64
UI fixes for barcode actions (#3751)
* Fix "scan items into location" dialog function

* More barcode fixes
2022-10-07 00:18:38 +11:00
Oliver
d194aef79e
Adds 'status_text' functions to models (#3752)
- Convert status codes into text representation (translated)
- Useful for template rendering
2022-10-07 00:18:11 +11:00
Bben
cfff5ea264
Last Connection date for user in admin panel (#3747)
* Last Connection date for user in admin panel

display last connection for each user in user admin panel.
add the date at the end of the tab

* Update admin.py

* Update admin.py
2022-10-06 22:35:20 +11:00
Oliver
61a6ecdcfa
New Crowdin updates (#3738)
* 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

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.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>
2022-10-03 10:04:59 +11:00
Oliver
52071f2c3f
Show placeholder for null IPN values in "stock" table (#3737)
- Otherwise can display the text "null"
2022-10-01 16:08:32 +10:00
Oliver
1f2859d8c9
Bug fix for stock adjustment actions (#3735)
* Check for empty strings as well as null values

* JS linting
2022-09-30 15:08:38 +10:00
Oliver
8bcf72fbb2
Barcode scan fix (#3727)
* Fix barcode scanning in web interface

* Improve error handling for barcode scan dialog

* JS linting
2022-09-28 10:28:39 +10:00
Matthias Mair
7568d23670
APIMixin: Add flag for passing data as json (#3635)
* out-of-scope: Add flag for passing data as json

* switch to json/data for APImixin

* fix testing sytax

* add missing coverage

* fix test
2022-09-28 08:56:03 +10:00
Matthias Mair
dce10072ef
Add typecasting to certain settings (#3726)
* [FR] Add typecasting to certain settings
Fixes #3725

Add typecasting

* Add types to:
- INVENTREE_CACHE_PORT
- INVENTREE_EMAIL_PORT
- INVENTREE_LOGIN_CONFIRM_DAYS
- INVENTREE_LOGIN_ATTEMPTS

* cast DB_PORT to int

* Add logging statements
2022-09-28 08:53:22 +10:00
Oliver
fbde70d531
Bug fix for multi-level display in BOM table (#3720)
- Multi-level BOM loading was broken
- Using the wrong column name for 'treeShowField'
- Also adds functionality to auto-expand sub-part when loading
2022-09-27 13:30:25 +10:00
Oliver
bfbafb9912
New Crowdin updates (#3707)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-09-27 12:52:07 +10:00
Oliver
1b421fb59a
Adds 'consumable' field to BomItem model (#2890)
* Adds 'consumable' field to BomItem model

* Add consumable field to API

* Consumable items always count as "allocated" for a build

* Add new BOM fields to BOM item checksum calculation

* Display 'consumable' status in BOM table

* Fix order of database migrations

* Update unit tests

* Fix for BOM table

* Remove "infinite" field from StockItem model

- Not used anywhere for functionality
- Hidden from the user
- Now replaced by the "consumable" concept in the BuildOrder model

* Update build order allocation table display

* Prevent auto-allocation of stock to consumable BOM items

* Ignore consumable BOM items when allocating stock to a build order

* Reimplmement "footer" row for BOM table

* Fix "can_build" calculation

- Ignore "consumable" BOM items

* Unrelated typo fix

* Tweak BOM table

* More visual tweaks to BOM table

* Add unit test for consumable field
2022-09-24 23:45:56 +10:00
Oliver
a7e4d27d6d
Add user setting for configuring table string length (#3715) 2022-09-24 13:00:12 +10:00
Matthias Mair
5a08ef908d
Add sanitation for SVG attachments (#3701)
* add svg parser

* move svg sanitation out into own file

* move allowed elements out

* add test for svg sanitation

* make allowed elements configureable
2022-09-23 16:56:29 +10:00
Oliver
db3d9b551a
Cleanup javascript console log messages (#3706) 2022-09-22 09:30:04 +10:00
Oliver
829a9d8311
Parameter ordering fix (#3704)
* Hard-code URL fforr loadPartParameterTable function

* Improve API efficiency for including parameter data in Part query

* Fix loading of part parameter data into table
2022-09-21 23:31:24 +10:00
Oliver
33326f6eaf
Update CompleteBuildOrder form (#3702)
- Load required data dynamically via the API
- Hide form fields according to dynamic data
- Show warnings according to dynamic data
2022-09-21 18:19:31 +10:00
Oliver
2a846c7030
Only limit length of link if specified (#3700) 2022-09-21 14:01:30 +10:00
Oliver
2129eecf24
New Crowdin updates (#3693)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-09-21 12:51:28 +10:00
Oliver
e6225bd8b5
Form field sanitization (#3699)
* Sanitize input string when using select2 search on forms

* CSS tweaks for images in card view
2022-09-21 11:59:54 +10:00
Oliver
04b3f022a0
Path name bug fix (#3694)
* bug fix: Ensure that child tree items update their pathstring when requried

* Add unit tests for fix

* Unit test fix

* Tweak for unit test
2022-09-20 19:02:08 +10:00
Oliver
06ba4099b3
Short strings (#3695)
* Adds a helper function to cut the "middle" out of a string which is too long

* Remove duplicated JS function

* Adds helper function for wrapping a simple tooltip div around a HTML element

* Update part table with shortened strings

* Update PartCategory table

* Update StockLocation table

* Update to Stock table

* Update build table

* JS linting
2022-09-20 18:17:22 +10:00
Samuel Caldwell
24f2338d77
Update config_template.yaml (#3689)
I removed the space characters preceding 'static_root:' in line 132 and 'media_root:' in line 129 as they cause a YAML parsing error if not removed when uncommenting these options.
2022-09-19 10:40:22 +10:00
Oliver
187707c892
Barcode Refactor (#3640)
* define a simple model mixin class for barcode

* Adds generic function for assigning a barcode to a model instance

* StockItem model now implements the BarcodeMixin class

* Implement simple unit tests for new code

* Fix unit tests

* Data migration for uid field

* Remove references to old 'uid' field

* Migration for removing old uid field from StockItem model

* Bump API version

* Change lookup_barcode to be a classmethod

* Change barcode_model_type to be a class method

* Cleanup for generic barcode scan and assign API:

- Raise ValidationError as appropriate
- Improved unit testing
- Groundwork for future generic implementation

* Further unit tests for barcode scanning

* Adjust error messages for compatibility

* Unit test fix

* Fix hash_barcode function

- Add unit tests to ensure it produces the same results as before the refactor

* Add BarcodeMixin to Part model

* Remove old format_barcode function from Part model

* Further fixes for unit tests

* Add support for assigning arbitrary barcode to Part instance

- Simplify barcode API
- Add more unit tests

* More unit test fixes

* Update unit test

* Adds generic endpoint for unassigning barcode data

* Update web dialog for unlinking a barcode

* Template cleanup

* Add Barcode mixin to StockLocation class

* Add some simple unit tests for new model mixin

* Support assigning / unassigning barcodes for StockLocation

* remove failing outdated test

* Update template to integrate new barcode support for StockLocation

* Add BarcodeMixin to SupplierPart model

* Adds QR code view for SupplierPart

* Major simplification of barcode API endpoints

- Separate existing barcode plugin into two separate classes
- Simplify and consolidate the response from barcode scanning
- Update unit testing

* Yet more unit test fixes

* Yet yet more unit test fixes
2022-09-15 14:14:51 +10:00
Oliver
7645492cc2
Adds callback for clipboard button (#3678) 2022-09-14 17:03:51 +10:00
Oliver
3f31d90666
Add support for Danish (#3675) 2022-09-14 15:00:37 +10:00
Oliver
6e36ae5f74
Fix purchase order report template (#3674) 2022-09-14 14:59:08 +10:00
Oliver
b306d2a34a
New Crowdin updates (#3646)
* 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

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.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>
2022-09-09 14:42:52 +10:00
Oliver
1b479ec0cc
PO: Use supplier currency when creating a new extra line (#3666) 2022-09-09 12:43:07 +10:00
Oliver
c4db308dce
Display more units (#3664)
* <

* Display units in "used in" table

* Display units in BOM table

* Include units in the 'available' column of BOM table
2022-09-08 16:26:07 +10:00
Oliver
875dda7e59
Null units fix (#3663)
* Hide units on part page if units are null

* Hide null units in stock table

* Hide null units in supplier part table

* Hide null units in part tables

* Template cleanup

* Unit test fix
2022-09-08 15:18:43 +10:00
Oliver
b827f14bf6
Pack quantity improvements (#3661)
* Specify serializer label

* Add units to part grid view

* improve display of stock units in part table

* Add units display to stock on part page

* Display units in supplier part table

* Simplify stock quantity display in stock table
2022-09-08 13:44:53 +10:00
Oliver
2242088f90
Add extra information callout to stock item display (#3658) 2022-09-08 10:20:35 +10:00
Oliver
198ac9b275
Feature: Supplier part pack size (#3644)
* Adds 'pack_size' field to SupplierPart model

* Edit pack_size for SupplierPart via API

* Display pack size in supplier part page template

* Improve table ordering for SupplierPart table

* Fix for API filtering

- Need to use custom filter class

* Adds functionality to duplicate an existing SupplierPart

* Bump API version number

* Display annotation of pack size in purchase order line item table

* Display additional information in part purchase order table

* Add UOM to purchase order table

* Improve receive items functionality

* Indicate quantity which will be received in modal form

* Update the received quantity as the user changes the value

* Take  the pack_size into account when receiving line items

* Take supplierpart pack size into account when receiving line items

* Add "pack size" column to purchase order line item table

* Tweak supplier part table

* Update 'on_order' queryset annotation to take pack_size into account

- May god have mercy on my soul

* Adds a unit test to validate that the on_order queryset annotation is working as expected

* Update Part.on_order method to take pack_size into account

- Check in existing unit test also

* Fix existing unit tests

- Previous unit test was actually in error
- Logic for calculating "on_order" was broked

* More unit tests for receiving items against a purchase order

* Allow pack_size < 1

* Display pack size when adding / editing PurchaseOrderLineItem

* Fix bug in part purchase order table

* Update part purchase order table again

* Exclude notificationmessage when exporting dataset

* Also display pack size when ordering parts from secondary form

* javascript linting

* Change user facing strings to "Pack Quantity"
2022-09-08 09:49:14 +10:00
Oliver
890c998420
Fix part link in stock table (#3657) 2022-09-08 09:49:03 +10:00
Oliver
ea60cdc6a8
Fix splash screen for maintenance mode 503 page (#3651) 2022-09-07 00:04:06 +10:00
Oliver
639b9c302f
Add explicit reference_int values for order fixtures (#3645) 2022-09-05 21:37:59 +10:00
Oliver
47c7a5e0eb
New Crowdin updates (#3620)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-09-05 20:08:28 +10:00
Oliver
d7a8d6dd5e
Fix report permissions (#3642)
- Add report model permissions to correct role groups
2022-09-05 14:14:59 +10:00
Oliver
fd789d28db
Add confirmation field for incomplete purchase orders (#3615)
* Add confirmation field for incomplete purchase orders

* Add similar functionality for SalesOrder

- Complete form is now context sensitive
- Allow user to specify if order should be closed with incomplete lines

* Update API version

* JS linting

* Updated unit tests
2022-09-05 14:00:41 +10:00
Matthias Mair
b7d0bb9820
out-of-scope: Add decorator to not require auth (#3633) 2022-09-05 13:03:38 +10:00
Matthias Mair
abf133384b
Optimisations for editable installs of plugins (#3634)
* out-of-scope: add function to check if a package is editable

* out-of-scope: move to included meta toolset for metadata discovery

* out-of-scope: make lookup safe for editable installs
2022-09-05 13:03:26 +10:00
Oliver
2601cf0279
Add search to build output table (#3639) 2022-09-03 11:44:01 +10:00
Matthias Mair
eaaf98f9d4
out-of-scope:update settings value lookup to include typ (#3636) 2022-09-02 16:51:16 +10:00
Oliver
23edd79431
Fix sales order table refresh (#3627)
- Refreshing the SalesOrder table would actually reload the PurchaseOrder table
2022-09-01 12:34:43 +10:00
Oliver
0150afd7a7
Fix default ordering for build orders (#3626)
- Order by reference
- Show "newer" references first
2022-09-01 12:25:08 +10:00
Oliver
7f5f101323
Remove broken URL (#3623)
- subcategories template was removed a long time ago
2022-09-01 07:36:35 +10:00
Oliver
2392c8adee
New Crowdin updates (#3608)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-08-29 21:23:52 +10:00
Oliver
993f36c98f
Add missing 'remove stock' action (#3610)
* Add missing 'remove stock' action

* Add some unit tests for the stock item view
2022-08-25 20:07:01 +10:00
Oliver
8fa67b8671
Sanitize search text in bootstrap table (#3609)
* Sanitize search text in bootstrap table

* Clean search query on the server side before rendering search page template

- Refactor existing sanitizing code into functions

* Make ASCII and Unicode cleaning optional
2022-08-25 14:10:39 +10:00
Oliver
e8621a97bc
Part parameter update (#3605)
* Adds 'description' field to PartParameterTemplate model

* Add 'description' field to API, update settings table

* Bump API version

* Allow more characters in PartParameterTemplate name
2022-08-25 07:33:36 +10:00
Oliver
6adfc91c5c
StockItem page template fix (#3601)
- Allow damaged / quarantined items to be adjusted
- Fix template rendering logic
2022-08-24 16:37:03 +10:00
Oliver
349bbb8545
Improve filter for auto-allocation of build item (#3603) 2022-08-24 15:37:58 +10:00
Oliver
978d18d01b
Open labels and reports in a new window (#3602) 2022-08-24 15:37:51 +10:00
Oliver
69c3e5e222
Remove hidden characters from form fields (#3597)
* Remove control and non-printable characters from form fields (server side)

* Update regex to properly filter out control characters only

* Add regex lib to requirements flie

* Fix regex in javascript (client side)

* add required unicode flag
2022-08-24 15:12:02 +10:00
Oliver
2dd5a43444
Floating point formatting for BOM table (#3600) 2022-08-24 14:16:02 +10:00
Oliver
528da731f2
Sanitize search input (#3591)
* Sanitize search input

- Remove ASCII and unicode control characters

* js linting

* Simplified regex

* Sanitize modal form fields also
2022-08-24 11:57:53 +10:00
Oliver
12509203d6
Bug fix for loading asset files in reports (#3596)
- Pathlib does not play well with SafeString
- Enforce string type' when loading an asset file
- Add unit tests
2022-08-24 11:26:38 +10:00
Oliver
a3392ea4b1
New Crowdin updates (#3583)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-08-23 10:04:13 +10:00
Oliver
ccab177f54
Add a 'zero stock' threshold line to the part scheduling tab (#3587) 2022-08-22 14:26:33 +10:00
Oliver
9c79333efd
Improve "overdue" display for part purchase order table (#3586) 2022-08-22 14:02:58 +10:00
Oliver
bee5b6d124
Display "on order" quantity in build order allocation table (#3585) 2022-08-22 12:24:13 +10:00
Oliver
b886e54709
Build API improvements (#3581)
* Improve build order lookup

* Query efficiency improvements

* Lazy load build allocation table

* API defaults ensure consistent behaviour
2022-08-19 17:16:38 +10:00
Oliver
89d5df4f1e
Inherited BOM fix (#3579)
* Fix logic for get_used_in_bom_item_filter

* Include scheduling information for inherited BOMs
2022-08-19 12:21:38 +10:00
Oliver
c8de2efd9d
Fix dimensions for label templates (#3578)
- Disable localization in certain areas
- Different localization settings could mess with label generation
2022-08-19 11:57:33 +10:00
Oliver
4c22110c76
New Crowdin updates (#3563)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-08-19 11:35:38 +10:00
Oliver
1ec9795ede
Adds option for duplicating an existing purchase order (#3567)
* Adds option for duplicating an existing purchase order

- Copy line items across

* Update API version

* JS linting

* Adds option for duplication of extra lines

* Decimal point rounding fix

* Unit tests for PO duplication via the API
2022-08-19 11:34:37 +10:00
Oliver
868697392f
Include variant stock in part table (#3573) 2022-08-19 08:39:54 +10:00
wolflu05
efafa3960b
fix: invalid chas in cache key (#3574) 2022-08-19 07:56:03 +10:00