Commit Graph

13822 Commits

Author SHA1 Message Date
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
Oliver
9c4faad68e
Add postgresql-client to docker image (#3802) 2022-10-17 14:50:05 +11:00
Matthias Mair
c0bcee870e
Bump actions to node 16 / current releases (#3799)
* bump actions to node 16 / current releases

* fix merge
2022-10-17 13:46:12 +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
fccbcad63f
Update deps to newest releases (#3782)
* update django to newest release

* security update for oauthlib

* Update possible deps
2022-10-13 11:07:06 +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
Matthias Mair
b13c5b2c13
update pre-commit (#3744) 2022-10-06 22:32:01 +11:00
Matthias Mair
a1c91cfd8e
remove broken action (#3742) 2022-10-04 16:29:15 +10: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
Matthias Mair
a3c9331a08
Add content headers to config (#3731)
* add content header

* add content header

* fix format

* fix format
2022-09-30 10:47:56 +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