Commit Graph

14757 Commits

Author SHA1 Message Date
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
c8e8991cf5
Fix for stable branch push (#3619)
* Fix for stable branch push

* Ensure we don't update stable to an older release
2022-08-30 14:27:55 +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
Oliver
7384a85bdb
Fix bug in recent part scheduling table (#3566)
* Gotta make a variable to reference a variable

* Fix scaling issues

* Hey, it's only a suggestion

* Fix quantity display in build order table

* Logic fix for destroying / refreshing chart

* Better handling of edge cases

* Fix issue with "undefined" labels

* Speculative should be a question mark
2022-08-18 15:12:59 +10:00
Oliver
b70a0164ae
Add ability to quickly duplicate build orders (#3565)
* Adds ability to easily duplicate an existing build order

* Refactor purchase order editing code
2022-08-18 12:44:47 +10:00
Oliver
32b11ec5af
Scheduling improvements (#3564)
* Handle case where initial API call fails

* Error if scheduling fails to retrieve

* Visual improvements for scheduling graph:

- Fixes for vertical scales
- Add "minimum stock level" line

* Refactor / improve query for list of BOM items a part can exist in

* Remove stock column from "substitute part" dialog

- Stock quantity no longer available in this serailizer

* Add a button to reload part scheduling information

* Add extra information to part scheduling API

- Include "speculative" quantity drawdown for build orders

* Add table of scheduling data

* Improved chart display

- Adds "minimum" and "maximum" expected values
- Adds table of scheduling information

* Bump API version

* Improve table rendering

* Improve axis scaling

* Add ability to dynamically refresh schedling data

* JS linting

* JS fix
2022-08-18 11:36:02 +10:00
Oliver
1d4a20d1d4
New Crowdin updates (#3551)
* 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-17 16:24:22 +10:00
Oliver
d9350877c6
Update 'stock' icons for part table (#3561)
- Display on-order and building quantity as icons
- Simplified display logic
- Do not hide information in certain circumstances.
2022-08-17 14:38:37 +10:00
Matthias Mair
0a57f9d459
Fix: Broken subfolder tests in postgres/docker CI in master (#3559)
* disable failing tests for sanity check

* run postgrest too

* only run problematic tests

* make paths relative

* refactor to reduce duplicate code

* remove testing restrictions again
2022-08-17 09:10:56 +10:00
wolflu05
b9f83eefc8
Feature/icons for PartCategory and StockLocation (#3542)
* Added icon to stock location

- added `icon` field to `stock_stocklocation` model
- added input field to stock location form
- added icon to breadcrumb treeview in header
- added icon to sub-locations table
- added icon to location detail information
- added `STOCK_LOCATION_DEFAULT_ICON` setting as default

* Added icon to part category

- added `icon` field to `part_partcategory` model
- added input field to part category form
- added icon to breadcrumb treeview in header
- added icon to sub-categories table
- added icon to category detail information
- added `PART_CATEGORY_DEFAULT_ICON` setting as default

* Added `blocktrans` to allowed tags in ci check

* fix: style

* Added `endblocktrans` to allowed tags in ci check

* fix: missing `,` in ci check allowed tags script

* Removed blocktrans from js and fixed style
2022-08-16 21:51:55 +10:00
Matthias Mair
1b76828305
Plugin framework updates (#3535)
* refactor entrypoint into helpers

* Add lookup by metadata
This is geared towards plugins packaged in pkgs that differ in name from their top module

* Make module lookup predictable in changing pkg-envs

* remove no coverage from plugin packages

* ignore coverage for production loadin

* refactor plugin collection - move assigment out

* do not cover fs errors

* test custom dir loading

* test module meta fetcher

* add a bit more safety

* do not cover sanity checkers

* add folder loading test

* ignore again for cleaner diffs for now

* ignore safety catch

* rename test

* Add test for package installs

* fix docstring name

* depreciate test for now

* Fix for out of BASE_DIR paths

* ignore catch

* remove unneeded complexity

* add testing for outside folders

* more docstrings and simpler methods

* make call simpler

* refactor import

* Add registry with all plugins

* use full registry and make simpler request

* switch path properties to methods

* Add typing to plugin

* Add a checker fnc for is_sample

* Add sample check to admin page

* Make file check a cls

* more cls methods

* Add setting for signature cheks
Fixes #3520

* make property statements simpler

* use same key in all dicts

* Use module name instead of NAME
Fixes #3534

* fix naming

* fix name

* add version checking
Fixes #3478

* fix formatting and typing

* also save reference to full array

* do not cover as we turn on all plugins

* add test for check_version

* Add version e2e test

* make test save

* refactor out assignment

* safe a db reference first

* docstring

* condense code a bit

* rename

* append logging

* rename

* also safe db reference to new object

* docstrings, refactors, typing

* fix key lookup
2022-08-16 16:10:18 +10:00
Matthias Mair
188ddc3be3
Improve plugin testing (#3517)
* refactor entrypoint into helpers

* Add lookup by metadata
This is geared towards plugins packaged in pkgs that differ in name from their top module

* Make module lookup predictable in changing pkg-envs

* remove no coverage from plugin packages

* ignore coverage for production loadin

* refactor plugin collection - move assigment out

* do not cover fs errors

* test custom dir loading

* test module meta fetcher

* add a bit more safety

* do not cover sanity checkers

* add folder loading test

* ignore again for cleaner diffs for now

* ignore safety catch

* rename test

* Add test for package installs

* fix docstring name

* depreciate test for now

* Fix for out of BASE_DIR paths

* ignore catch

* remove unneeded complexity

* add testing for outside folders

* more docstrings and simpler methods

* make call simpler
2022-08-16 13:09:48 +10:00
miggland
858d48afe7
Fix bug in exporting records (#3545)
Introduced in #3392
2022-08-16 12:09:00 +10:00
Matthias Mair
8ef5d0a159
update links to point to our specific projects / workspaces (#3548) 2022-08-16 07:55:39 +10:00
Matthias Mair
92fb40e8fc
moves imports to enable startup without django beeing loaded (#3547)
Fixes #3546
2022-08-16 07:52:39 +10:00
Jacob Siverskog
d102a87eff
fix typo in variable name (#3541)
this fixes broken e-mail from configuration.
2022-08-15 23:10:59 +10:00
Matthias Mair
e9b8c15c56
refactor custom file lookup (#3536)
* refactor custom file lookup

* Rename function
2022-08-15 22:28:34 +10:00
Oliver
b0e91e7068
Update bleach clean function (#3503)
* Update bleach clean function

- Invalid tags are stripped out
- & > < characters are accepted

* Throw an error if any field contains HTML tags

* Update unit tests
2022-08-15 22:27:25 +10:00
Oliver
956701a584
New Crowdin updates (#3519)
* 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-08-15 12:22:56 +10:00
Oliver
87e7112326
Fix weasyprint version (#3539)
* Pin weasyprint version

- Revert to 54.3
- Fixes https://github.com/inventree/InvenTree/issues/3528

* Simplify label printing for multiple pages

* Simplify PDF generation for multiple report outputs

* Add content wrapper div for base label template

- Allows more extensibility
2022-08-15 11:27:27 +10:00
Matthias Mair
00dbf00eb9
[FR] Tie github actions to specific commit hashes (#3532)
* [FR] Tie github actions to specific commit hashes
Fixes #3530

* udpate action versions
2022-08-15 08:20:03 +10:00
Oliver
427404b3ba
Allow builds to be completed without any outputs (#3518)
* Remove form validation error if no build outputs are created

* Remove check before launching build-complete form
2022-08-11 12:46:33 +10:00
Matthias Mair
1010a6296f
Plugin meta detection improvements (#3516)
* refactor entrypoint into helpers

* Add lookup by metadata
This is geared towards plugins packaged in pkgs that differ in name from their top module

* Make module lookup predictable in changing pkg-envs
2022-08-11 12:02:06 +10:00