Compare commits

...

1312 Commits

Author SHA1 Message Date
Oliver
7c9ad3f406 Update version.py 2021-04-11 15:39:16 +10:00
Oliver
4cf0339393 Update README.md 2021-04-11 15:38:52 +10:00
Oliver
a2ff3e3474 Merge pull request #1398 from SchrodingersGat/django-q
Django q
2021-04-11 15:38:20 +10:00
Oliver Walters
c2f85b0447 docker-compose tweaks 2021-04-11 15:25:32 +10:00
Oliver Walters
8f07efa4e3 Add dockerhub badge 2021-04-11 15:15:11 +10:00
Oliver Walters
b490c5d035 Add new docker workflow for publising docker images on release 2021-04-11 15:08:13 +10:00
Oliver Walters
f9449da576 Merge remote-tracking branch 'upstream/master' into django-q
# Conflicts:
#	InvenTree/InvenTree/version.py
2021-04-11 15:03:33 +10:00
Oliver
34e95ab70c Update version.py 2021-04-11 14:49:41 +10:00
Oliver Walters
5f9236d280 Updates to docker files 2021-04-11 14:46:40 +10:00
Oliver Walters
44fe5721e0 Disgusting hack for tasks.py 2021-04-11 14:05:55 +10:00
Oliver Walters
f6f3815f31 Include worker status in main API call 2021-04-11 13:58:59 +10:00
Oliver Walters
78bcbe271a Update supervisor conf file 2021-04-11 13:45:56 +10:00
Oliver Walters
2e8d3b6424 Fix for tasks.py (??) 2021-04-11 13:22:16 +10:00
Oliver Walters
c9021fe991 Simplify docker build workflow 2021-04-10 22:48:23 +10:00
Oliver Walters
0e1b647e7b Remove mariadb test (uses the same backend as mysql!) 2021-04-10 22:47:30 +10:00
Oliver Walters
b74d365529 Merge remote-tracking branch 'upstream/master' into django-q 2021-04-10 22:46:20 +10:00
Oliver Walters
3da5505b58 Fix build workflow 2021-04-10 22:44:37 +10:00
Oliver Walters
5a168abbfe Separated docker file into separate directory 2021-04-10 22:42:08 +10:00
Oliver Walters
8f626d305e Fix location of entrypoint scripts 2021-04-10 22:35:10 +10:00
Oliver Walters
5d9e273559 Adds nxinx service 2021-04-10 22:25:07 +10:00
Oliver Walters
91b6f98f95 Update directory structure to match docker config 2021-04-10 22:08:36 +10:00
Oliver Walters
2f1db486a0 Do not use python virtual environment inside container 2021-04-10 21:40:27 +10:00
Oliver Walters
823f84e46a Simplified volume management in docker-compose 2021-04-10 20:58:51 +10:00
Oliver Walters
178715ce61 Auto create config file in specified location if it does not exist 2021-04-10 20:57:56 +10:00
Oliver Walters
e787c853e5 Update logger context 2021-04-10 20:08:13 +10:00
Oliver Walters
5e54b0f5cf Auto-generate key file if it does not exist! 2021-04-10 19:01:02 +10:00
Oliver Walters
9086c8a3bf Simplify external directory structure
- All InvenTree data now in a single subdir
- Copy default config file (if it does not exist)
- Config file is accessible from outside world
- Update start_server and start_worker scripts
2021-04-10 17:36:19 +10:00
Oliver
e011faa9b7 Merge pull request #1450 from SchrodingersGat/company-description-optional
Company description is no longer a required field
2021-04-10 16:19:30 +10:00
Oliver Walters
e6bd91c9e2 Company description is no longer a required field 2021-04-10 15:29:44 +10:00
Oliver Walters
1372343bd5 Updates to docker-compose file
- Note: not ready yet!
2021-04-10 15:27:50 +10:00
Oliver Walters
8eb571bddf Update dockerfile 2021-04-10 15:08:10 +10:00
Oliver
c7e1ac5648 Merge pull request #1449 from eeintech/fix_stock_ops
Fixed transfer stock action in template
2021-04-10 09:19:43 +10:00
Oliver
6bf3cc9e01 Merge pull request #1446 from eeintech/bom_yaml_export
Replace normalize with integer wrapper for quantity field
2021-04-10 09:17:23 +10:00
eeintech
6bf4140e5a Fixed transfer stock action in template 2021-04-09 16:55:05 -04:00
eeintech
afddf12339 Changed int to float 2021-04-08 22:04:26 -04:00
Oliver
6a1bb0a806 Merge pull request #1445 from eeintech/simple_stock_table_view
Simplified stock table view in Part and SupplierPart detail pages
2021-04-09 11:58:33 +10:00
eeintech
97e1bc0a67 Added missing part_detail reference 2021-04-08 21:46:11 -04:00
eeintech
cbddda6640 Remove normalize import 2021-04-08 14:41:06 -04:00
eeintech
7491cda313 Replace normalize with integer wrapper for quantity field 2021-04-08 14:35:47 -04:00
eeintech
b5a5f5b409 Simplified stock table view in Part and SupplierPart detail pages 2021-04-08 13:42:35 -04:00
Oliver Walters
47a93bc4cb More environment variables for config.yaml 2021-04-08 21:01:52 +10:00
Oliver Walters
3381945e14 Add newline 2021-04-08 17:10:48 +10:00
Oliver Walters
3926276fd1 Greatly simplified "wait_for_db" command 2021-04-08 00:37:34 +10:00
Oliver Walters
71cac6e269 Simplify waiting for db 2021-04-08 00:09:51 +10:00
Oliver Walters
ed304f571a Better configuration of github repo 2021-04-08 00:05:37 +10:00
Oliver Walters
14aead038e Adds docker_compose file 2021-04-07 23:46:30 +10:00
Oliver Walters
d4d9263131 Add option to specify config file via environment variable 2021-04-07 23:46:03 +10:00
Oliver Walters
9c38d67b52 Merge remote-tracking branch 'upstream/master' into django-q
# Conflicts:
#	InvenTree/InvenTree/status.py
#	InvenTree/templates/about.html
2021-04-07 22:29:47 +10:00
Oliver Walters
4a3ca4638c Dockerfile updates 2021-04-07 22:27:55 +10:00
Oliver Walters
d91531720b Unit testing for task scheduling 2021-04-07 22:17:24 +10:00
Oliver
5e0e364b6c Merge pull request #1441 from SchrodingersGat/missing-git
Hide git information if there is an error
2021-04-07 22:09:38 +10:00
Oliver
da63ec5351 Merge pull request #1437 from matmair/translation_improv
Translation improvements
2021-04-07 20:57:47 +10:00
Oliver Walters
6412cf1c87 Hide git information if there is an error 2021-04-07 20:55:44 +10:00
Matthias
32eaf48c12 fixed styling 2021-04-06 18:33:57 +02:00
Matthias
530b90042a added german(de) translations 2021-04-04 22:51:16 +02:00
Matthias
2c053eae4c added translations 2021-04-04 22:49:47 +02:00
Matthias
ef64d1e61d added label to DatePickerFormField 2021-04-04 22:49:17 +02:00
Matthias
adcb211572 set language in the used js scripts 2021-04-04 22:48:36 +02:00
Matthias
efd14fca64 made translation lazy 2021-04-04 22:47:01 +02:00
Matthias
20c455384e added more translation-strings 2021-04-04 22:44:14 +02:00
Matthias
c68220a597 migrations for all the translated models, totally forgot that 2021-04-03 14:11:28 +02:00
Matthias
cd7724d490 added german(de) translations for the new stuff 2021-04-03 13:48:02 +02:00
Matthias
f67210b20f added translation files for changes 2021-04-03 04:11:40 +02:00
Matthias
1854da380b made filters.js dynamic for translation 2021-04-03 04:07:27 +02:00
Matthias
0547e1c03b added more translations in html / js 2021-04-03 04:05:59 +02:00
Matthias
446bc06c1b switched translation methode to lazy 2021-04-03 04:01:40 +02:00
Matthias
2de6fcbfa4 added missing translation fields #753 2021-04-03 03:59:09 +02:00
Matthias
698b946403 activated translations for settings 2021-04-02 23:03:24 +02:00
Oliver Walters
00c4519d28 Simplify dockerfile 2021-04-02 00:54:29 +11:00
Oliver Walters
2436b1f2c9 Entrypoint script - start.sh 2021-04-02 00:40:47 +11:00
Oliver Walters
8d3b9e2ca4 Updates to settings.py
- Create secret_key.txt if it does not exist
- Copy default settings file if it does not exist
2021-04-02 00:06:17 +11:00
Oliver Walters
be41be3981 Add "wait_for_db" management command 2021-04-02 00:03:56 +11:00
Oliver Walters
8e7e36089b Fix venv 2021-04-01 21:11:59 +11:00
Oliver Walters
47ba0599eb Reference environment variables in supervisor conf file 2021-04-01 20:44:27 +11:00
Oliver Walters
db858b3cfc Install packages inside venv 2021-04-01 20:44:13 +11:00
Oliver Walters
148600a9c4 Copy gunicorn.conf.py 2021-04-01 20:38:18 +11:00
Oliver Walters
839c29117d Dockerfile updates
- Pipe supervisor logs to stdout (so they are passed to the docker instance)
- Fix supervisor service
- Expose home dir and port as env vars
2021-04-01 20:30:51 +11:00
Oliver Walters
d446f8ddd1 Add supervisor conf file specific to docker 2021-04-01 20:14:31 +11:00
Oliver Walters
08a1a6cf43 Add configuration options for the Dockerfile 2021-04-01 20:14:17 +11:00
Oliver Walters
76ab38a06b Add docker info 2021-04-01 11:35:03 +11:00
Oliver Walters
38b9655ad9 Remove unused workflow 2021-04-01 08:43:58 +11:00
Oliver Walters
b9e81c3c0e Start supervisord
Ref: https://advancedweb.hu/supervisor-with-docker-lessons-learned/
2021-03-31 23:39:16 +11:00
Oliver Walters
b9f9b26ca5 Sudo not required, I guess? 2021-03-31 23:32:03 +11:00
Oliver Walters
7683cc1aaa APK not APT 2021-03-31 23:27:01 +11:00
Oliver Walters
ff6b127f1b Typo fixin' 2021-03-31 23:22:17 +11:00
Oliver Walters
8b227ce297 More required packages, I guess... 2021-03-31 23:20:32 +11:00
Oliver Walters
286cf9b102 gcc required 2021-03-31 23:12:27 +11:00
Oliver Walters
24d36e0b66 Getting there... 2021-03-31 23:09:24 +11:00
Oliver Walters
251ec7a02f Fix lib names 2021-03-31 23:06:54 +11:00
Oliver Walters
61f8b982ce lib name fix 2021-03-31 23:03:13 +11:00
Oliver Walters
1f881dd041 Run as root 2021-03-31 23:00:22 +11:00
Oliver Walters
42b400e619 typo fix 2021-03-31 22:58:32 +11:00
Oliver Walters
601aff8283 Install git 2021-03-31 22:55:44 +11:00
Oliver Walters
58bfc80f79 Alpine uses different commands 2021-03-31 22:54:17 +11:00
Oliver Walters
2746396d11 Fix tag name 2021-03-31 22:50:41 +11:00
Oliver Walters
6017cad6b3 So apparently I cannot spell... 2021-03-31 22:48:58 +11:00
Oliver Walters
1a7b6e2613 Fix 2021-03-31 22:47:41 +11:00
Oliver Walters
ab57fd3b76 Build docker image 2021-03-31 22:45:42 +11:00
Oliver Walters
c0a0ca4588 PEP fix 2021-03-31 22:35:48 +11:00
Oliver Walters
3f257279ee Specify directories for CI 2021-03-31 22:31:50 +11:00
Oliver Walters
731ec25b24 Merge remote-tracking branch 'inventree/master' into django-q
# Conflicts:
#	.github/workflows/style.yaml
#	.travis.yml
#	InvenTree/InvenTree/settings.py
2021-03-31 22:17:38 +11:00
Oliver
53c9475e6d Update README.md 2021-03-31 22:11:01 +11:00
Oliver
9ccff64679 Update README.md 2021-03-31 22:10:12 +11:00
Oliver
de3395ed26 Update README.md 2021-03-31 22:09:39 +11:00
Oliver
16433f49c6 Merge pull request #1433 from SchrodingersGat/coverage-workflow
Add workflow for code coverage
2021-03-31 22:08:08 +11:00
Oliver Walters
73e032e1d0 Specify database name 2021-03-31 21:54:13 +11:00
Oliver Walters
82b6c48946 Specify database name 2021-03-31 21:48:54 +11:00
Oliver Walters
566c3af39e Environment variables take preference! 2021-03-31 21:40:19 +11:00
Oliver Walters
5d141e3568 Always print database config 2021-03-31 21:24:14 +11:00
Oliver Walters
83cd24961d INFO level debug 2021-03-31 21:18:17 +11:00
Oliver Walters
737a378515 Extra debug output for tests 2021-03-31 21:17:17 +11:00
Oliver Walters
f71ebc20ec Remove travis script 2021-03-31 21:07:16 +11:00
Oliver Walters
ac9753e72c Add data import/export step 2021-03-31 20:58:30 +11:00
Oliver Walters
dc94376f6d Fix workflows 2021-03-31 20:46:26 +11:00
Oliver Walters
c846e2e65a Use env variables rather than custom ci scripts 2021-03-31 20:39:22 +11:00
Oliver Walters
608f47837f Update README.md with badges 2021-03-31 20:26:47 +11:00
Oliver Walters
2f6ee330de Add CI check against MariaDB 2021-03-31 20:20:10 +11:00
Oliver Walters
c66dddc03f Force TCP for postgres 2021-03-31 20:14:57 +11:00
Oliver Walters
48cbd3be97 Remove (old) docs 2021-03-31 20:13:12 +11:00
Oliver Walters
6b99808c52 Run as root 2021-03-31 20:12:45 +11:00
Oliver Walters
61d14a0eda Database naming fix 2021-03-31 20:07:42 +11:00
Oliver Walters
5aea35f8fa Force TCP 2021-03-31 20:04:18 +11:00
Oliver Walters
3cc0530419 Root password 2021-03-31 20:01:02 +11:00
Oliver Walters
cef75aabc5 Update 2021-03-31 19:59:23 +11:00
Oliver Walters
09693d0d09 Start service 2021-03-31 19:54:37 +11:00
Oliver Walters
70703f8588 Try localhost 2021-03-31 19:48:20 +11:00
Oliver Walters
67a4c5a9a2 Try pointing to different host 2021-03-31 19:45:58 +11:00
Oliver Walters
db8d93e2e9 Create mysql database manually 2021-03-31 17:54:42 +11:00
Oliver Walters
af52f0eace Typo fix 2021-03-31 17:45:57 +11:00
Oliver Walters
631e41e22a Fix postgres workflow 2021-03-31 17:40:37 +11:00
Oliver Walters
f8d29b7b3b Typo 2021-03-31 17:36:33 +11:00
Oliver Walters
9e4218d02f Mysql fixes 2021-03-31 17:34:12 +11:00
Oliver Walters
d09483f30c Workflow fixes 2021-03-31 17:28:30 +11:00
Oliver Walters
d1a42f55a2 Fix flake issues 2021-03-31 17:20:12 +11:00
Oliver Walters
bdd5fa96e7 Add tests for mysql and postgresql 2021-03-31 17:18:04 +11:00
Oliver Walters
4f87c848a5 Ensure flake8 fails 2021-03-31 17:17:40 +11:00
Oliver Walters
d20c3bb733 GITHUB_TOKEN 2021-03-31 17:08:24 +11:00
Oliver Walters
ae72224ece Fix coveralls 2021-03-31 16:57:44 +11:00
Oliver Walters
fd43f8dc64 Merge remote-tracking branch 'inventree/master' into coverage-workflow
# Conflicts:
#	.github/workflows/style.yaml
2021-03-31 16:26:02 +11:00
Oliver Walters
6b32142725 run on pull request 2021-03-31 16:24:33 +11:00
Oliver Walters
01e6635032 Add workflow for code coverage 2021-03-31 13:06:22 +11:00
Oliver
88a021f165 Merge pull request #1432 from SchrodingersGat/style-checks
Update style worfdlow
2021-03-31 13:05:59 +11:00
Oliver Walters
b16f85de65 Update style worfdlow 2021-03-31 12:41:39 +11:00
Oliver
865436c42a Merge pull request #1431 from SchrodingersGat/workflows
Add code style workflow
2021-03-30 22:41:27 +11:00
Oliver Walters
db994fd908 Add code style workflow 2021-03-30 21:56:17 +11:00
Oliver Walters
83f8afe113 Add github actions 2021-03-30 21:33:49 +11:00
Oliver Walters
e7ed4c4eab Travis fixes 2021-03-30 21:24:06 +11:00
Oliver Walters
39b2c5f943 Reintroduce default database config 2021-03-30 21:18:09 +11:00
Oliver Walters
3ddbb6a6cd Check for empty values 2021-03-30 20:53:26 +11:00
Oliver
fd01e23245 Merge pull request #1430 from SchrodingersGat/missing-permission-fix
Emit warning rather than raise error
2021-03-30 10:28:54 +11:00
Oliver Walters
1a288168b7 PEP fixes 2021-03-30 10:00:43 +11:00
Oliver
f288b906ad Merge pull request #1426 from SchrodingersGat/assign-by-sn
Assign by sn
2021-03-30 09:29:49 +11:00
Oliver Walters
58c30f48d5 Remove extra whitespace 2021-03-30 09:28:02 +11:00
Oliver Walters
bfbdd72306 Remove unused import 2021-03-30 08:43:09 +11:00
Oliver Walters
0b78f3d931 Add unit testing for migrations 2021-03-30 08:42:44 +11:00
Oliver Walters
32cfe1b954 Emit warning rather than raise error
- All calling functions check for None anyway
2021-03-30 08:25:51 +11:00
Oliver
67f06d6e5d Merge pull request #1428 from inventree/dependabot/pip/pygments-2.7.4
Bump pygments from 2.2.0 to 2.7.4
2021-03-30 08:16:21 +11:00
Oliver Walters
408b9d5e5b Fix for unit testing 2021-03-30 08:08:55 +11:00
dependabot[bot]
49bb5634da Bump pygments from 2.2.0 to 2.7.4
Bumps [pygments](https://github.com/pygments/pygments) from 2.2.0 to 2.7.4.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](https://github.com/pygments/pygments/compare/2.2.0...2.7.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 19:20:11 +00:00
Oliver Walters
709bfb1bd2 Remove "unique" constraint for part / order relationship 2021-03-30 00:14:47 +11:00
Oliver Walters
217097c9d3 Add custom form template 2021-03-30 00:10:28 +11:00
Oliver Walters
19059ea4cf Tweaks 2021-03-29 23:38:38 +11:00
Oliver Walters
d64dd68403 Agk, working out forms is hard 2021-03-29 23:32:41 +11:00
Oliver Walters
bd87f4c733 Adds form to assign stock item by serial numbers 2021-03-29 23:10:36 +11:00
Oliver
19c03e1472 Merge pull request #1424 from SchrodingersGat/notes-css
HTML / CSS fixes
2021-03-29 17:01:23 +11:00
Oliver Walters
cffe2ba84b Add a separate form for creating a sales order allocation 2021-03-29 16:44:01 +11:00
Oliver Walters
7a4b90649a HTML / CSS fixes 2021-03-29 16:36:27 +11:00
Oliver
88c1bc79d7 Merge pull request #1423 from matmair/translation-de
german translations
2021-03-29 09:12:45 +11:00
Matthias
a3ab70b05d finished german translation, small corrections 2021-03-28 18:09:35 +02:00
Matthias
c558a04162 updated translation reference 2021-03-28 18:08:07 +02:00
Oliver
1ffd3a0070 Merge pull request #1409 from eeintech/fix_stock_ops
Template fix for stock actions
2021-03-28 20:42:14 +11:00
Oliver
5a5e76e0a6 Merge pull request #1414 from inventree/dependabot/pip/djangorestframework-3.11.2
Bump djangorestframework from 3.10.3 to 3.11.2
2021-03-25 17:29:43 +11:00
Oliver Walters
3a0c68bf5c Add invoke task to start background worker 2021-03-24 22:42:04 +11:00
Oliver Walters
df0ab2359f Remove invoke tasks which perform system commands
- tasks.py is now for InvenTree specific tasks only
2021-03-24 22:24:47 +11:00
Oliver Walters
ce64feb79d Update supervisor conf file 2021-03-24 08:32:00 +11:00
Oliver Walters
e3f49b8996 Install invoke and gunicorn as part of requirements.txt 2021-03-24 08:31:53 +11:00
Oliver Walters
edbbfff1af Reduce frequency of heartbeat 2021-03-23 19:58:29 +11:00
Oliver Walters
8fd666e662 Improvements for "check for updates" task
- Let it throw an error if something fails
- Errors are caught as "unsuccessful tasks"
2021-03-22 11:20:09 +11:00
dependabot[bot]
f25c83226f Bump djangorestframework from 3.10.3 to 3.11.2
Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.10.3 to 3.11.2.
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](https://github.com/encode/django-rest-framework/compare/3.10.3...3.11.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-19 22:23:09 +00:00
Oliver Walters
b7718d9c6c Specify user and logfile 2021-03-19 22:08:11 +11:00
Oliver Walters
283663633a First pass at a supervisor.conf file 2021-03-19 21:52:36 +11:00
Oliver
c9464fd393 Merge pull request #1412 from SchrodingersGat/pillow-version
Bump pillow version
2021-03-19 11:25:10 +11:00
Oliver Walters
84aea1d587 Bump pillow version 2021-03-19 10:59:28 +11:00
Oliver
57289fe141 Merge pull request #1410 from SchrodingersGat/image-downloader
Image downloader
2021-03-18 11:10:07 +11:00
Oliver Walters
9c91ba4692 Add image download functionality for company 2021-03-18 09:20:24 +11:00
Oliver Walters
4e7243b999 Add modal image overlay for company 2021-03-17 23:55:21 +11:00
Oliver Walters
e3a5a56371 Add "modal image" display for part thumbnails 2021-03-17 23:44:47 +11:00
Oliver Walters
db47629867 Cleanup 2021-03-17 23:15:48 +11:00
Oliver Walters
8b310d8e47 Check length of response 2021-03-17 23:11:38 +11:00
Oliver Walters
be30933bfa Add custom form template 2021-03-17 23:06:56 +11:00
Oliver Walters
9a710ca28f Fix image download code 2021-03-17 23:02:32 +11:00
Oliver Walters
47a1143570 Catch error when generating company thumbnail images 2021-03-17 11:55:51 +11:00
Oliver Walters
5f19f534fc Catch error if invalid image is uploaded 2021-03-17 09:47:57 +11:00
Oliver
e2e870858d Merge pull request #1400 from eeintech/ipn_edit_setting
Add setting to disable IPN editing after part is created (web only)
2021-03-17 09:47:39 +11:00
Oliver Walters
15678f789c Add global setting to enable download of files / images from remote URL 2021-03-17 08:40:30 +11:00
Oliver Walters
45edb7e802 Add button 2021-03-17 08:28:38 +11:00
Oliver Walters
5b7d35e6f7 add View 2021-03-17 08:28:28 +11:00
Oliver Walters
3900f9b1b6 Add form for submitting image URL 2021-03-17 08:28:12 +11:00
eeintech
8619af9f09 Template fix for stock actions 2021-03-16 12:32:56 -04:00
eeintech
85474516a3 Merge branch 'master' of github.com:inventree/InvenTree into ipn_edit_setting 2021-03-16 10:23:27 -04:00
Oliver Walters
6946abae13 CSS fix for modal error info dialog 2021-03-16 16:42:33 +11:00
Oliver
5e48009241 Merge pull request #1407 from eeintech/bom_match_headers
Split required and part match headers for BOM import
2021-03-16 08:19:32 +11:00
eeintech
64a57128bc Return True for BOM valid flag if part does not have BOM items 2021-03-15 10:37:30 -04:00
eeintech
d39bd88440 Split required and part match headers for BOM import 2021-03-15 09:41:04 -04:00
eeintech
7b81a470b9 Merge branch 'master' of github.com:inventree/InvenTree into ipn_edit_setting 2021-03-15 08:50:31 -04:00
Oliver
247cbe0154 Merge pull request #1406 from SchrodingersGat/part-pricing-form-error
Add option to hide form error message
2021-03-15 21:01:19 +11:00
Oliver Walters
2de879d2ba Add option to hide form error message 2021-03-15 20:30:18 +11:00
Oliver
b17a50bd51 Merge pull request #1405 from SchrodingersGat/css-tweak
Small tweak for breadcrumb div css
2021-03-15 17:52:14 +11:00
Oliver Walters
9918860820 Small tweak for breadcrumb div css 2021-03-15 17:00:14 +11:00
Oliver Walters
c6e154f996 PEP style fixes 2021-03-15 10:15:48 +11:00
Oliver Walters
c1aed51de1 Fix import error 2021-03-15 09:34:32 +11:00
Oliver Walters
24823adc6d Adds unit tests for version number comparison 2021-03-15 08:51:50 +11:00
Oliver Walters
6ea846ce45 Add a #TODO 2021-03-15 08:36:27 +11:00
Oliver Walters
f6dd710d6e Automatically delete old heartbeat messages 2021-03-15 08:35:06 +11:00
Oliver Walters
de85d61451 Directly compare version tuples, rather than converting to primitive 2021-03-15 08:31:19 +11:00
Oliver
5ff18a0a3a Merge pull request #1403 from matmair/translations-de
unified translation scheme
2021-03-15 08:27:24 +11:00
Oliver
82faccc62f Merge pull request #1401 from eeintech/stock_filter_assembly
Stock filter for parts assemblies
2021-03-13 07:48:15 +11:00
Oliver
59e98bc22d Merge pull request #1402 from eeintech/fix_typo
Fixed build typo
2021-03-13 07:46:11 +11:00
eeintech
acb0b2c10a Fixed build typo 2021-03-12 11:46:56 -05:00
eeintech
429f9d0a13 Removed test print 2021-03-12 11:19:20 -05:00
eeintech
89c7c87f1e Add stock filter for parts assemblies 2021-03-12 11:18:19 -05:00
eeintech
b152f7041b Add setting to disable IPN editing after part is created (web only) 2021-03-12 10:30:31 -05:00
Oliver Walters
700effcee7 Remove celery reference 2021-03-12 16:57:27 +11:00
Oliver Walters
18b559fee7 Fix for unit test 2021-03-12 16:28:54 +11:00
Oliver Walters
9d404afec0 Add 'ignore' rules for the django-q tables 2021-03-12 16:00:25 +11:00
Oliver Walters
51616c8aca Merge remote-tracking branch 'upstream/master' into django-q 2021-03-12 15:47:03 +11:00
Oliver Walters
ef4dbda223 Catch errors if the DB is not up 2021-03-12 15:35:55 +11:00
Oliver Walters
006dd10a79 Delete successful tasks more than a month old 2021-03-12 15:35:33 +11:00
Oliver Walters
5b8eb1c530 Newline 2021-03-12 15:27:53 +11:00
Oliver Walters
bfb0cb3b47 Add a "heartbeat" task which runs every 5 minutes
- Allows us to track if the worker is running
- Due to Stat.get_all() not always working
2021-03-12 15:27:28 +11:00
Oliver
ed028aed62 Merge pull request #1397 from SchrodingersGat/order-report
Order report
2021-03-12 14:44:10 +11:00
Oliver Walters
c07f217416 Add "ignore" rules for new report models 2021-03-12 14:01:20 +11:00
Matthias
47c98db8a1 unified translation scheme 2021-03-11 12:44:28 +01:00
Oliver Walters
4925f24ca9 Add "up to date" info to the "about" window 2021-03-11 20:07:59 +11:00
Oliver Walters
18defcff16 Read version number from GitHub 2021-03-11 19:56:22 +11:00
Oliver Walters
3cf5aec289 Refactor 2021-03-11 19:21:28 +11:00
Oliver Walters
1532a0c3a1 Add InvenTree/apps.py 2021-03-11 17:18:57 +11:00
Oliver Walters
5949ccd74f Bug fix 2021-03-11 17:11:57 +11:00
Oliver Walters
f1ba20c3da Basic PO and SO reports 2021-03-11 15:01:25 +11:00
Oliver Walters
eb6310c774 Render company image to report 2021-03-11 15:01:15 +11:00
Oliver Walters
9d321f4833 Removed 2021-03-11 14:47:45 +11:00
Oliver Walters
e1ba0a9a99 Bug fix for tables 2021-03-11 14:24:28 +11:00
Oliver Walters
8e2a2c59bf Add more context data to reports 2021-03-11 14:19:25 +11:00
Oliver Walters
7ccd339b5c Print reports for multiple selected sales orders / purchase orders 2021-03-11 14:15:31 +11:00
Oliver Walters
fa95759a00 Enable printing for PO and SO 2021-03-11 14:09:57 +11:00
Oliver
23e19614a5 Merge pull request #1394 from mosenturm/translation_de
further translation de
2021-03-10 20:35:50 +11:00
Andreas Kaiser
3897166185 fix typo 2021-03-10 09:48:54 +01:00
Oliver Walters
7800664f4b Add printing endpoints 2021-03-10 18:29:22 +11:00
Oliver
448c3cc6f5 Merge pull request #1395 from SchrodingersGat/responsible-user
Responsible user
2021-03-10 18:27:46 +11:00
Oliver Walters
5a6a12604e Add detail endpoints 2021-03-10 17:13:19 +11:00
Oliver Walters
33e176e4e7 Add list view API endpoints 2021-03-10 17:09:37 +11:00
Oliver Walters
9b0595d232 Add serializers 2021-03-10 16:53:02 +11:00
Oliver Walters
7f05485954 Add new reports to the admin interface 2021-03-10 16:50:55 +11:00
Oliver Walters
727fd38978 Add new report models 2021-03-10 16:48:20 +11:00
Oliver Walters
d559d92f58 Display responsible owner for salesorder and purchaseorder 2021-03-10 16:26:20 +11:00
Oliver Walters
39d44ce32f Add "responsible" field to PO and SO models 2021-03-10 16:19:44 +11:00
Oliver Walters
5b68d82fa3 Skeleton for background tasks 2021-03-10 14:03:19 +11:00
Oliver Walters
660fed9196 Remove unused code from settings.py 2021-03-10 14:03:09 +11:00
Andreas Kaiser
6f63b43c1c Merge branch 'master' into translation_de 2021-03-09 11:14:07 +01:00
Andreas Kaiser
ca626ead6c german translation 2021-03-09 00:45:37 +01:00
Oliver
fb096bd65b Merge pull request #1393 from matmair/german-translations
updated german translations
2021-03-09 10:39:39 +11:00
Matthias
a00756ec3a added all obvious translations 2021-03-08 23:50:24 +01:00
Andreas Kaiser
af0c72d338 german translation 2021-03-08 17:45:22 +01:00
Andreas Kaiser
5ae5b9c0d4 german translation 2021-03-08 16:09:36 +01:00
Andreas Kaiser
48cd227f06 german translation, HTML tags refactored 2021-03-06 21:52:57 +01:00
Andreas Kaiser
ae3a0133eb Merge branch 'master' into translation_de 2021-03-06 13:50:39 +01:00
Oliver Walters
45b3c68930 New status info 2021-03-06 21:41:19 +11:00
Oliver Walters
7bec3ff5dd django-q 2021-03-06 20:58:57 +11:00
Oliver
9ea3193ffb Merge pull request #1391 from SchrodingersGat/order-parts-fix
Hacky fix for ordering parts form
2021-03-06 20:20:30 +11:00
Oliver Walters
8061669c70 Hacky fix for ordering parts form 2021-03-06 19:49:49 +11:00
Andreas Kaiser
ade1d36397 updated german translation, change tags bold italics 2021-03-05 01:03:08 +01:00
Oliver
a4257ad9df Update version.py 2021-03-04 22:52:40 +11:00
Oliver
15ca35ca94 Update version.py 2021-03-04 22:51:32 +11:00
Oliver
c46fe354c2 Merge pull request #1390 from SchrodingersGat/CI-fixes
Hide fields rather than pop, to reduce warnings in CI logs
2021-03-04 22:42:17 +11:00
Oliver Walters
d43cfccfc1 Typo fix 2021-03-04 22:11:38 +11:00
Oliver Walters
5ad915a845 More fields 2021-03-04 22:09:46 +11:00
Oliver Walters
d111e7bff0 Hide fields rather than pop, to reduce warnings in CI logs 2021-03-04 21:42:49 +11:00
Oliver
249860fa76 Merge pull request #1387 from SchrodingersGat/null-fix
Bug fix
2021-03-03 22:16:12 +11:00
Oliver Walters
a9e3e46b8a Bug fix
check if self.object.owner is None
2021-03-03 21:52:02 +11:00
Oliver
fb5d7c415b Merge pull request #1385 from SchrodingersGat/order-filtering
Order filtering
2021-03-03 09:27:40 +11:00
Oliver Walters
979f543c3f Add build orders to search results list 2021-03-03 08:44:13 +11:00
Oliver Walters
14000517ce Fixes for build order table 2021-03-03 08:39:14 +11:00
Oliver Walters
4a28fa7fa8 Fixes for company table 2021-03-03 08:36:16 +11:00
Oliver Walters
339a02a6b2 Bug fix for sorting of sales orders 2021-03-03 08:32:57 +11:00
Oliver Walters
558ea98fa1 Add purchase order and sales order to search results 2021-03-03 08:30:20 +11:00
Oliver Walters
0b15b77140 Fix server-side ordering for purchase order table 2021-03-03 08:13:55 +11:00
Oliver
a53aadd466 Merge pull request #1384 from mosenturm/translation_ak
updated german translation (de)
2021-03-03 08:02:40 +11:00
Andreas Kaiser
3a6f13f259 updated german translation (de) 2021-03-02 17:44:53 +01:00
Oliver
3d4cfcf1b6 Merge pull request #1381 from SchrodingersGat/table-name-fix
Fixes incorrect table name
2021-03-02 22:03:51 +11:00
Oliver Walters
e7e2abf3fc Remove debug prints 2021-03-02 21:34:26 +11:00
Oliver Walters
cd01bb0ad7 Refactor HTML view permission
- Introspect database model from View
- Automatically get the permission from the View class
2021-03-02 21:32:32 +11:00
Oliver Walters
753483e6c2 Use app label rather than table name for permission lookup
- For legacy reasons there are some tables that are not named according to their app_label
- Simply use the app_label instead
2021-03-02 19:34:56 +11:00
Oliver
7f6f489463 Merge pull request #1379 from SchrodingersGat/po-bug-fix
Pagination Bug Fix
2021-03-02 17:15:12 +11:00
Oliver
33f195533e Merge pull request #1380 from SchrodingersGat/label-base
Adds body styling to label base
2021-03-02 16:53:05 +11:00
Oliver Walters
42dfda6d07 Merge remote-tracking branch 'inventree/master' into po-bug-fix 2021-03-02 16:29:12 +11:00
Oliver Walters
7cb712f422 Merge remote-tracking branch 'inventree/master' into label-base
# Conflicts:
#	.travis.yml
2021-03-02 16:28:58 +11:00
Oliver
a2f849d663 Merge pull request #1382 from SchrodingersGat/linter-fix
Remove django-migration-linter which was causing strange errors
2021-03-02 16:28:10 +11:00
Oliver Walters
9478da2ad2 Remove django-migration-linter which was causing strange errors 2021-03-02 15:53:56 +11:00
Oliver Walters
f6e982ce81 Fixes incorrect table name 2021-03-02 15:34:45 +11:00
Oliver Walters
bc25e795dd Shorten git hash 2021-03-02 14:34:20 +11:00
Oliver Walters
2cf87c1c30 Adds body styling to label base 2021-03-02 14:05:52 +11:00
Oliver Walters
628e87cb28 search field fixes 2021-03-02 13:08:12 +11:00
Oliver Walters
6f4178acdb Improve server-side pagination for POLineItem 2021-03-02 12:38:37 +11:00
Oliver Walters
1c3b017283 Improve server-side pagination of SalesOrderLineItem 2021-03-02 12:33:41 +11:00
Oliver Walters
4ff1c690cc Bug fix for paginated tables 2021-03-02 12:33:01 +11:00
Oliver
7cf1715e2b Merge pull request #1374 from eeintech/dark-reader
Dark Reader color theme update
2021-03-02 10:45:56 +11:00
Oliver
197682635e Merge pull request #1377 from SchrodingersGat/nav-tree-fix
Fix incorrect javascript call
2021-03-02 10:45:31 +11:00
eeintech
a85ac6161e Removed binary SVG images from CSS 2021-03-01 16:19:16 -05:00
Oliver Walters
478dce449d Fix incorrect javascript call 2021-03-02 08:07:18 +11:00
eeintech
36c7528aeb Removed absolute static URLs 2021-03-01 11:00:42 -05:00
eeintech
374860c914 Updated Dark Reader color theme 2021-03-01 10:48:37 -05:00
Oliver
278466e830 Update README.md 2021-03-01 14:49:13 +11:00
Oliver
7aed696451 Merge pull request #1373 from SchrodingersGat/server-pagination
Server pagination
2021-03-01 13:31:50 +11:00
Oliver Walters
b7cf57c875 PEP fix 2021-03-01 11:38:52 +11:00
Oliver Walters
9f9629edb3 Fix for unit test 2021-03-01 11:21:18 +11:00
Oliver Walters
b157690ae0 Add API version to server info endpoint 2021-03-01 11:15:53 +11:00
Oliver Walters
34def10765 Delete un-needed code 2021-02-28 21:44:10 +11:00
Oliver Walters
04dbfbd892 Fix for stock item tracking table 2021-02-28 20:50:19 +11:00
Oliver Walters
3dad86f004 Actually just enable (optional) pagination for every list endpoint 2021-02-28 20:45:41 +11:00
Oliver Walters
44635d2499 Use server-side pagination for more list endpoints 2021-02-28 20:35:32 +11:00
Oliver Walters
90feb6d210 Server-side paginatino for build orders 2021-02-28 20:31:01 +11:00
Oliver Walters
1239d4af16 Fixes result limiting
- Required for index page
2021-02-28 20:16:05 +11:00
Oliver Walters
487794a938 Server side pagination for the part list 2021-02-28 16:29:25 +11:00
Oliver Walters
8ce7b572cc Optionally paginate the StockList table on the server
- This makes the bootstrap table interface SO FREAKING MUCH FASTER
- Search is now performed on the server too!
2021-02-28 16:18:45 +11:00
Oliver
45791c0257 Merge pull request #1372 from SchrodingersGat/sidenav-fix
Refactor side navigation tree
2021-02-28 13:29:50 +11:00
Oliver Walters
6f2ba71339 Refactor side navigation tree 2021-02-28 11:48:20 +11:00
Oliver
5cdae04c62 Merge pull request #1371 from SchrodingersGat/api-404
Adds "404" response when asking for an API endpoint that does not exist
2021-02-28 07:34:34 +11:00
Oliver Walters
19c76f7842 Include 404 URL in response 2021-02-27 22:44:38 +11:00
Oliver Walters
5069882a7f URL tweaks 2021-02-27 22:41:36 +11:00
Oliver Walters
0b9cb507c7 Redirect invalid API urls to a 404 page 2021-02-27 22:38:08 +11:00
Oliver
732388c7d3 Merge pull request #1370 from SchrodingersGat/stock-adjust-permissions
Fix API permissions for stock adjustment
2021-02-27 22:25:55 +11:00
Oliver Walters
f1c8c48d35 Fix API permissions for stock adjustment 2021-02-27 20:17:52 +11:00
Oliver
d5597a3dca Merge pull request #1363 from SchrodingersGat/api-permissions
Api permissions
2021-02-27 08:39:47 +11:00
Oliver
4b147e86ce Merge pull request #1368 from SchrodingersGat/hide-stock-buttons
Hide stock buttons on top-level stock location display
2021-02-27 08:39:25 +11:00
Oliver Walters
b6d87850dc Hide stock buttons on top-level stock location display 2021-02-27 08:00:00 +11:00
Oliver Walters
b315b958b0 PEP fixes 2021-02-27 07:56:38 +11:00
Oliver Walters
5a536be22d More test refactoring 2021-02-26 22:08:06 +11:00
Oliver Walters
d76b873c00 Refactor build API unit tests 2021-02-26 22:00:22 +11:00
Oliver Walters
9d099c81a7 Refactor API tests for stock 2021-02-26 21:53:54 +11:00
Oliver Walters
ee744be5fe Refactor API unit tests for part 2021-02-26 21:45:37 +11:00
Oliver Walters
6e3cb326fb Use better introspection, no longer required "role_required" 2021-02-26 21:36:40 +11:00
Oliver Walters
0f6cdd0037 Improve unit testing for new role endpoint 2021-02-26 21:04:09 +11:00
Oliver Walters
aad92902f2 Unit tests for new role view 2021-02-26 20:37:12 +11:00
Oliver Walters
2460965fef Add some more context data 2021-02-26 17:55:56 +11:00
Oliver Walters
5c61c18dc4 Add API endpoint which provides list of role permissions available to current user 2021-02-26 17:52:06 +11:00
Oliver Walters
cd5bc395f2 PEP fixes 2021-02-26 16:03:38 +11:00
Oliver Walters
20740035e8 Add role to API endpoints in 'part' app 2021-02-26 14:37:50 +11:00
Oliver Walters
81e9fd7a44 Escape hatch if role not required 2021-02-26 14:26:37 +11:00
Oliver Walters
0e971c468b Remove test code 2021-02-26 14:07:18 +11:00
Oliver Walters
36359fc547 RolePermission is now default for API endpoints 2021-02-26 14:05:26 +11:00
Oliver Walters
cd8c6fa81a Add RolePermission for API endpoints 2021-02-26 13:53:23 +11:00
Oliver Walters
1dfda5b0ed Fix display for top-level category 2021-02-26 13:03:03 +11:00
Oliver
414a981858 Merge pull request #1361 from SchrodingersGat/multi-bom-delete
Refactor multi-bom deletion
2021-02-26 11:15:51 +11:00
Oliver Walters
12c2ea3b37 Refactor multi-bom deletion 2021-02-26 10:54:54 +11:00
Oliver
44f5e0907e Merge pull request #1359 from SchrodingersGat/api-star
Simplify process for marking a part as "starred"
2021-02-25 23:51:45 +11:00
Oliver Walters
f2da1c990b Simplify process for marking a part as "starred" 2021-02-25 23:27:27 +11:00
Oliver
35b9b17167 Merge pull request #1354 from SchrodingersGat/tree-fix
Sidenav Fixes
2021-02-25 09:45:56 +11:00
Oliver Walters
bb03f2bd58 CSS fixes 2021-02-25 09:22:02 +11:00
Oliver Walters
26e80fa0ab Fancify all the menubars 2021-02-25 09:10:20 +11:00
Oliver Walters
fe42d5c54d Cleanup display for part 2021-02-24 21:58:40 +11:00
Oliver Walters
a451de3735 Update translations 2021-02-24 21:53:23 +11:00
Oliver Walters
ef84b98a89 Build view now uses menubar 2021-02-24 21:52:26 +11:00
Oliver Walters
48d2a395de Part Category now uses menubar display 2021-02-24 21:39:45 +11:00
Oliver Walters
a0eec930bb Cleanup 2021-02-24 21:30:55 +11:00
Oliver Walters
89bdfd1c62 StockItem display now uses menubar 2021-02-24 21:27:44 +11:00
Oliver Walters
888fd4116c SupplierPart display now uses menubar display style 2021-02-24 21:12:41 +11:00
Oliver Walters
5525b23b9f Company view now uses menubar 2021-02-24 20:31:48 +11:00
Oliver Walters
3210af31b4 Sales order now uses menubar 2021-02-24 20:17:25 +11:00
Oliver Walters
213851e8aa Purchase Order now uses menu bar 2021-02-24 20:01:05 +11:00
Oliver Walters
bedfaa582c Update "part" display to use new menubar 2021-02-24 17:58:43 +11:00
Oliver Walters
2a7b32d4f4 Part display tweaks 2021-02-24 16:37:32 +11:00
Oliver
3b03d45f1f Merge pull request #1355 from SchrodingersGat/search-fields
Allow searching part by revision field
2021-02-24 13:04:06 +11:00
Oliver Walters
546a1c91cc Allow searching part by revision field 2021-02-24 11:05:52 +11:00
Oliver Walters
a660578262 Move part menu to the left 2021-02-24 11:02:11 +11:00
Oliver Walters
15a59d54ca Abstract template context data for part 2021-02-24 09:05:31 +11:00
Oliver Walters
edb803bf67 Make part menu 'sticky' 2021-02-23 21:58:28 +11:00
Oliver Walters
2e87499fa5 Basic right-side menu for part 2021-02-23 21:51:41 +11:00
Oliver Walters
68f24e97ac Make tree sidenav resizable 2021-02-23 21:09:55 +11:00
Oliver Walters
0016628b41 Keep tree items constrained to a single line 2021-02-23 19:38:28 +11:00
Oliver
8cc904fe8a Merge pull request #1352 from SchrodingersGat/bug-fix
Bug fix for trackable parts
2021-02-23 18:01:56 +11:00
Oliver
2c85d630f7 Merge pull request #1353 from SchrodingersGat/regex-search-fix
Remove regex search functionality from part api
2021-02-23 18:01:48 +11:00
Oliver Walters
15275d24b4 Better CSS for side nav bars 2021-02-23 18:01:42 +11:00
Oliver Walters
a48be3bea9 Remove regex search functionality from part api 2021-02-23 16:57:17 +11:00
Oliver Walters
b64d48544d Bug fix for trackable parts 2021-02-23 16:49:09 +11:00
Oliver
ad7a70f033 Merge pull request #1351 from SchrodingersGat/report-filter-fix
Bug fix for label / report filtering
2021-02-23 16:02:29 +11:00
Oliver Walters
8c9202de21 Bug fix for label / report filtering 2021-02-23 15:40:31 +11:00
Oliver
94c8bb6805 Merge pull request #1350 from SchrodingersGat/recently-updated
Adds "Recently Updated Stock" to index page
2021-02-23 14:47:24 +11:00
Oliver Walters
648d322f54 Style fixes 2021-02-23 14:24:09 +11:00
Oliver Walters
8717be66fc Configure number of "recent items" shown on index page 2021-02-23 14:15:12 +11:00
Oliver Walters
8972a51bd6 Fixes for integer validator for inventree setting 2021-02-23 14:12:16 +11:00
Oliver
333d6dd1b8 Merge pull request #1348 from SchrodingersGat/supplier-part-admin
Adds "admin" button to supplier part page
2021-02-23 13:43:51 +11:00
Oliver
615e2f8271 Merge pull request #1349 from SchrodingersGat/used-in-filter
Enable filtering for "used in" table
2021-02-23 13:43:45 +11:00
Oliver Walters
571a03043e Show recently updated stock items on the index page 2021-02-23 13:43:41 +11:00
Oliver Walters
949a541ee0 Add more options to StockList api
- Limit query results
- Order by various fields
2021-02-23 13:43:26 +11:00
Oliver Walters
66e1b180e4 Add option to stock table to disable grouping at run-time 2021-02-23 13:42:59 +11:00
Oliver Walters
39d4ddd845 Enable filtering for "used in" table 2021-02-23 13:23:23 +11:00
Oliver Walters
5a58e0a298 Adds "admin" button to supplier part page 2021-02-23 13:16:03 +11:00
Oliver
791b14920a Merge pull request #1347 from SchrodingersGat/variant-stock-tab
Display stock tab for virtual parts
2021-02-23 12:23:01 +11:00
Oliver Walters
041f056116 Display stock tab for virtual parts 2021-02-23 10:40:52 +11:00
Oliver
4dc093662d Merge pull request #1344 from SchrodingersGat/sub-build-table
Build: Filter by parent or ancestor in API
2021-02-23 09:46:51 +11:00
Oliver Walters
832a6ef9a2 PEP fixes 2021-02-23 09:01:03 +11:00
Oliver Walters
58863b1924 Show child builds 2021-02-22 22:35:54 +11:00
Oliver Walters
c1dd5b1ca1 Add "child build" page 2021-02-22 22:21:46 +11:00
Oliver Walters
2186a66465 Build: Filter by parent or ancestor in API
- Add unit testing
2021-02-22 22:05:20 +11:00
Oliver
b8327a5531 Merge pull request #1342 from SchrodingersGat/label-improvements
Label improvements
2021-02-22 19:45:11 +11:00
Oliver
613776fbe5 Merge pull request #1343 from SchrodingersGat/part-annotate
Adds 'suppliers' field to Part serializer
2021-02-22 19:45:02 +11:00
Oliver Walters
199ba27031 PEP!!! 2021-02-22 18:44:59 +11:00
Oliver Walters
cf6a03456f Adds 'suppliers' field to Part serializer
- Number of supplier parts associated with the Part object
2021-02-22 18:44:31 +11:00
Oliver Walters
28e9aa4afa More unit fixes 2021-02-22 18:11:40 +11:00
Oliver Walters
9159afe9ce Unit test fix 2021-02-22 17:27:48 +11:00
Oliver
5d1e6981d8 Merge pull request #1341 from SchrodingersGat/variant-table-fix
Fixes weird variant display
2021-02-22 17:21:34 +11:00
Oliver Walters
7582b9ccf4 PEP fixes 2021-02-22 17:02:33 +11:00
Oliver Walters
9fe9cbc795 Fixes weird variant display
- Seems like the double import was at fault (somehow??)
2021-02-22 16:57:33 +11:00
Oliver Walters
7d54997cb8 Tweaks 2021-02-22 16:48:00 +11:00
Oliver Walters
bf51e1bfb1 Update label templates
- New ones are automatically copied across now
2021-02-22 16:39:38 +11:00
Oliver Walters
da715d7381 Refactoring label printing 2021-02-22 16:12:13 +11:00
Oliver Walters
caf4c293d9 Rename "barcode" module to "barcodes" to prevent import shadowing
- Add 'barcode' support
2021-02-22 15:15:25 +11:00
Oliver Walters
23da591c22 Remove old dependency on django_qr_code 2021-02-22 15:00:12 +11:00
Oliver Walters
828b3adc49 Update requirements.txt
- Remove blabel
- Remove django-qr-code
- Add python-barcode
- Add qrcode
2021-02-22 14:40:40 +11:00
Oliver Walters
a742df2c12 Adds 'length' and 'width' fields to label models 2021-02-22 10:10:58 +11:00
Oliver
ad6c69ecc7 Merge pull request #1336 from SchrodingersGat/app-info
Add app info to about dialog
2021-02-22 08:59:23 +11:00
Oliver Walters
89cdcda614 Add app info to about dialog 2021-02-22 01:10:11 +11:00
Oliver
beb155133a Update version.py 2021-02-21 21:50:52 +11:00
Oliver
2ac9eadd13 Update version.py 2021-02-21 21:49:38 +11:00
Oliver
d426e376c4 Merge pull request #1333 from SchrodingersGat/cleaner-homepage
Cleaner homepage
2021-02-21 21:36:28 +11:00
Oliver Walters
2b1101e165 remove unused files 2021-02-21 21:09:55 +11:00
Oliver Walters
afd7199a69 Cleanup search page too 2021-02-21 21:06:52 +11:00
Oliver Walters
745188082b Add more searchable fields to SupplierPart model 2021-02-21 21:06:44 +11:00
Oliver Walters
e53c6e9975 Fancy 2021-02-21 20:29:48 +11:00
Oliver
cc2b672117 Merge pull request #1335 from SchrodingersGat/stock-filter
Add option to filter out variants in stock table
2021-02-21 20:28:30 +11:00
Oliver Walters
d11adf3b34 fade in 2021-02-21 20:18:14 +11:00
Oliver Walters
dffff89e9d Add option to filter out variants in stock table 2021-02-21 20:08:23 +11:00
Oliver Walters
9d12d43574 Cleanup / refactor 2021-02-19 18:10:10 +11:00
Oliver Walters
116ea65160 Show / hide panels 2021-02-19 17:57:38 +11:00
Oliver Walters
6df6a460e4 Add items using javascript 2021-02-19 17:48:32 +11:00
Oliver
b95d6a4ab2 Merge pull request #1327 from SchrodingersGat/installed-test-results
Read test results from installed items
2021-02-19 16:49:51 +11:00
Oliver Walters
6037f1452a Unit testing for new feature 2021-02-19 15:50:32 +11:00
Oliver Walters
beeb94785d Add option for TestReport to include tests for installed items 2021-02-19 15:50:25 +11:00
Oliver
e02fb8c8fa Merge pull request #1332 from SchrodingersGat/destroyed-stock-adjust
Allow adjustment for destroyed (or lost) stock
2021-02-19 15:40:10 +11:00
Oliver Walters
ea4b713eed Allow adjustment for destroyed (or lost) stock 2021-02-19 15:13:56 +11:00
Oliver
ca16e4f35d Merge pull request #1330 from SchrodingersGat/supplier-part-packaging
Display supplier part packaging
2021-02-19 15:02:34 +11:00
Oliver Walters
ba71ce941f Display supplier part packaging 2021-02-19 14:34:21 +11:00
Oliver
5b549b8dea Merge pull request #1329 from SchrodingersGat/stock-packaging
Stock packaging
2021-02-19 12:52:38 +11:00
Oliver Walters
098b494047 Add option to disable stock item grouping 2021-02-19 11:31:38 +11:00
Oliver Walters
e8bacbe45f Edit packaging field 2021-02-19 11:11:22 +11:00
Oliver Walters
644583f636 Display packaging info in stock table 2021-02-19 11:09:24 +11:00
Oliver Walters
556d6455e8 Add "packaging" field for StockItem 2021-02-19 11:08:58 +11:00
Oliver Walters
a9f255be85 Prevent stock item being added as an installed item inside itself 2021-02-18 18:01:41 +11:00
Oliver Walters
ef23ab1abc Adds functionality for traversing "through" installed items to extract test results 2021-02-18 17:59:04 +11:00
Oliver
cdb3dd2aa5 Merge pull request #1325 from SchrodingersGat/build-bom-view
Adds "required parts" tab to build view
2021-02-18 17:58:20 +11:00
Oliver Walters
0c053c6339 Add action buttons to order or build stock 2021-02-18 17:25:39 +11:00
Oliver Walters
bfbcbe252b Adds "required parts" tab to build view 2021-02-18 17:14:57 +11:00
Oliver
8cb3d6ab0a Merge pull request #1321 from SchrodingersGat/next-build-order
Logic fix for "guessing" next build order number
2021-02-18 16:08:58 +11:00
Oliver Walters
43a7359501 Logic fix for "guessing" next build order number 2021-02-18 15:44:43 +11:00
Oliver
d2d842163d Merge pull request #1320 from SchrodingersGat/inherited-bom-used-in
Implement filtering which accommodates new inheritable BOM feature
2021-02-18 15:19:15 +11:00
Oliver Walters
0f60482e09 Add secondary dialog for creating new supplier 2021-02-18 14:59:13 +11:00
Oliver Walters
1b73f56937 modal content wrapper for secondary modal 2021-02-18 14:56:35 +11:00
Oliver Walters
e75b9d04fe PEP fix 2021-02-18 14:38:25 +11:00
Oliver Walters
7a51e6cf78 Implement filtering which accommodates new inheritable BOM feature
- Can no longer filter bom_items by sub_part
- Adds get_used_in_filter() and get_used_in() for part model (returns a query of other part objects)
2021-02-18 14:35:21 +11:00
Oliver
25ada20a19 Merge pull request #1315 from SchrodingersGat/copy-bom-fix
Fix for duplicating BOM
2021-02-18 08:22:05 +11:00
Oliver Walters
07ee27ad9b Another CSS tweak 2021-02-18 00:49:36 +11:00
Oliver Walters
3822b60bb0 CSS tweaks 2021-02-18 00:49:16 +11:00
Oliver Walters
abe1018abe Add new fields to BOM item hash 2021-02-18 00:40:30 +11:00
Oliver Walters
8caf6bad10 Fix for duplicating BOM
- Do not duplicate bom items which are "inherited"
2021-02-18 00:38:40 +11:00
Oliver
bf63005731 Merge pull request #1313 from SchrodingersGat/inherited-bom-items
Inherited bom items
2021-02-18 00:30:52 +11:00
Oliver Walters
3f30421ba9 bug fix 2021-02-17 23:57:45 +11:00
Oliver Walters
ef902fc313 Add bom_items to build order report context 2021-02-17 23:27:09 +11:00
Oliver Walters
bb3440a8a4 Refactor bom item filter
- Also updates a number of part functions to make use of inherited BOM items
2021-02-17 22:53:56 +11:00
Oliver Walters
1eb2456e3d Display inherited rows a bit differenter 2021-02-17 22:25:43 +11:00
Oliver Walters
5b402b6bc0 BOM table formatting
- Display link to external BOM
- Prevent item from being edited to selected
2021-02-17 22:18:32 +11:00
Oliver Walters
43eba3f7ec Add ability to include bom items inherited from parent parts in the API list 2021-02-17 22:05:17 +11:00
Oliver Walters
40d75090a7 Add 'inherited' flag to API 2021-02-17 21:53:26 +11:00
Oliver Walters
d692c18274 Add 'inherited' field to BomItem 2021-02-17 21:53:15 +11:00
Oliver
69708b842c Merge pull request #1309 from SchrodingersGat/order-requirement
Order requirement
2021-02-17 14:42:17 +11:00
Oliver Walters
afc33c59ea bug fix 2021-02-17 14:13:56 +11:00
Oliver Walters
08cc866e74 Add function to make barcode for build order 2021-02-17 13:47:14 +11:00
Oliver Walters
98bd7dfa9a Style fixes 2021-02-17 13:16:15 +11:00
Oliver Walters
fcc35f2260 Fix display of parts currently being built 2021-02-17 13:14:27 +11:00
Oliver Walters
ba542dcbdb Auto-fill build quantity 2021-02-17 13:06:18 +11:00
Oliver Walters
c8650ce34c Bug fix for tables 2021-02-17 13:05:58 +11:00
Oliver Walters
8780b8435a style fix 2021-02-17 12:46:05 +11:00
Oliver Walters
34df19242c Adds more context data 2021-02-17 11:08:11 +11:00
Oliver Walters
28c9c80f54 Calculate quantity required for sales orders
- Cache data going to part detail view
2021-02-17 10:57:17 +11:00
Oliver Walters
cda97829ab Add function for required build order quantity 2021-02-17 10:27:36 +11:00
Oliver
d2c9f759b1 Merge pull request #1305 from SchrodingersGat/incorrect-login-fix
Add message if username / password combo is rejected
2021-02-17 07:37:08 +11:00
Oliver Walters
baa352ca98 Add message if username / password combo is rejected 2021-02-16 22:34:24 +11:00
Oliver
a444f21e64 Merge pull request #1292 from SchrodingersGat/bom-report
BOM report
2021-02-16 21:32:28 +11:00
Oliver Walters
6b48f0db43 Unit test fixes 2021-02-16 20:56:18 +11:00
Oliver Walters
7071ef5a5c Fixes for build report template 2021-02-16 20:53:28 +11:00
Oliver Walters
7d30e75bc6 Display images in report debug mode 2021-02-16 20:40:09 +11:00
Oliver Walters
46f20593c5 Add default build order report
Toot toot refactor tractor
2021-02-16 20:39:07 +11:00
Oliver Walters
f87b15e4ea Refactoring 2021-02-16 20:14:13 +11:00
Oliver Walters
b09e9c0781 Fixes for URL generation 2021-02-16 17:16:36 +11:00
Oliver Walters
fdca3d842d Add report function for generating an internal link 2021-02-16 16:45:13 +11:00
Oliver Walters
81cac0927d Layout tweask 2021-02-16 16:04:24 +11:00
Oliver Walters
a416c56e5a pre-fill 'issued_by' user 2021-02-16 15:55:09 +11:00
Oliver Walters
a722057dab Display responsible and issuing users for build orders 2021-02-16 15:46:18 +11:00
Oliver Walters
31a8c94d2f Adds 'issued_by' and 'responsible' field to BuildOrder
- issued_by is a user
- responsible is a user or a group
2021-02-16 15:40:27 +11:00
Oliver Walters
6cc0880b4a Add INVENTREE_BASE_URL setting
- Also adds callable validator!
2021-02-16 15:31:04 +11:00
Oliver Walters
247c4bdb4b Print multiple build reports 2021-02-16 08:45:28 +11:00
Oliver Walters
b222119653 Add option to print build report 2021-02-16 08:36:04 +11:00
Oliver Walters
e72aaf2e07 PEP fixes 2021-02-16 08:25:52 +11:00
Oliver Walters
a349e77866 Adds model for BuildReport
- List / Detail / Print
2021-02-16 08:25:04 +11:00
Oliver
4431082440 Merge pull request #1294 from SchrodingersGat/login-static-files
Allow access to static files without being logged in
2021-02-13 19:48:27 +11:00
Oliver Walters
e0db833038 Rotated splash image for better handling of portrait view 2021-02-13 16:50:51 +11:00
Oliver Walters
39d9ecffec Add image attribution (need to work out how to make it more obvious) 2021-02-13 13:52:35 +11:00
Oliver Walters
99578e6986 Getting a little bit fancy 2021-02-13 13:49:21 +11:00
Oliver Walters
10e50cf5e4 Allow access to static files without being logged in 2021-02-13 12:19:10 +11:00
Oliver
998620b5f3 Merge pull request #1290 from SchrodingersGat/modal-css-fixes
Modal form CSS fixes
2021-02-12 21:32:46 +11:00
Oliver
16692a2905 Merge pull request #1288 from SchrodingersGat/part-table-fix
Remove code which was causing issue
2021-02-12 21:32:40 +11:00
Oliver
67b6123b70 Merge pull request #1289 from SchrodingersGat/null-units
Hide units when empty
2021-02-12 21:32:33 +11:00
Oliver Walters
e8fd336612 Fix getSubdir function 2021-02-12 21:32:26 +11:00
Oliver Walters
11099676ef Dialog for printing BOM reports 2021-02-12 21:23:56 +11:00
Oliver Walters
4e9b9ee6fd Detail and print view for the BOM report 2021-02-12 21:15:03 +11:00
Oliver Walters
9be2989971 Refactor printing code into ReportPrintMixin 2021-02-12 21:08:33 +11:00
Oliver Walters
a1cf893eb2 List API endpint for BOM reports 2021-02-12 20:55:13 +11:00
Oliver Walters
ba85ff63bf Refactor selectTestReport into selectReport 2021-02-12 20:38:30 +11:00
Oliver Walters
12821b80fb Add BOMReport model 2021-02-12 20:28:12 +11:00
Oliver Walters
19143ed082 Modal form CSS fixes 2021-02-12 20:13:17 +11:00
Oliver Walters
b22b82877d Hide units when empty 2021-02-12 20:01:09 +11:00
Oliver Walters
efc2290613 Remove code which was causing issue 2021-02-12 19:57:44 +11:00
Oliver
b43d6a2ad4 Merge pull request #1284 from eeintech/backup_restore
Added inv restore command
2021-02-11 09:25:49 +11:00
eeintech
d6eae83809 Added inv restore command 2021-02-10 10:55:04 -05:00
Oliver
89adac49f9 Merge pull request #1283 from SchrodingersGat/filter-validation
Wrap custom filter validation in try/except blocks
2021-02-10 21:20:03 +11:00
Oliver Walters
2fa7c8706b Wrap custom filter validation in try/except blocks 2021-02-10 20:40:15 +11:00
Oliver
9385447761 Merge pull request #1279 from SchrodingersGat/default-page-size
Default page size
2021-02-06 18:42:38 +11:00
Oliver Walters
a5c36e2ca8 Update scheme for inventree test report
- Copy across a simpler report which extends the "base" report
- This way the InvenTree report version is always up to date!
2021-02-06 18:07:27 +11:00
Oliver Walters
ef31727ec9 Would you like some PEPper with that? 2021-02-06 17:58:21 +11:00
Oliver Walters
30d95e1511 Add 'REPORT_DEBUG_MODE' setting
- If set, reports are printed in raw HTML
- Not pretty, but useful for debugging output of rendered template
2021-02-06 17:36:22 +11:00
Oliver Walters
dbaa0fc300 Add default page size for reports
- A4 / Legal / Letter
- Use this for the default page size for InvenTree reports
2021-02-06 17:11:20 +11:00
Oliver
2aa2f08658 Merge pull request #1275 from SchrodingersGat/report-revision
Report revision
2021-02-05 14:58:19 +11:00
Oliver Walters
b5e993872f Keep asset and snippet filenames the same (if possible) 2021-02-05 13:51:25 +11:00
Oliver Walters
d686fb5057 Fix typo in js file 2021-02-05 12:31:13 +11:00
Oliver Walters
f458342e5f Add report revision information to the template context 2021-02-05 12:02:16 +11:00
Oliver Walters
33d66182df Add "revision" number to report model
- Auto-increments whenever the model is saved
2021-02-05 12:01:44 +11:00
Oliver
af7a627230 Merge pull request #1271 from SchrodingersGat/migration-unit-test
Migration unit test
2021-02-04 23:56:12 +11:00
Oliver Walters
978ea7cc0b Typo fix 2021-02-04 23:11:19 +11:00
Oliver Walters
3c5169c793 So I learned something today...
In migration files you can access the "historical" pythonic model, and use that, with *all* the helpers,
rather than writing clunky old SQL!!!!

:'(
2021-02-04 23:10:10 +11:00
Oliver Walters
74704a7c1e Mark migrations with data operations "non atomic"
Ref: https://docs.djangoproject.com/en/dev/howto/writing-migrations/#non-atomic-migrations
2021-02-04 22:19:15 +11:00
Oliver
4d91a34136 Merge pull request #1270 from SchrodingersGat/report-templates
Adds "report snippet" class allowing re-usable report snippets
2021-02-04 22:14:38 +11:00
Oliver Walters
140c8b5395 Use integer field instead of boolean literal (not correct SQL) 2021-02-04 21:33:10 +11:00
Oliver Walters
62a7964dda PEP fixes 2021-02-04 21:17:20 +11:00
Oliver Walters
a0e7d37a19 Add setting for enabling / disabling test reports 2021-02-04 21:15:19 +11:00
Oliver Walters
5aec487c12 TestReport name no longer needs to be unique 2021-02-04 21:15:07 +11:00
Oliver Walters
bc36775270 Copy default test report across 2021-02-04 20:25:01 +11:00
Oliver Walters
98d291c2f8 Add model rule for ReportSnippet 2021-02-04 19:26:43 +11:00
Oliver Walters
59904ace1d Revoke support for LaTex reporting 2021-02-04 16:18:28 +11:00
Oliver Walters
264bd625d3 Remove debug string 2021-02-04 16:13:03 +11:00
Oliver Walters
0de284f1aa Unit fixes 2021-02-04 16:06:01 +11:00
Oliver Walters
6ebebe03d4 Simplify report snippet class definition 2021-02-04 15:38:41 +11:00
Oliver Walters
a025b7239d Adds simple test-report template 2021-02-04 15:29:46 +11:00
Oliver Walters
ddbf2a6313 Add margin callouts for report template base 2021-02-04 14:49:11 +11:00
Oliver Walters
cf0c43d899 Add report base template 2021-02-04 13:54:26 +11:00
Oliver Walters
6230fb3614 Add custom report template tags 2021-02-04 13:41:47 +11:00
Oliver Walters
801b945438 Add current date to report context 2021-02-04 13:33:14 +11:00
Oliver Walters
3ccc500e8e Add more context data to report 2021-02-04 12:58:19 +11:00
Oliver Walters
b107c54eb2 PEP fix 2021-02-04 09:13:45 +11:00
Oliver Walters
cabac6614c Add unit test for currency migration 2021-02-04 09:13:23 +11:00
Oliver Walters
e407b99d0d Add initial migration unit test for the 'part' app 2021-02-04 09:13:11 +11:00
Oliver Walters
d811f3c48a Typo fix
(cherry picked from commit c58399206c)
2021-02-04 08:39:27 +11:00
Oliver Walters
93f0dbd4ee Bug fix: add missing line
(cherry picked from commit 2303e03580)
2021-02-04 08:39:20 +11:00
Oliver Walters
ad0b59bf11 Bug fxi
(cherry picked from commit 0e11b722be)
2021-02-04 08:39:14 +11:00
Oliver Walters
b284fe7f2b Remove quotes around column names
(cherry picked from commit 386cb2dd3a)
2021-02-04 08:39:05 +11:00
Oliver Walters
75431f0ee4 Flake errors 2021-02-04 00:51:00 +11:00
Oliver Walters
e417ff2b4d Test migrations for build app 2021-02-04 00:44:37 +11:00
Oliver Walters
29bb735dc4 Helper functions to automatically extract migration file info 2021-02-04 00:25:00 +11:00
Oliver Walters
5c8e65c285 Only run linter checks for *new* migration files 2021-02-04 00:01:16 +11:00
Oliver Walters
f135f11564 Run lint checks on migration files 2021-02-03 23:56:59 +11:00
Oliver Walters
c2b5d96186 Ensure migration files are covered in coverage tests 2021-02-03 23:39:43 +11:00
Oliver Walters
bd9447d9aa Add django-migration-linter to ensure django migrations are tippy-top 2021-02-03 23:29:14 +11:00
Oliver Walters
34dbfe6d28 Test troublesome migration 0019 2021-02-03 23:16:23 +11:00
Oliver Walters
1d317b1ecb Add django-test-migrations package 2021-02-03 23:16:00 +11:00
Oliver Walters
cbadb2a888 Small refactor, and allow editing of ReportAsset in the admin interface 2021-02-03 21:54:11 +11:00
Oliver Walters
90bef69a59 Adds "report snippet" class allowing re-usable report snippets to be uploaded 2021-02-03 16:58:06 +11:00
Oliver
79ddea50f5 Merge pull request #1267 from SchrodingersGat/migration-fixes
Migration fixes
2021-02-03 14:48:21 +11:00
Oliver Walters
5e9097b5e0 PSQL: Upper-case column names *must* be qualified with double-quotes
Ref: https://www.xspdf.com/resolution/53039249.html
2021-02-03 13:16:32 +11:00
Oliver Walters
0e246a7fdf Migration fix (response is different for postgresql) 2021-02-03 13:02:28 +11:00
Oliver Walters
793e5b820e Remove all model references from migration file 2021-02-03 11:56:48 +11:00
Oliver Walters
bc43d14ebf Change model functions to raw SQL 2021-02-03 11:28:43 +11:00
Oliver Walters
f798537c73 Reverse migration company.0024 2021-02-03 09:52:59 +11:00
Oliver
65791a2b9b Merge pull request #1255 from SchrodingersGat/simple-qr-codes
Default to using "simple" QR codes
2021-02-01 13:37:42 +11:00
Oliver Walters
43e03ed023 Update unit tests 2021-02-01 12:26:58 +11:00
Oliver Walters
7d38507785 Merge remote-tracking branch 'inventree/master' into simple-qr-codes 2021-02-01 12:24:16 +11:00
Oliver
3449848682 Merge pull request #1266 from SchrodingersGat/barcode-data-fix
Limit barcode hash to printable characters.
2021-01-31 22:29:19 +11:00
Oliver Walters
97140b19ba Limit barcode hash to printable characters.
This is a dirty filthy hack, as the web-input strips non printable chars when they are typed in (but will accept them if they are copy-pasted)
2021-01-31 21:45:34 +11:00
Oliver
27b8928a10 Merge pull request #1263 from SchrodingersGat/table-translations
Table translations
2021-01-30 09:48:47 +11:00
Oliver
cb81d8b66a Merge pull request #1262 from SchrodingersGat/hide-barcode-button
Hide main QR button if setting is disabled
2021-01-29 13:06:48 +11:00
Oliver Walters
8fda2cf745 Fixes for unit tests 2021-01-29 12:47:46 +11:00
Oliver Walters
4ef6a6dc62 Translations for stock transaction notes 2021-01-29 12:23:22 +11:00
Oliver Walters
282ed0c637 Recompile translations 2021-01-29 12:05:47 +11:00
Oliver Walters
c1a54ddffd Expose bootstrap table strings to translation layer 2021-01-29 12:04:36 +11:00
Oliver Walters
62501ecb93 Hide main QR button if setting is disabled 2021-01-29 09:48:16 +11:00
Oliver
8c7621d4bc Merge pull request #1260 from SchrodingersGat/barcode-scanner
Barcode scanner
2021-01-29 00:42:50 +11:00
Oliver Walters
fc193c26d0 Delete unused function 2021-01-28 22:43:41 +11:00
Oliver Walters
489a15704c Refactoring 2021-01-28 22:41:20 +11:00
Oliver Walters
ae15ce9d0a Update translations 2021-01-28 22:38:47 +11:00
Oliver Walters
e8d73c78eb Fixes for unit tests 2021-01-28 22:37:28 +11:00
Oliver Walters
c61631a380 Refactor tractor 2021-01-28 22:24:06 +11:00
Oliver Walters
5e5bced0c7 Optionally include javascript code based on barcode feature 2021-01-28 21:51:34 +11:00
Oliver Walters
4641123cd8 Allow multiple stock items to be checked into a location using table selection 2021-01-28 21:47:39 +11:00
Oliver Walters
d61ae8532a Dialog for checking multiple items into a stock location 2021-01-28 21:36:57 +11:00
Oliver Walters
7e8def15ed Hide barcode actions if barcode support is disabled 2021-01-28 20:45:42 +11:00
Oliver Walters
51a33e5dca Add setting to enable / disable barcode support
(Default = True)
2021-01-28 20:18:03 +11:00
Oliver
14d24ebe07 Merge pull request #1258 from SchrodingersGat/part-image-fix
Prevent part images from auto deleting
2021-01-28 00:18:44 +11:00
Oliver Walters
220777611a Prevent part images from auto deleting
- Part images can be used for multiple parts
2021-01-27 22:31:21 +11:00
Oliver Walters
5c9dd93ff1 More unit test fix 2021-01-22 12:22:29 +11:00
Oliver Walters
03f7baf87f Unit test fixes 2021-01-22 09:50:30 +11:00
Oliver Walters
2d412e2be1 Default to using "simple" QR codes 2021-01-21 20:55:13 +11:00
Oliver
b90311acea Merge pull request #1250 from SchrodingersGat/url-col
Display link column in part table
2021-01-20 19:30:36 +11:00
Oliver Walters
69362ab960 Display link column in part table 2021-01-20 18:04:08 +11:00
Oliver
71522fa608 Merge pull request #1248 from SchrodingersGat/overdue-unit-test
Adds unit testing for order overdue status
2021-01-20 08:38:44 +11:00
Oliver Walters
82e6b87e1c Adds unit testing for order overdue status 2021-01-20 07:49:14 +11:00
Oliver
914fe15921 Merge pull request #1247 from Pervanovo/pr-fix-misspelled-query-filter
Fix misspelled query filter method name
2021-01-20 07:27:15 +11:00
Daniel Pervan
0d462389b9 Fix misspelled query filter method name 2021-01-19 12:00:30 +01:00
Oliver
d17cb47e3c Update version.py 2021-01-19 11:06:08 +11:00
Oliver
5c2012f873 Update version.py 2021-01-19 11:05:50 +11:00
Oliver
0517fe5073 Merge pull request #1243 from SchrodingersGat/report-filter-validation
Improve filter validation for test report
2021-01-19 11:05:24 +11:00
Oliver Walters
59e37b2526 Improve filter validation for test report 2021-01-19 08:15:50 +11:00
Oliver
ce28b84f34 Merge pull request #1242 from SchrodingersGat/batch-reports
Batch reports
2021-01-18 23:48:19 +11:00
Oliver Walters
f81c154578 Update translation files 2021-01-18 23:25:11 +11:00
Oliver Walters
436207b315 Merge remote-tracking branch 'inventree/master' into batch-reports
# Conflicts:
#	InvenTree/templates/stock_table.html
2021-01-18 23:23:58 +11:00
Oliver
a5aa90cdf2 Merge pull request #1155 from eeintech/stock_owner
Stock Locations and Items Ownership
2021-01-18 22:55:26 +11:00
Oliver Walters
833ba8c472 Template fixes 2021-01-18 22:45:07 +11:00
Oliver Walters
526d81481b Cleanup 2021-01-18 22:25:53 +11:00
Oliver Walters
697a338700 Add a smattering of unit tests 2021-01-18 22:14:38 +11:00
Oliver Walters
6a7c722efc Stock table button cleanup 2021-01-18 21:52:20 +11:00
Oliver Walters
952da19600 Print test report for multiple stock items at once 2021-01-18 21:42:55 +11:00
Oliver Walters
0a566c062d Add click callback on item test tab 2021-01-18 21:36:37 +11:00
Oliver Walters
ef7cc3f78d Replace existing django form views with API request 2021-01-18 21:33:15 +11:00
Oliver Walters
1b835a71df Print one (or more!) report templates via API 2021-01-18 21:17:19 +11:00
Oliver Walters
cbb286e46d Add API for stock item test report 2021-01-18 20:55:30 +11:00
Oliver
873ac9accb Merge pull request #1241 from SchrodingersGat/settings.py
Allow more settings to be specified via environment variables
2021-01-18 20:52:50 +11:00
Oliver Walters
f7079c3bc2 Style fixes 2021-01-18 20:21:19 +11:00
Oliver Walters
3ae4125df3 Allow more settings to be specified via environment variables 2021-01-18 20:17:36 +11:00
Oliver
1d6bd2c6ca Merge pull request #1240 from SchrodingersGat/translation-stats
Translation stats
2021-01-18 20:08:20 +11:00
Oliver Walters
c392bba196 Add script to calculate translation stats 2021-01-18 19:13:52 +11:00
Oliver Walters
c517801c5f Update doc strings for translation scripts 2021-01-18 18:51:10 +11:00
Oliver
2277d225eb Merge pull request #1239 from SchrodingersGat/stock-serial-fix
Stock serial fix
2021-01-18 16:50:54 +11:00
Oliver Walters
2b30df1a70 Fix 2021-01-18 14:41:31 +11:00
Oliver Walters
a7baad33ba Fix form error for creating a new stock item 2021-01-18 14:41:31 +11:00
eeintech
72c7ceb553 Merged master and updated stock_table.html 2021-01-17 13:11:59 -05:00
Oliver
2991ce9317 Merge pull request #1236 from SchrodingersGat/js-fix
Bug fix
2021-01-17 19:58:35 +11:00
Oliver Walters
0dee4df8fb Bug fix 2021-01-15 17:11:46 +11:00
Oliver
69e6006436 Merge pull request #1235 from SchrodingersGat/stock-updated-filter
Stock updated filter
2021-01-15 17:08:21 +11:00
Oliver Walters
4952c95c33 Extra check to prevent JS crash 2021-01-15 16:51:34 +11:00
Oliver Walters
fc32d99327 Add "updated_before" and "updated_after" filter for stock API 2021-01-15 16:39:50 +11:00
Oliver Walters
ef3ac43c4a Add "last updated" date to stock table 2021-01-15 15:27:40 +11:00
Oliver
8f4ae14f2d Merge pull request #1233 from SchrodingersGat/limit-matches
Limit matches to the 5 "most matchy" ones
2021-01-15 12:55:39 +11:00
Oliver Walters
85bce24e30 Limit matches to the 5 "most matchy" ones 2021-01-15 12:32:27 +11:00
Oliver
aada0ca5af Merge pull request #1212 from SchrodingersGat/label-api
Label API
2021-01-15 09:47:34 +11:00
eeintech
7d5571ba5b Merged changes from master 2021-01-14 08:52:56 -05:00
Oliver Walters
a70416abac Update translations 2021-01-15 00:04:31 +11:00
Oliver Walters
0134597747 Merge remote-tracking branch 'inventree/master' into label-api
# Conflicts:
#	InvenTree/locale/de/LC_MESSAGES/django.po
#	InvenTree/locale/en/LC_MESSAGES/django.po
#	InvenTree/locale/es/LC_MESSAGES/django.po
2021-01-14 23:56:23 +11:00
Oliver
449b462bf2 Merge pull request #1232 from SchrodingersGat/purchase-order-target-date
Purchase order target date
2021-01-14 23:26:58 +11:00
Oliver Walters
4fd0d7d8b5 Unit test fix 2021-01-14 23:06:49 +11:00
Oliver Walters
959914c78c Display overdue purchase orders in the calendar view 2021-01-14 22:19:32 +11:00
Oliver Walters
fef5b7548e Increase unit testing for order API 2021-01-14 22:06:53 +11:00
Oliver
af7af395f8 Merge pull request #1219 from rcludwick/secret_key
Fixes #1215.  Allow secret key to come from file.
2021-01-14 21:11:30 +11:00
Rob Ludwick
3cfe358102 Fixes #1215. Allow secret key to come from file. 2021-01-14 01:02:34 -07:00
Oliver Walters
02132fa495 Updated translation files 2021-01-14 17:55:00 +11:00
Oliver Walters
75e1442fce Display overdue purchase orders on the index page 2021-01-14 17:48:16 +11:00
Oliver Walters
e8fd597f29 Adds ability to edit target_date in purchaseorder form 2021-01-14 17:44:21 +11:00
Oliver Walters
21e8ddd1e6 Display overdue status on PurcahseOrder page 2021-01-14 17:42:38 +11:00
Oliver Walters
a8e6d0a89f Display overdue status in purchase order table
- Allow table to be filtered by "overdue" status
2021-01-14 17:37:10 +11:00
Oliver Walters
4d73aab090 Add "overdue" flag to serializer
- Also allow filtering by overdue status in the API
2021-01-14 17:33:24 +11:00
Oliver Walters
834d9ec9a1 Add "target_date" field to PurchaseOrder 2021-01-14 17:28:57 +11:00
Oliver
9efde9de29 Merge pull request #1231 from SchrodingersGat/slow-bom-fix
Add option to show part quantity in various forms
2021-01-14 15:35:39 +11:00
Oliver Walters
1dc2636e45 Add option to show part quantity in various forms
Enabling this option can make BOM item forms *very* slow!
2021-01-14 15:20:42 +11:00
Oliver
8d6b4a2fd3 Merge pull request #1229 from SchrodingersGat/cancel-order-fix
Bug fix for cancelling purchase orders
2021-01-14 15:03:36 +11:00
Oliver Walters
be41741b1e Bug fix for cancelling purchase orders 2021-01-14 14:37:49 +11:00
Oliver
76c938762c Merge pull request #1228 from SchrodingersGat/stock-status-ste
Stock status ste
2021-01-14 14:24:47 +11:00
Oliver
3ec57a7259 Merge pull request #1226 from SchrodingersGat/can-build
Add "Can Build" column in BOM view
2021-01-14 14:04:43 +11:00
Oliver Walters
bb9fe98a7e Set status for multiple stock items at once 2021-01-14 14:04:24 +11:00
Oliver Walters
aac835f634 Add menu item to set stock status for multiple items 2021-01-14 13:41:38 +11:00
Oliver Walters
d459947949 Add "Can Build" column in BOM view 2021-01-14 13:34:51 +11:00
Oliver
a2f9d721f3 Merge pull request #1222 from SchrodingersGat/bom-upload-fix
Fix IPN comparison against null value
2021-01-14 13:17:23 +11:00
Oliver Walters
1cb951bd0b Fix for font-awesome icon 2021-01-14 12:08:54 +11:00
Oliver Walters
df327d4e64 Add stocktake_date field to stock API, and to stock table 2021-01-14 11:29:35 +11:00
Oliver Walters
1316e6bf5b Properly save user data when creating a new StockItem 2021-01-14 11:24:52 +11:00
Oliver Walters
890ce9ef95 Fix IPN comparison against null value 2021-01-14 10:58:29 +11:00
Oliver Walters
df335b683c Add #TODO 2021-01-14 10:54:34 +11:00
eeintech
c5778b6fb6 Added missing migration file (how did it escape?) 2021-01-13 17:33:55 -05:00
eeintech
e92e5dfe8f Merged master 2021-01-13 17:08:01 -05:00
Oliver
e4b202edd8 Merge pull request #1221 from eeintech/new_rule_sets
Separated category from part permissions and location from stock item permissions
2021-01-14 08:38:44 +11:00
Oliver Walters
b7bbc97218 Add unit test 2021-01-14 08:32:37 +11:00
Oliver Walters
9884fe5c5e Improve validators for 'filters' field 2021-01-14 08:15:05 +11:00
Oliver Walters
88a7b3251d Remove unused import 2021-01-14 08:14:32 +11:00
eeintech
af1abb7129 Added missing migration file 2021-01-13 14:57:16 -05:00
eeintech
59c0a50289 Separated category from part permissions and location from stock item permissions 2021-01-13 13:35:49 -05:00
eeintech
28fb1b5fab Added owner model to admin page and added test cases 2021-01-13 11:38:37 -05:00
Oliver Walters
6e4cf7c092 Catch db integrity errors 2021-01-13 22:07:30 +11:00
Oliver Walters
80c88b4fcc Update translations 2021-01-13 21:53:11 +11:00
Oliver Walters
4e2d3b7da2 Improvement for existing StockItemLabel template 2021-01-13 21:52:16 +11:00
Oliver Walters
e561b3a4fc Add StockItemLabel templates 2021-01-13 21:51:55 +11:00
Oliver
eedd8059d8 Merge pull request #1217 from eeintech/bom_item_delete
Allow user with part.change permission to delete BOM items, part attachments and parameters
2021-01-13 10:16:25 +11:00
eeintech
a1b2347784 Also allow part attachements and parameters to be deleted 2021-01-12 17:43:12 -05:00
eeintech
ba1862478c Allow user with part.change permission to delete BOM items 2021-01-12 17:34:11 -05:00
eeintech
0a0a47a5e4 Added location owner change test case to verify stock item owner in that location is also updated 2021-01-12 17:11:46 -05:00
eeintech
3054c637dd Removed f-string debug 2021-01-12 16:42:09 -05:00
eeintech
5ca03af3e2 Improved Owner.get_owner method and fixed tests (try#2) 2021-01-12 16:36:29 -05:00
eeintech
49c954aa68 Fixed test cases? 2021-01-12 15:02:44 -05:00
eeintech
452d22579a Removed f-string causing build failure 2021-01-12 13:23:14 -05:00
eeintech
b6135fda74 Updated templates and a lot of manual testing 2021-01-12 13:16:04 -05:00
eeintech
9eace09e0e Added owner create method and fixed post_save receiver 2021-01-12 10:53:17 -05:00
eeintech
6f3cbb4e14 Switched to global owner model, need to validate use-cases table and fix tests 2021-01-11 17:41:29 -05:00
eeintech
6a88bdb37d StockLocation owner is now a GenericForeignKey that can be set to user or group models 2021-01-11 12:56:40 -05:00
Oliver Walters
01e27a0d59 Add simplified 'barcode' function for StockItem 2021-01-12 00:22:58 +11:00
Oliver Walters
663a0a6165 Create simple label templates for stocklocation labels 2021-01-11 23:45:25 +11:00
Oliver Walters
d1d243fb14 Update label models 2021-01-11 23:44:11 +11:00
Oliver Walters
b6cd2c215a Adds function to provide simplified barcode for stock location 2021-01-11 21:32:31 +11:00
Oliver Walters
1368b06afa PEP fix 2021-01-11 19:46:17 +11:00
Oliver Walters
d91700fd39 StockLocation labels are now printable 2021-01-11 18:41:57 +11:00
Oliver Walters
af47b211fd Add dialog for selection of stock location labels 2021-01-11 17:22:04 +11:00
Oliver Walters
79b63e6d30 Update translation 2021-01-09 22:23:51 +11:00
Oliver Walters
a3c5ea1f2b Typo fix 2021-01-09 22:02:33 +11:00
Oliver Walters
21d5440f98 Remove unused views 2021-01-09 21:55:05 +11:00
Oliver Walters
e133fff03e Download PDF for labels 2021-01-09 21:50:42 +11:00
Oliver Walters
bdc7367e29 Add endpoint for printing labels 2021-01-09 20:43:48 +11:00
Oliver Walters
44e60a705e Add detail endpoints for the StockItemLabel and StockLocationLabel models 2021-01-09 08:20:29 +11:00
Oliver Walters
a0d1f95171 Add exception for new database table 2021-01-09 08:10:04 +11:00
eeintech
587bf26d94 Fixed style 2021-01-08 14:23:35 -05:00
eeintech
2f78c7c036 Updated stock tests quantities 2021-01-08 14:05:53 -05:00
eeintech
d25a719724 Merge branch 'stock_owner' of github.com:eeintech/InvenTree into stock_owner 2021-01-08 13:51:49 -05:00
Oliver Walters
7c7a67fcc6 Add filterable API for StockLocation labels 2021-01-08 23:08:30 +11:00
Oliver Walters
f0fa092c66 Add model for StockLocation label 2021-01-08 23:08:00 +11:00
Oliver Walters
80c7ee6dab Add ability to filter label by StockItem 2021-01-08 22:47:47 +11:00
Oliver Walters
446c744462 Expose stock items labels to the API 2021-01-08 22:19:52 +11:00
Oliver
ab9a6bd3c4 Merge pull request #1211 from SchrodingersGat/attachment-api
Filter PartAttachment API list by Part reference
2021-01-08 12:22:59 +11:00
Oliver Walters
59bb5d15c8 Filter PartAttachment API list by Part reference 2021-01-08 08:43:00 +11:00
eeintech
67bc86c159 Updated stock owners migration file 2021-01-07 14:05:43 -05:00
eeintech
f26f1c38a2 Merged master 2021-01-07 13:50:29 -05:00
Oliver
5666db6b7a Merge pull request #1208 from SchrodingersGat/calendar
Add fullcalendar javascript library
2021-01-08 00:04:16 +11:00
Oliver Walters
75f31ecc63 Update translations 2021-01-07 23:50:34 +11:00
Oliver Walters
47b0f40e97 Calendar view for build orders 2021-01-07 23:41:54 +11:00
Oliver Walters
76c86e7b2f Calendar view for purchase orders 2021-01-07 23:04:00 +11:00
Oliver Walters
38b6367453 PEP fixes 2021-01-07 22:34:17 +11:00
Oliver Walters
b7203f0ebb Switch between calendar and list view for sales orders 2021-01-07 22:32:17 +11:00
Oliver Walters
5f6442ba6b Render sales orders to a calendar view 2021-01-07 18:47:29 +11:00
Oliver Walters
b4277e09e8 Add fullcalendar javascript library 2021-01-07 14:21:32 +11:00
Oliver
c377fb7b0c Merge pull request #1205 from SchrodingersGat/hide-report-button
Rearrange button options for StockItem
2021-01-07 00:34:23 +11:00
Oliver Walters
bb72658e76 Rearrange button options for StockItem 2021-01-07 00:18:18 +11:00
Oliver
735a3d2eb2 Merge pull request #1202 from SchrodingersGat/stock-expiry
StockItem expiry date
2021-01-06 23:51:18 +11:00
Oliver Walters
7ac7e8f969 Fixed unit test 2021-01-06 23:38:01 +11:00
Oliver Walters
a8e3e6c8db Update translation 2021-01-06 23:12:52 +11:00
Oliver Walters
e5b346e7fa PEP fixes 2021-01-06 23:09:26 +11:00
Oliver Walters
1d6a049c5a Annotate stock queryset with stale status 2021-01-06 23:06:49 +11:00
Oliver Walters
a5b18640af Display stale stock on index page 2021-01-06 22:30:12 +11:00
Oliver Walters
e62873a650 Display "stale" status on StockItem info page 2021-01-06 22:21:18 +11:00
Oliver Walters
ba915da22b Filter StockItem API by staleness 2021-01-06 22:20:54 +11:00
Oliver Walters
33d6396a4e Exclude expired stock from builds 2021-01-06 21:00:45 +11:00
Oliver Walters
580e7599a0 Prevent expired stock from being added to a sales order 2021-01-06 20:22:56 +11:00
Oliver Walters
9b086560cb Hide "expiry_date" column in Stock table if feature not enabled 2021-01-06 12:09:48 +11:00
Oliver Walters
d0fb69e67d Add option to enable / disable stock expiry feature
- Simply hides fields in form views
2021-01-05 08:50:07 +11:00
Oliver Walters
1335c85de1 Edit new stock settings on settings page 2021-01-05 00:59:10 +11:00
Oliver Walters
855098e30b Merge conflicting migration files 2021-01-05 00:58:48 +11:00
Oliver Walters
e715ea5d79 Merge remote-tracking branch 'inventree/master' into stock-expiry
# Conflicts:
#	InvenTree/common/models.py
2021-01-05 00:58:32 +11:00
Oliver Walters
213d6550d3 Add new setock settings 2021-01-05 00:54:05 +11:00
Oliver Walters
9a30108b75 Auto-update the expiry date in the StockItem form when switching Part selection 2021-01-05 00:37:42 +11:00
Oliver Walters
9dc9c0fcb7 Auto-populate expiry date for stockitem when created via the API
(Now with unit testing!)
2021-01-05 00:21:26 +11:00
Oliver Walters
da02ab3eac Add unit testing for view 2021-01-05 00:01:44 +11:00
Oliver Walters
7d7d5d24cc Pre-fill stockitem expiry date in CreateStockItem form 2021-01-04 23:40:51 +11:00
Oliver Walters
37dcf1c1cf Add "default_expiry" field to Part model 2021-01-04 23:36:11 +11:00
Oliver Walters
692cee113c Display "expiry date" column in stock table 2021-01-04 23:11:35 +11:00
Oliver Walters
4d7c60a130 Add "expired stock" table to index page 2021-01-04 09:46:14 +11:00
Oliver Walters
d1ce0f062e Improve unit testing for StockItem API 2021-01-04 01:22:43 +11:00
Oliver Walters
a0c95579b4 Display expiry status on StockItem page
- Also adds ability to filter Stock table by expired status
2021-01-04 00:21:47 +11:00
Oliver Walters
39b9dcfec9 Add 'expired' flag to StockItem serializer 2021-01-04 00:21:21 +11:00
Oliver Walters
1a930f7f80 Add ability to edit expiry_date for StockItem 2021-01-04 00:20:02 +11:00
Oliver Walters
6d4c81e68b Add ability to filter by 'expired' status in API 2021-01-04 00:19:48 +11:00
Oliver Walters
07cda765f0 Add "expiry_date" field to StockItem model
- Also adds "is_expired" function
2021-01-03 23:56:35 +11:00
Oliver
bc72cd612e Merge pull request #1201 from SchrodingersGat/settings
Settings Improvements
2021-01-03 23:47:35 +11:00
Oliver Walters
0f9c4703cf Update unit testing 2021-01-03 23:33:47 +11:00
Oliver Walters
b05504e1c4 Add PART_VIRTUAL setting 2021-01-03 23:13:58 +11:00
Oliver
fe3d4a9867 Merge pull request #1200 from SchrodingersGat/supplier-part-import
SupplierPart import/export fixes
2021-01-03 23:08:05 +11:00
Oliver Walters
0aeeba808c PEP fixes 2021-01-03 23:07:21 +11:00
Oliver Walters
6c7b648133 Implement global settings for assembly and template values of Part model 2021-01-03 23:06:51 +11:00
Oliver Walters
9fa37a9156 Improve visualisation of global settings 2021-01-03 22:57:39 +11:00
Oliver Walters
8e9c976e99 Update translations 2021-01-03 22:18:08 +11:00
Oliver Walters
2a91bb0c87 Update SupplierPart model to allow data importing
- django-import-export plugin seems to require null=True for char fields
- yes, this goes against django "best practice"
- Hopefully a better solution can be found
2021-01-03 22:16:32 +11:00
Oliver
bdc3a9ef02 Merge pull request #1198 from SchrodingersGat/stock-item-form-fix
Fix for StockItem create / edit forms
2021-01-03 14:15:56 +11:00
Oliver Walters
2ad090c224 pop purchase_price field for StockItemEdit form 2021-01-03 13:15:42 +11:00
Oliver Walters
fe0d356675 pops the purchase_price field instead of using a HiddenInput
Using a HiddenInput on a MoneyFormField causes a validation error, for some reason...
2021-01-03 13:13:14 +11:00
Oliver
11c6248b06 Merge pull request #1197 from SchrodingersGat/bom-fix
Fix variable scope issue
2021-01-03 10:30:47 +11:00
Oliver Walters
298e9cae65 Fix variable scope issue 2021-01-03 10:07:38 +11:00
Oliver
2dfa4d1acd Merge pull request #1196 from SchrodingersGat/target-date-optional
Target date optional
2021-01-03 09:00:46 +11:00
Oliver Walters
725a70327a Add some unit testing 2021-01-02 22:21:37 +11:00
Oliver Walters
b2a732197b Fix target date form field for SalesOrder 2021-01-02 21:54:07 +11:00
Oliver Walters
2b57ffeb08 Custom date picker field
- Prevents picker from being "required" by the form
2021-01-02 21:50:10 +11:00
Oliver Walters
03276629c2 CSS tweaks 2021-01-02 21:41:47 +11:00
eeintech
3ff76fbdab Merging master and resolved conflict 2020-12-18 17:08:37 -05:00
Oliver
7560b7e167 Merge pull request #1177 from SchrodingersGat/sales-order-overdue
Sales order overdue
2020-12-18 20:06:48 +11:00
Oliver Walters
08a8556fe7 Fix unit testing 2020-12-18 19:46:02 +11:00
Oliver Walters
13e924cc05 Fix default value for PO and SO codes 2020-12-18 16:10:55 +11:00
Oliver Walters
8e13a7b470 Add "overdue sales orders" to index page 2020-12-18 12:45:42 +11:00
Oliver Walters
c34196538b Filter API by overdue status 2020-12-18 12:40:47 +11:00
Oliver Walters
b21c6f0b99 Add overdue filter for salesorder table 2020-12-18 12:27:08 +11:00
Oliver Walters
c6134b54ab Add "overdue" status to SalesOrder serializer 2020-12-18 12:26:58 +11:00
Oliver Walters
000348f70f Add 'target_date' field to SalesOrder model 2020-12-18 12:19:16 +11:00
Oliver
8bb4683bbe Merge pull request #1175 from eeintech/fix_stock_template
Keep 'stock actions' button enabled when on children tab
2020-12-18 12:02:39 +11:00
Oliver
d38d9b21a9 Merge pull request #1174 from eeintech/fix_category_parameter_url
Fixed category parameter templates settings view
2020-12-18 12:00:51 +11:00
eeintech
1a48405491 Keep 'stock actions' button enabled when on children tab 2020-12-17 17:37:54 -05:00
eeintech
bcae1d09a8 Fixed category parameter templates settings view 2020-12-17 17:25:10 -05:00
Oliver
a8c6e79bc0 Merge pull request #1172 from SchrodingersGat/duplicate-ipn-fix
Bugfix for duplicate IPN checks when blank IPN is used
2020-12-16 21:53:14 +11:00
Oliver Walters
06d9f4f982 Bugfix for duplicate IPN checks when blank IPN is used 2020-12-16 21:02:53 +11:00
Oliver
7df25df2af Merge pull request #1168 from SchrodingersGat/order-date
Build Order Target Date
2020-12-16 19:36:10 +11:00
Oliver Walters
464d76a819 Update form title strings 2020-12-16 19:09:53 +11:00
Oliver Walters
447f0b0ed7 Update translations 2020-12-16 19:03:04 +11:00
Oliver Walters
0500036d0a settings.py - typo fix 2020-12-16 16:58:40 +11:00
Oliver Walters
261a9af4f5 Typo fix 2020-12-16 16:32:20 +11:00
Oliver
04336dd039 Merge pull request #1169 from SchrodingersGat/parent-test-link
Render link rather than just text
2020-12-16 16:29:54 +11:00
Oliver Walters
a9310d4a39 Add a #TODO in code 2020-12-16 16:16:07 +11:00
Oliver Walters
a8704a05d6 PEP style fixes 2020-12-16 16:15:39 +11:00
Oliver Walters
597bf8be73 Add date input to build target_date 2020-12-16 16:13:38 +11:00
Oliver Walters
6ef4325eac Javascript formatting 2020-12-16 15:55:42 +11:00
Oliver Walters
1a07ae0936 Render link rather than just text 2020-12-16 15:48:41 +11:00
Oliver
bf3b5bdd7f Merge pull request #1167 from SchrodingersGat/login-page
Improve rendering for login page
2020-12-15 23:34:32 +11:00
Oliver Walters
17d23fa47c Add overdue builds to the index page 2020-12-15 23:34:28 +11:00
Oliver Walters
c8c50af54b Filter builds by "overdue" status 2020-12-15 23:31:19 +11:00
Oliver Walters
51da26d21d Filter builds by "overdue" status 2020-12-15 23:27:59 +11:00
Oliver Walters
802dd5174c Add "target_date" for Build model
- Add "overdue" status to Build serializer
2020-12-15 23:24:37 +11:00
Oliver Walters
f11348c965 Improve rendering for login page 2020-12-15 22:39:57 +11:00
Oliver
a7d825158c Merge pull request #1164 from SchrodingersGat/stock-report-filter
Stock report filter
2020-12-15 13:32:13 +11:00
Oliver Walters
297bfd776c Pre-select a template if only one matching one exists 2020-12-15 12:31:02 +11:00
Oliver Walters
ef032d406f Bugfix for stock report filter 2020-12-15 11:57:52 +11:00
Oliver
980cb9522b Merge pull request #1162 from SchrodingersGat/gunicorn-conf
Update default gunicorn conf file
2020-12-14 11:00:57 +11:00
Oliver Walters
55b7cd3d6a PEP fix 2020-12-14 10:44:38 +11:00
Oliver
70cac17138 Merge pull request #1163 from SchrodingersGat/hide-purchase-price
Hide purchase price field for non-purchaseable parts
2020-12-14 10:43:21 +11:00
Oliver Walters
648595cf18 Hide purchase price field for non-purchaseable parts 2020-12-14 09:55:39 +11:00
Oliver Walters
d609e881c2 Update default gunicorn conf file 2020-12-14 09:43:07 +11:00
Oliver
1c168452a4 Merge pull request #1159 from eeintech/roles_overview
Display permission levels for each ruleset in Group admin list view
2020-12-11 10:03:56 +11:00
eeintech
1ef5a2b481 Display permission levels for each ruleset in Group admin list view 2020-12-10 15:38:48 -05:00
eeintech
33dfecfdef Added create view test cases for stock ownership 2020-12-03 13:29:59 -05:00
eeintech
3aad5111b5 Stock ownership: test case for edit stock location and item 2020-12-03 11:56:45 -05:00
eeintech
f99c83f69d Added test case for stock location ownership 2020-12-03 07:32:01 -05:00
eeintech
5c6939429a Improved handling of stock location owner 2020-12-02 17:19:41 -05:00
eeintech
1a7a460ba8 Hidden owner field when ownership control is disabled 2020-12-02 14:05:45 -05:00
eeintech
de1dfdcc38 Improved naming of new setting and variables 2020-12-02 13:38:53 -05:00
eeintech
2bdd1305ed Fix style 2020-12-02 13:26:26 -05:00
eeintech
c66ac2579e Updated StockItem create/edit view with ownership control 2020-12-02 13:25:33 -05:00
eeintech
2d7461f609 Updated StockLocation create/edit view with ownership control 2020-12-02 12:05:00 -05:00
eeintech
c9b3c16c6f Added help text on owner fields 2020-12-01 17:46:11 -05:00
eeintech
8dac6bb982 Updated template stock item logic and added to stock locations 2020-12-01 17:41:03 -05:00
eeintech
4104e7df8e Fixed template logic 2020-12-01 16:08:27 -05:00
eeintech
2c38be2d13 Added global setting and updated stock item templates 2020-12-01 15:54:05 -05:00
eeintech
e1fb7e5d98 Added owner field to both stock item and location tables and forms 2020-12-01 13:45:01 -05:00
Oliver
9dae7c1566 Merge pull request #1154 from SchrodingersGat/build-delete-fix
Change delete behaviour for parent build item
2020-12-01 12:36:24 +11:00
Oliver Walters
47d38e1cca Change delete behaviour for parent build item
- was causing database integrity errors when a parent build existed
2020-12-01 10:24:51 +11:00
Oliver
28a5ee32c4 Merge pull request #1152 from elmo2k3/fix-stocklist-sidebar
Fix sidenav in stocklist
2020-12-01 08:56:41 +11:00
Bjoern Biesenbach
95f62d529f Fix sidenav in stocklist 2020-11-30 18:30:51 +01:00
Oliver
a8f605c2e6 Merge pull request #1149 from SchrodingersGat/bom-upload-speed
Vastly improved speed of BOM upload
2020-11-27 15:25:46 +11:00
Oliver Walters
ea2f5009c8 Vastly improved speed of BOM upload
- Was calculating the stock levels for *every* part, for *every* drop down
- Many many many calls were being made
- Just remove stock count entirely from the drop-down menus
2020-11-27 14:40:30 +11:00
Oliver
a5e6ac2300 Merge pull request #1148 from SchrodingersGat/order-parts
Order parts
2020-11-27 12:28:04 +11:00
Oliver
b150c9c6bc Merge pull request #1147 from SchrodingersGat/form-fixes
Fixes for 'non field' errors in forms
2020-11-27 12:27:53 +11:00
Oliver Walters
50a88e4826 Revert "Add extra context to SupplierPartCreate form"
This reverts commit 5f8f0232a9.
2020-11-27 11:19:16 +11:00
Oliver Walters
6c68197e61 Allow part ordering from build view 2020-11-27 11:18:58 +11:00
Oliver Walters
7068f70811 Fixes for 'order parts' form
- Sometimes the part pk was not being retrieved properly
2020-11-27 11:18:45 +11:00
Oliver Walters
607cc90ce0 Add extra context to SupplierPartCreate form
(cherry picked from commit 5f8f0232a9)
2020-11-27 11:18:23 +11:00
Oliver Walters
5f8f0232a9 Add extra context to SupplierPartCreate form 2020-11-27 11:17:55 +11:00
Oliver Walters
56f05e2604 Fixes for 'non field' errors in forms
- Fixes issue where non-model fields would not show error text
2020-11-27 10:42:01 +11:00
Oliver
aacc7119bd Merge pull request #1144 from SchrodingersGat/bom-fixes
Bom fixes
2020-11-24 22:28:20 +11:00
Oliver Walters
083d7671d0 Bug fix for BOM table
If the BOM for part included a BomItem with the same PK as the top-level part,
the bootstrap-tree-grid library borked

Probably for good reason, too!

So we now ensure that the top-level key is unique
2020-11-24 21:19:19 +11:00
Oliver Walters
28333c1a21 Add a simple "shell" task 2020-11-24 21:18:00 +11:00
Oliver Walters
e3231bbedb Hide "pricing" information in the BOM table 2020-11-24 20:58:18 +11:00
Oliver
3ff0759bb9 Merge pull request #1142 from SchrodingersGat/bom-form-fixes
Bom form fixes
2020-11-24 14:23:04 +11:00
Oliver Walters
b5d75d6e6a PEP fixes 2020-11-24 11:56:51 +11:00
Oliver Walters
ce82579930 Cleanup getRequiredParts function 2020-11-24 10:18:07 +11:00
Oliver Walters
371ec582e1 Cleanup queryset for BomItemEdit view 2020-11-24 09:43:49 +11:00
Oliver Walters
3391db506a Cleanup queryset for BomItemCreate view 2020-11-24 09:43:32 +11:00
Oliver Walters
af9b88de11 Fix for BomItem clean function
Handle the case where the sub_part does not exist
2020-11-24 09:33:26 +11:00
Oliver
73259c0bcb Merge pull request #1140 from SchrodingersGat/request-frequency
Reduce duplicate function calls in custom context parser
2020-11-20 11:40:10 +11:00
Oliver
a0168515c3 Merge pull request #1139 from eeintech/fix_supplierpart_edit_form
Fix for SupplierPart edit form validation
2020-11-20 09:40:00 +11:00
Oliver Walters
20e8161038 Reduce duplicate function calls in custom context parser 2020-11-20 08:29:06 +11:00
eeintech
11745ebd6c Removed one too many indent 2020-11-19 15:32:42 -05:00
eeintech
4768c9cbb3 Fixed validation of SupplierPart edit form by forcing the value of single_pricing field 2020-11-19 15:31:39 -05:00
Oliver
6b104fbb8b Merge pull request #1136 from SchrodingersGat/warning-icon
Add framework for "health checks"
2020-11-19 13:30:17 +11:00
Oliver Walters
4049c8e915 Adds framework for "server health" display
- Adds global context object "system_healthy" (boolean)
- Framework for running system health checks
- Updated system info forms
- Displays warning next to user menu if system health errors exist

(cherry picked from commit ce6d626ab39147fc389de90815ca8baae2385d82)
2020-11-19 12:36:54 +11:00
Oliver
e55f4a2798 Merge pull request #1135 from SchrodingersGat/quoth-the-raven
Fixes for custom SQL queries
2020-11-19 10:34:53 +11:00
Oliver Walters
599220a931 Fixes for custom SQL queries
- Don't use double quotes!
- NO NO NO!
- Single quotes only
2020-11-19 09:15:16 +11:00
Oliver
0594ebaef7 Merge pull request #1133 from SchrodingersGat/stock-table-fix
Smallt tweaks for the Stock table
2020-11-18 15:24:06 +11:00
Oliver Walters
24fd520ec3 Smallt tweaks for the Stock table 2020-11-18 15:03:51 +11:00
Oliver
4daf291619 Merge pull request #1131 from SchrodingersGat/purchase-price-fix
Fix for StockItem creation form
2020-11-17 16:07:31 +11:00
Oliver Walters
6144d7e209 Fix for StockItem creation form
- purchase_price field was required (should not be!)
- Fixed some validation issues
- Cleaned up form implementation
2020-11-17 15:29:44 +11:00
Oliver
9fa718e58d Merge pull request #1130 from eeintech/api_category_parameters
Improved API endpoint for category parameter templates
2020-11-17 09:36:34 +11:00
eeintech
ac2797c7a1 Improved API endpoint for category parameter templates 2020-11-16 16:10:00 -05:00
Oliver
d8e7c2a932 Update version.py 2020-11-15 16:53:27 +11:00
Oliver
20f6964b1f Update version.py 2020-11-15 16:51:50 +11:00
Oliver
771efecaa2 Merge pull request #1127 from SchrodingersGat/settings-view-unit-test
Extra unit testing for settings forms / views
2020-11-14 09:19:31 +11:00
Oliver Walters
2e842503e6 Fix try statement 2020-11-14 07:39:51 +11:00
Oliver Walters
b738f8b143 Try transaction.atomic 2020-11-13 22:22:02 +11:00
Oliver Walters
aae1400929 Mayyyyyyyyyyyyybe? 2020-11-13 21:37:39 +11:00
Oliver Walters
5f9758e85f More fixes 2020-11-13 21:01:30 +11:00
Oliver Walters
03e852f957 Remove custom save method 2020-11-13 20:22:28 +11:00
Oliver
0bb8c0a1e3 Merge pull request #1128 from SchrodingersGat/settings-improvements
Improve settings.py
2020-11-13 15:32:48 +11:00
Oliver Walters
f0777ead92 Removed eprint statements 2020-11-13 14:39:28 +11:00
Oliver Walters
0f42916521 Improve settings.py
- Load database config from either config.yaml or environment variables
- Mix and match, if you want!
- Move to use logging module rather than just printing stuff
- Error if required database parameters are not required
2020-11-13 13:38:01 +11:00
Oliver Walters
ee70e27f7d Change function name 2020-11-13 13:21:43 +11:00
Oliver Walters
01ff562dcd Extra unit testing for settings forms / views 2020-11-13 11:50:58 +11:00
Oliver
1d4b826d03 Merge pull request #1124 from eeintech/fix_nocategory_templates_error
Check that category was selected before fetching templates
2020-11-13 10:41:51 +11:00
Oliver
d777549a1a Merge pull request #1123 from eeintech/fix_form_errors
Fixed disabling of form errors messing-up with global settings validation
2020-11-13 09:59:57 +11:00
Oliver
3130b672b4 Merge pull request #1117 from SchrodingersGat/currency-support
Currency support
2020-11-13 09:13:55 +11:00
eeintech
d4ac35b9aa Check that category was selected before fetching templates 2020-11-12 16:52:22 -05:00
eeintech
80b70fd2df Fixed disabling of form errors messing-up with global settings 2020-11-12 16:38:35 -05:00
Oliver Walters
362437e75e PEP fixes 2020-11-13 07:28:21 +11:00
Oliver Walters
f239c8f8c8 Add missing migration file 2020-11-12 22:04:50 +11:00
Oliver Walters
ae7fbd6112 Add PEP8-naming extension for flake
- Enforcing python naming checks
2020-11-12 21:53:04 +11:00
Oliver Walters
47cbf3071d Add option to add a single-quantity price-break when creating a new SupplierPart object
- Add unit testing!
2020-11-12 21:36:32 +11:00
Oliver Walters
534f43872f Bug fix for SupplierPart table 2020-11-12 20:14:10 +11:00
Oliver Walters
fd79f1ea0e Fixes for 'single pricing' for SupplierPart 2020-11-12 19:46:19 +11:00
Oliver Walters
7879c7565e More fixes to .travis.yml
Database in a strange location?
2020-11-12 19:11:12 +11:00
Oliver Walters
6e7224ee7c Add "purchase price" field to PurchaseOrderLineItem table 2020-11-12 18:05:24 +11:00
Oliver Walters
0988040172 Catch exception where InvenTree setting object is referenced but the database is not migrated yet 2020-11-12 18:04:50 +11:00
Oliver Walters
cb3c86f87a Merge remote-tracking branch 'inventree/master' into currency-support
# Conflicts:
#	InvenTree/InvenTree/settings.py
#	InvenTree/InvenTree/urls.py
#	InvenTree/templates/InvenTree/settings/tabs.html
#	InvenTree/users/models.py
#	requirements.txt

IMPORTANT: Had to merge some migration files due to different migrations applied on the part model tables
2020-11-12 17:24:48 +11:00
Oliver
265a29fa1a Merge pull request #1122 from SchrodingersGat/import-export-fix
Fixes for import / export of data
2020-11-12 17:06:50 +11:00
Oliver Walters
4765065eb0 Make sure to run database migrations first! (DUH) 2020-11-12 16:41:43 +11:00
Oliver Walters
563bfe9bf5 Further fixes to tasks.py 2020-11-12 16:10:00 +11:00
Oliver Walters
96ef5e1bde Travis fixes 2020-11-12 15:37:21 +11:00
Oliver Walters
fe9749ba4f Add missing fixture for settings 2020-11-12 14:54:03 +11:00
Oliver Walters
21315096d4 Further unit testing fixes 2020-11-12 14:53:49 +11:00
Oliver Walters
1738df9042 Update unit tests 2020-11-12 14:48:57 +11:00
Oliver Walters
ec8d8e5a64 Add more invoke commands:
- export-records: Exports all database records to external file
- import-records: Imports database records from external file
- import-fixtures: Fills the database with dummy records
2020-11-12 13:31:27 +11:00
Oliver Walters
4a8170079e Remove code which automatically created settings objects on server launch 2020-11-12 12:31:03 +11:00
Oliver Walters
b7187c5e06 Fixes for purchase order table displays 2020-11-12 12:27:01 +11:00
Oliver Walters
391eeb0e46 Specify default currency when creating a new stock item 2020-11-12 11:50:59 +11:00
Oliver Walters
51d2d85c26 When creating a new price break for a supplier part, default to using the currency code specified for the supplier company 2020-11-12 11:14:50 +11:00
Oliver Walters
1532be9c1e Add 'currency' option for company
- e.g. an external supplier might have a default currency
- Adds a form input which only allows selection of allowed currency codes
- Add unit testing for currency validation
2020-11-12 11:02:10 +11:00
Oliver
643589b4a9 Merge pull request #1096 from eeintech/categories_parameters
Categories parameter templates
2020-11-12 09:32:01 +11:00
eeintech
b4fa56fd96 Fixed PART_CATEGORY_PARAMETERS duplicate (bad merging... oopsy) 2020-11-11 12:40:03 -05:00
eeintech
bfdda847c4 Updated part migration reference in 0054 2020-11-11 11:18:10 -05:00
Francois
a7444a9926 Merge branch 'master' into categories_parameters 2020-11-11 06:40:11 -05:00
Oliver
4430098e98 Merge pull request #1120 from SchrodingersGat/used-in-fix
A little whoopsie-doo:
2020-11-11 16:47:34 +11:00
Oliver Walters
039a7badd1 A little whoopsie-doo:
- Part.clean() was incorrectly referencing a BomItem when it should have been referencing BomItem.part
2020-11-11 16:09:14 +11:00
Oliver
6d5bdaadbd Merge pull request #1118 from SchrodingersGat/log-viewer
Add requirement for django-error-report
2020-11-11 16:00:48 +11:00
Oliver Walters
56765d3f5a Fix for unit testing 2020-11-11 15:19:15 +11:00
Oliver Walters
6c667937c5 Add requirement for django-error-report
- Provides an error log viewer in the admin interface at /admin/error_report/error/
- Allows viewing of error logs even in a remote production environment (i.e. no access to command line)
2020-11-11 14:10:12 +11:00
Oliver Walters
ebac06ebee Add 'single_pricing' form to the EditSupplierPartForm
- Idea here is to automatically create a unit-pricing price-break when a new SupplierPart is created
2020-11-11 13:55:25 +11:00
Oliver Walters
fc89501a62 Fix for SQL cursor query
- What works in SQLite don't necessarily fly with the big boys
2020-11-11 08:06:14 +11:00
Oliver Walters
5567ad07fd Update tests and translations 2020-11-11 00:31:39 +11:00
Oliver Walters
a19cf1f27a PEP fixes 2020-11-11 00:26:59 +11:00
Oliver Walters
4dff18e4a6 Remove common_currency model entirely
- A lot of views / pages / etc needed to be updated too
- Now uses django-money fields entirely
- Create a manual rate exchange backend (needs more work!)
2020-11-11 00:21:06 +11:00
Oliver Walters
1fc2ef5f18 Custom migration for PartSellPriceBreak 2020-11-10 22:31:46 +11:00
Oliver Walters
83582ae87f Add custom migration for the part_supplierpricebreak model
- Copies across existing pricing data
- Yikes
2020-11-10 22:25:05 +11:00
Oliver Walters
e4f2eecb3b Remove defunct 'build_order' field from StockItem model
- This is now handled by the new-and-improved build system, no longer required
2020-11-10 20:12:39 +11:00
Oliver Walters
978fd7c683 Implement default currency selection
- Add 'choices' option to InvenTreeSetting class
- Add support for ChoiceField in InvenTreeSetting form
2020-11-10 17:08:08 +11:00
Oliver Walters
48c20c600a List supported currencies in the configuration template 2020-11-10 16:28:55 +11:00
Oliver Walters
734436b02e Add integration of django-money
- Proper currency support
- Add PurchasePrice field to StockItem model
- This keeps track of both the price and the currency
- Display purchase price on the stockitem detail page
2020-11-10 16:22:42 +11:00
Oliver
9d9ef5fc9c Merge pull request #1116 from SchrodingersGat/duplicate-ipn
Add setting to allow or prohibit duplicate IPN values
2020-11-10 10:52:30 +11:00
Oliver
9ac334ddd2 Merge pull request #1115 from eeintech/fix_form_errors
Fix for #1111 (missing logic to check for model errors)
2020-11-10 10:25:09 +11:00
Oliver Walters
a6028f027a Add setting to allow or prohibit duplicate IPN values 2020-11-10 09:03:26 +11:00
eeintech
b17b8db25c Fix for #1111 (missing logic) 2020-11-09 17:00:12 -05:00
Oliver
eead52a5dd Merge pull request #1114 from SchrodingersGat/part_options
Part options
2020-11-10 08:28:23 +11:00
Oliver Walters
7286281a06 Fix for unit testing 2020-11-10 07:14:38 +11:00
Oliver Walters
c4296ad4f1 Update migrations and translation 2020-11-09 23:47:31 +11:00
Oliver Walters
c95f124578 Add some helper magic for setting objects
- If the setting is defined as a "bool" then the returned value is automatically cast to a bool
- Add some more unit testing
2020-11-09 23:44:54 +11:00
Oliver Walters
75ab7b247b Push part settings into part/settings.py
- Use the user-configurable defaults in the database model itself
- This means they are observed even when using the API / etc
2020-11-09 23:16:04 +11:00
Oliver Walters
e1b70ff68f Add default values for create part form 2020-11-09 22:52:32 +11:00
Oliver Walters
8149759852 Add some more part options which set the default values for the following fields:
- Purchaseable
- Salable
- Trackable
2020-11-09 20:26:19 +11:00
Oliver
826c471179 Merge pull request #1107 from eeintech/fix_postgres_migration
Fix PostGreSQL migration (permissions handler)
2020-11-06 07:58:56 +11:00
Oliver
dadf4d4c13 Merge pull request #1110 from eeintech/order_save_fix
Fixed saving of purchase and sales order create forms
2020-11-06 07:53:41 +11:00
Oliver
d23444a86a Merge pull request #1111 from eeintech/disable_crispy_form_errors
Disable crispy form errors
2020-11-06 07:53:11 +11:00
eeintech
ba2da17f1e Disabled crispy form errors 2020-11-05 14:44:04 -05:00
eeintech
5b3dd63b89 Fixed saving of purchase and sales order forms 2020-11-05 14:38:54 -05:00
eeintech
684db67733 Added check for remove too 2020-11-05 09:37:01 -05:00
eeintech
0b76d1d036 Check if permission is not NoneType before adding to group 2020-11-05 09:34:18 -05:00
Oliver
15ea73a448 Merge pull request #1106 from SchrodingersGat/build-tabs
Rename tabs for build order
2020-11-05 20:39:25 +11:00
Oliver Walters
a35c4a5a95 Rename tabs for build order 2020-11-05 20:07:23 +11:00
Oliver
7e4b84f016 Merge pull request #1105 from SchrodingersGat/build-fix-fixes
Set the specified location of a build output
2020-11-05 18:25:00 +11:00
Oliver Walters
2591d34260 Fixed bug where "New output" button stopped working
- Build status was changing from "PENDING" to "PRODUCTION"
- Created new check for active builds
2020-11-05 15:57:46 +11:00
Oliver Walters
d44092b209 Fix issue with shadowed form field
- Rename "quantity" to "output_quantity" to address this
2020-11-05 15:52:38 +11:00
Oliver Walters
8b7789cdb3 Set the specified location of a build output 2020-11-05 15:46:42 +11:00
Oliver
6c89a2aaeb Merge pull request #1099 from eeintech/fix_related_parts
Fix PartRelated (based on updated AjaxCreateView class)
2020-11-05 09:51:06 +11:00
eeintech
324645b67c Added same level category checkbox and method when adding category template 2020-11-04 12:26:10 -05:00
eeintech
e401bb8e3c Improved tests, fixed admin, improved naming 2020-11-04 12:06:07 -05:00
eeintech
1c14c2237a Moved category templates processing to Part save() method 2020-11-04 09:52:26 -05:00
eeintech
9eba564ff6 Merge branch 'master' of git://github.com/inventree/InvenTree into categories_parameters 2020-11-04 07:52:16 -05:00
eeintech
142cea0cbb Removed custom form save method, remove unused model methods, restored InvenTree CreateAjaxView, improved part related testing 2020-11-04 07:44:06 -05:00
eeintech
853a821497 Merge branch 'master' of git://github.com/inventree/InvenTree into fix_related_parts 2020-11-04 06:46:20 -05:00
Oliver
dc626ed68b Merge pull request #1103 from SchrodingersGat/image-upload-fixes
Bug fix: Part thumbnail API list was not working
2020-11-04 16:24:04 +11:00
Oliver Walters
f560be1a9a Bug fix: Part thumbnail API list was not working
- Part images could not be selected from grid
2020-11-04 15:41:17 +11:00
Oliver
ede7d6dbde Merge pull request #1102 from SchrodingersGat/coveralls-fix
Updated to latest version of coverage and coveralls
2020-11-04 14:12:57 +11:00
Oliver Walters
5f6f722d6c Change from python-coveralls to coveralls 2020-11-04 13:30:17 +11:00
Oliver Walters
f8da15287c Updated to latest version of coverage and coveralls 2020-11-04 09:35:43 +11:00
Oliver
fc99086c8f Merge pull request #1101 from SchrodingersGat/delete-on-deplete-fix
Logic fix for editing stock item creation form
2020-11-04 09:33:52 +11:00
eeintech
4e157fe956 Fixed text for parent categories checkbox 2020-11-03 17:05:08 -05:00
eeintech
279d5a00ce Switched to get_ancestors to transverse all parents categories (not only root) 2020-11-03 16:58:53 -05:00
eeintech
5a5a36083e Finalized implementation when creating new part 2020-11-03 16:54:46 -05:00
Oliver Walters
56b287b2c8 Logic fix for editing stock item creation form 2020-11-04 08:29:09 +11:00
eeintech
72b5a105f8 Made all categories accessible for parameter templates configuration 2020-11-03 14:45:53 -05:00
eeintech
0882528b82 Missing class trailing space 2020-11-03 11:15:16 -05:00
eeintech
32b46cdc2a Added better PartRelated creation test 2020-11-03 11:14:31 -05:00
eeintech
de2b7e5daf Re-added post_save method in AjaxCreateView 2020-11-03 08:03:16 -05:00
eeintech
6b702ef676 Manually merged part migrations 2020-11-03 07:27:51 -05:00
Francois
b1885138de Merge branch 'master' into categories_parameters 2020-11-03 07:01:56 -05:00
Oliver
1e844c642f Merge pull request #1063 from SchrodingersGat/build-fixes
Build system updates
2020-11-03 22:58:38 +11:00
Oliver Walters
2e1a5a85a3 Bug fix for unit testing 2020-11-03 22:14:02 +11:00
Oliver Walters
3ea671986c Merge conflicting migration files 2020-11-03 21:29:25 +11:00
Oliver Walters
083dac1300 Merge remote-tracking branch 'inventree/master' into build-fixes 2020-11-03 21:26:39 +11:00
Oliver
1c503adced Merge pull request #1026 from eeintech/user_unique_group_validation
Added check for multiple groups assigned to user
2020-11-03 21:21:08 +11:00
Oliver
ef2c04baa8 Merge pull request #1048 from eeintech/related_parts
Related Parts
2020-11-03 21:18:27 +11:00
Oliver Walters
897d9b4831 Update translation files 2020-11-03 21:02:31 +11:00
Oliver Walters
5988e847ce Add serial number suggestions 2020-11-03 21:01:14 +11:00
Oliver Walters
8d0845d92b Mark a build as "production" whenever a build output is created 2020-11-03 20:43:49 +11:00
Oliver Walters
ac03dab8de Tweaks 2020-11-03 20:37:33 +11:00
Oliver Walters
2b91f69c7d Fix unit tests 2020-11-03 20:19:24 +11:00
Oliver Walters
b936f67d87 Various form fixes
- Updating forms, a lot has changed!
2020-11-03 16:21:40 +11:00
Oliver Walters
152801f06f Dramatic speed improvements for build completion
- Might still need to be a background task at some point..
2020-11-03 15:56:20 +11:00
Oliver Walters
3f03adba72 Bug fix for stock table
- Grouped rows were not displaying the part name
2020-11-03 15:05:13 +11:00
eeintech
13a07be728 Added PartCategoryParameterTemplate tests 2020-11-02 15:35:54 -05:00
eeintech
6320384ecb Fixed category parameter template edit form 2020-11-02 15:05:37 -05:00
eeintech
43fab8a8b3 Backtracked on setting category choices (fixed failed migration) 2020-11-02 13:28:34 -05:00
eeintech
34b784d1e4 Added setting, checkbox (PartCreateView only) and hook to create part parameters from category templates 2020-11-02 13:14:31 -05:00
eeintech
978b5f869d Added checkbox to add parameter template to all categories 2020-11-02 12:20:29 -05:00
Oliver Walters
05613b9642 Further build tweaks / improvements 2020-11-02 23:47:36 +11:00
Oliver Walters
f5d0d54ded Improve modal error message 2020-11-02 23:02:02 +11:00
Oliver Walters
500da8099b Add forms / views for creating a new build output, and completing the build
- Also some refactoring of how forms are handled and saved
2020-11-02 22:56:26 +11:00
Oliver Walters
b02c87ea50 Lots of work towards multiple build output 2020-11-02 01:24:31 +11:00
Oliver Walters
f1b83f1c17 Update fixtues for unit testing 2020-11-01 15:34:42 +11:00
eeintech
3a347fba21 Added edit/delete for category parameter templates 2020-10-31 12:55:52 -05:00
eeintech
2a563d7370 Added category list of parameter templates table to settings 2020-10-31 09:18:33 -05:00
eeintech
3e5d8d2b2d Added form to select category in settings and update context data 2020-10-31 08:35:47 -05:00
eeintech
5310ce8465 First step into managing Category Parameters to InvenTree settings 2020-10-30 17:17:18 -05:00
eeintech
34ff05d66e Created PartCategoryParameterTemplate model and admin interface 2020-10-30 16:09:27 -05:00
Oliver Walters
95fadf1300 Update unit testing 2020-10-30 23:08:12 +11:00
Oliver Walters
3a702266e6 Merge remote-tracking branch 'inventree/master' into build-fixes
# Conflicts:
#	InvenTree/InvenTree/views.py
#	InvenTree/build/views.py
#	InvenTree/locale/de/LC_MESSAGES/django.po
#	InvenTree/locale/en/LC_MESSAGES/django.po
#	InvenTree/locale/es/LC_MESSAGES/django.po
#	InvenTree/order/views.py
#	InvenTree/part/api.py
#	InvenTree/part/views.py
#	InvenTree/templates/js/bom.js
2020-10-30 22:44:25 +11:00
Oliver
ad90adbc04 Merge pull request #1095 from SchrodingersGat/forms
Refactor how form errors are handled
2020-10-30 22:12:45 +11:00
Oliver Walters
1caa341f8e Fixes for unit tests 2020-10-30 21:34:56 +11:00
Oliver Walters
e049ca1a85 More refactoring 2020-10-30 16:54:05 +11:00
Oliver
87903f27ed Merge pull request #1094 from SchrodingersGat/typo-fix
Fixed a typo in bom.js
2020-10-30 16:23:07 +11:00
Oliver Walters
c533f59405 Refactor how form errors are handled
- Use form.add_error (as the django gods intended)
2020-10-30 16:04:56 +11:00
Oliver Walters
cabbdbb5cf Fixed a typo in bom.js 2020-10-30 15:53:13 +11:00
Oliver
fb28204dfd Merge pull request #1093 from SchrodingersGat/bom-filters
Add filtering for BOM table
2020-10-30 12:45:46 +11:00
Oliver Walters
2428e77969 Add filtering for BOM table 2020-10-30 11:45:54 +11:00
Oliver
1311e5fe58 Merge pull request #1092 from SchrodingersGat/copy-bom
Copy bom
2020-10-30 11:40:06 +11:00
Oliver Walters
5c5641d884 Update calls to post_save 2020-10-30 10:12:42 +11:00
Oliver Walters
2d583d19c2 Adds function to duplicate a BOM from a parent part
- Improves form validation workflow
- More 'djangoesque'
2020-10-30 10:08:06 +11:00
Oliver Walters
90cfb3496a Merge remote-tracking branch 'inventree/master' into build-fixes
# Conflicts:
#	InvenTree/locale/de/LC_MESSAGES/django.mo
#	InvenTree/locale/de/LC_MESSAGES/django.po
#	InvenTree/locale/en/LC_MESSAGES/django.po
#	InvenTree/locale/es/LC_MESSAGES/django.po
#	InvenTree/templates/js/bom.js
2020-10-29 15:23:51 +11:00
Oliver
a148cfe593 Merge pull request #1088 from SchrodingersGat/tweaks
Tweaks
2020-10-29 15:16:49 +11:00
Oliver Walters
1d6d1121a7 Add some more icons 2020-10-29 13:58:05 +11:00
Oliver Walters
f1a7ac3187 Add icon badges to bom.js 2020-10-29 13:26:32 +11:00
Oliver Walters
fda0bff14c Tweaks to part.js 2020-10-29 13:20:42 +11:00
Oliver Walters
8246e9c802 Add function makeIconBadge for tables
- Add filters for part variants table
2020-10-29 13:18:45 +11:00
Oliver Walters
b3ac261746 Add filter for supplier part table:
Filter by "active" status
2020-10-29 12:50:17 +11:00
Oliver Walters
60a8ef723b Simplify display of possible conflicting parts
- Round to single digit
- Only show 5 closest matches

(cherry picked from commit ed8be5225d)
2020-10-29 12:42:38 +11:00
Oliver Walters
05ce17f8df Tweaks 2020-10-29 09:45:42 +11:00
Oliver Walters
a263d2fdcd Fixes for "auto allocate" concept 2020-10-29 00:49:01 +11:00
Oliver Walters
551064b3a4 Bugfix: BOM API now works slightly differently 2020-10-29 00:07:51 +11:00
Oliver Walters
544b63cac5 Merge remote-tracking branch 'inventree/master' into build-fixes
# Conflicts:
#	InvenTree/locale/de/LC_MESSAGES/django.po
#	InvenTree/locale/en/LC_MESSAGES/django.po
#	InvenTree/locale/es/LC_MESSAGES/django.po
2020-10-29 00:01:10 +11:00
Oliver Walters
4a7e9a2278 Update translations and PEP fixes 2020-10-28 23:59:18 +11:00
Oliver Walters
ed8be5225d Simplify display of possible conflicting parts
- Round to single digit
- Only show 5 closest matches
2020-10-28 23:48:35 +11:00
Oliver Walters
091a9d9803 Refactor how form errors are handled
- When in doubt, refer to the django docs
- There was a *much* better way (thanks, form.add_error)!
- The anti-pattern was deleted, and lo, there was much rejoicing
- Some other refactoring too
2020-10-28 23:33:33 +11:00
Oliver
6dc5ef0cdc Merge pull request #1085 from SchrodingersGat/more-icons
More template updates
2020-10-28 23:29:15 +11:00
Oliver Walters
d8ada930c8 More template updates
- Add icons to more action buttons
2020-10-28 22:37:58 +11:00
Oliver Walters
d06b4d7c9f Merge remote-tracking branch 'inventree/master' into build-fixes
# Conflicts:
#	InvenTree/InvenTree/urls.py
#	InvenTree/locale/de/LC_MESSAGES/django.mo
#	InvenTree/locale/de/LC_MESSAGES/django.po
#	InvenTree/locale/en/LC_MESSAGES/django.po
#	InvenTree/locale/es/LC_MESSAGES/django.po
#	InvenTree/part/templates/part/bom.html
#	InvenTree/templates/js/build.js
#	InvenTree/templates/js/table_filters.js
#	InvenTree/templates/stock_table.html
#	tasks.py
2020-10-28 22:25:14 +11:00
Oliver
c8ec55a5fe Merge pull request #1084 from SchrodingersGat/used-in-table
Used in table
2020-10-28 21:21:44 +11:00
Oliver Walters
44010fe05b Translation updates 2020-10-28 18:30:50 +11:00
Oliver Walters
d0b7d91ca4 Update multiple templates with fontawesome icons 2020-10-28 18:30:38 +11:00
Oliver Walters
d272eec384 Update translation files 2020-10-28 18:13:19 +11:00
Oliver Walters
5e70d8df7e Rename javascript files from .html to .js 2020-10-28 18:13:02 +11:00
Oliver Walters
c63480c65b Improve table for displaying what parts a particular part is "used in" 2020-10-28 18:12:38 +11:00
Oliver Walters
3ec2396ec1 Updated allocation card view 2020-10-27 23:33:51 +11:00
Oliver Walters
22a5f921b8 Auto-generate build outputs when a build is created 2020-10-27 23:09:17 +11:00
Oliver Walters
170d55d64e Add custom form validation step 2020-10-27 22:52:01 +11:00
Oliver Walters
4055a36db2 Updated modal forms 2020-10-27 22:29:34 +11:00
Oliver Walters
646fe40950 Require either serial or batch number to be set for trackable part 2020-10-27 22:00:38 +11:00
Oliver Walters
54d5d2899e Update javascript callbacks 2020-10-27 21:47:24 +11:00
Oliver
43907fb129 Merge pull request #1082 from jnewlands/typo_fix_external_link
Fix typo in new / edit part forms ("extenel URL")
2020-10-27 16:43:14 +11:00
James Newlands
c61eeca3e4 Even though nothing happened to the database schema, the field description changed 2020-10-27 15:58:05 +11:00
James Newlands
8bf281e153 Fix typo in new / edit part forms ("extenel URL")
Capitalisation consistency in "Create New Part" form title
2020-10-27 14:52:31 +11:00
Oliver Walters
06a3899325 Disable "unallocate" button if there are not any allocations 2020-10-27 09:26:16 +11:00
Oliver Walters
b5e1d3f87a Sorter fixes 2020-10-27 08:58:29 +11:00
Oliver
9ed787b4da Merge pull request #1077 from SchrodingersGat/custom-tag-fix
Bug fix - re-introduce settings_value custom tag
2020-10-27 07:49:12 +11:00
Oliver Walters
4167e1fdb3 Update translation files 2020-10-26 22:51:57 +11:00
Oliver Walters
210d39c8b7 Bug fix - re-introduce settings_value custom tag
(cherry picked from commit 9203f541be)
2020-10-26 22:44:49 +11:00
Oliver Walters
d8a0ab8879 Fix for build table 2020-10-26 22:44:24 +11:00
Oliver Walters
9203f541be Bug fix - re-introduce settings_value custom tag 2020-10-26 22:44:16 +11:00
Oliver Walters
a4f6efc05d Merge remote-tracking branch 'inventree/master' into build-fixes
# Conflicts:
#	InvenTree/locale/de/LC_MESSAGES/django.po
#	InvenTree/locale/en/LC_MESSAGES/django.po
#	InvenTree/locale/es/LC_MESSAGES/django.po
#	InvenTree/templates/js/build.html
2020-10-26 22:38:43 +11:00
Oliver Walters
b38fde85f2 Added some more buttons, etc 2020-10-26 22:34:40 +11:00
Oliver Walters
5e0d1fe25a Allocate "non tracked" parts separately from tracked ones 2020-10-26 18:21:45 +11:00
Oliver Walters
7525bc2ead Attachment functionality for BuildOrder 2020-10-26 17:00:31 +11:00
Oliver Walters
664dd0000c Add database table for storing file attachments against a BuildOrder 2020-10-26 15:21:03 +11:00
Oliver Walters
8f108d42d2 Add ability to filter BOM status by "validated" field 2020-10-26 14:43:43 +11:00
Oliver Walters
24ab48ef4c Filter BOM table by "trackable" status 2020-10-26 13:53:34 +11:00
Oliver Walters
1a4eb3f870 Display which parts are "trackable" in a BOM table 2020-10-26 13:24:17 +11:00
Oliver Walters
815d4bf7eb Add new template_tag for defining variables 2020-10-26 09:11:25 +11:00
Oliver Walters
ffe15763a7 Update validation "rules" for BuildItem
- A BuildItem which points to a trackable part must also point to a build output
- A BuildItem which points to a non-trackable part cannot point to a build output
2020-10-26 08:34:17 +11:00
Oliver Walters
6aaf178f0b Check "trackable" status of part
- Where a BomItem connects a trackable sub_part with a non-trackable part, force the Part to be trackable
2020-10-26 08:29:06 +11:00
Oliver
720579dcd7 Merge pull request #1070 from SchrodingersGat/global-settings
Global settings
2020-10-25 22:22:57 +11:00
Oliver Walters
e978e1df52 Style fixes 2020-10-25 22:11:24 +11:00
Oliver Walters
5908890726 Create setting if it does not exist 2020-10-25 22:07:11 +11:00
Oliver Walters
549f50ac3f Update translations 2020-10-25 21:54:53 +11:00
Oliver Walters
9284837da8 Bug fixing 2020-10-25 21:45:37 +11:00
Oliver Walters
7d95faa4f5 Cleanup code 2020-10-25 21:43:33 +11:00
Oliver Walters
432ecc1d96 Display boolean values as checkboxes 2020-10-25 21:33:13 +11:00
Oliver Walters
3a325399c6 Use a checkbox input when editing a boolean setting 2020-10-25 21:00:06 +11:00
Oliver Walters
f1e8afa314 Add boolean validator 2020-10-25 09:36:58 +11:00
Oliver Walters
73296eafcb Update translation files 2020-10-25 08:18:33 +11:00
Oliver Walters
4d96b385b1 Add page for global settings 2020-10-25 08:17:41 +11:00
Oliver Walters
b57a78dea4 Add some context data to the view for editing a setting 2020-10-25 08:10:52 +11:00
Oliver Walters
e3f5e8fbb1 PEP fixes 2020-10-25 08:04:04 +11:00
Oliver Walters
3e17bf3316 Edit setting directly 2020-10-25 08:02:46 +11:00
Oliver Walters
10758a9626 Improvements for global settings
- Name and description are defined in models.py
- Lookup functions for name / description / units / default
- Shortcut template for rending settings
- More unit testing
2020-10-25 07:49:38 +11:00
Oliver Walters
767ceed698 Update translation files 2020-10-24 22:13:40 +11:00
Oliver Walters
c63a09330f Hide some buttons if row is fully allocated already 2020-10-24 22:05:19 +11:00
Oliver Walters
42c1210fba Calculate required build quantity 2020-10-24 13:16:43 +11:00
Oliver Walters
a3265ef9fd Unallocate stock against a particular line item 2020-10-24 13:15:13 +11:00
Oliver Walters
b7e7543be6 Add some more buttons to build table 2020-10-24 12:59:05 +11:00
Oliver Walters
b45a11aa3d Refactor: Add "makeIconBadge" javascript function 2020-10-24 00:33:30 +11:00
Oliver Walters
ea7b1b65d6 Delete a build output entirely
TODO: Needs to describe in the confirmation dialog what is going to happen!
2020-10-24 00:14:27 +11:00
Oliver Walters
a71a51b848 Build can be "unallocated" against a single build output 2020-10-23 23:52:59 +11:00
Oliver Walters
fb7d9a7edf Move "getAvailableStockItems" to the build model 2020-10-23 23:33:27 +11:00
Oliver Walters
0752df26dc Bug fixes for BuildItemCreate view:
- Add option to calculate required quantity against a particular build output, not just the build
2020-10-23 23:09:22 +11:00
Oliver Walters
076d5c4f7f Cleanup get_required_parts function 2020-10-23 22:49:46 +11:00
Oliver
5e63ccc9f6 Merge pull request #1043 from eeintech/unique_email_company
[Company] Allow duplicate names - Unique name/email pair
2020-10-23 13:23:48 +11:00
Oliver
cd4cb12937 Merge pull request #1064 from eeintech/company_permissions
Company permissions
2020-10-23 13:20:59 +11:00
eeintech
647182237e Merge branch 'master' of git://github.com/inventree/InvenTree into unique_email_company 2020-10-22 12:05:22 -05:00
Oliver Walters
5db043ab4b Launch modal dialog to auto-allocate against a specific build output 2020-10-23 01:05:59 +11:00
Oliver Walters
f4f6253178 Better table sorting for allocation quantity 2020-10-23 00:58:35 +11:00
Oliver Walters
33c454ed5a Add action buttons to each build output 2020-10-23 00:51:01 +11:00
Oliver Walters
6245d65ebc Tweaks 2020-10-23 00:08:40 +11:00
Oliver Walters
23ac83d2a8 Change extension on "dynamic" js files
- Yay, the editor now highlights code properly!
2020-10-22 23:59:21 +11:00
Oliver Walters
ae20db0ec6 Add actions for the sub-table allocation list 2020-10-22 23:57:07 +11:00
Oliver Walters
d37cdd8e50 Improved filtering for stockitems going into a buildallocation 2020-10-22 23:49:23 +11:00
Oliver Walters
fae516b38e Add build output selection to builditem creation form 2020-10-22 23:28:15 +11:00
Oliver Walters
1ca08f8bff Filter builditem API by 'output' stock item 2020-10-22 21:43:53 +11:00
Oliver
5877b9616d Merge pull request #1066 from eeintech/fix_part_null_notes_template
Fixed Part notes template (check for NULL value before mardown render)
2020-10-22 09:53:15 +11:00
eeintech
9131edc43d Company index: swapped 'title' for 'pagetype' for adding company button 2020-10-21 09:34:49 -05:00
eeintech
1ef21700c0 Fixed Part notes template (check for NULL value before mardown render) 2020-10-21 09:26:07 -05:00
Oliver Walters
f989d3b3ec Change to using spinner icon 2020-10-21 17:02:04 +11:00
eeintech
46b889c572 Assigned all user permissions for company tests 2020-10-20 14:52:34 -05:00
eeintech
de65e1631d Updated company templates permissions 2020-10-20 14:46:10 -05:00
eeintech
39eddc7203 Added user permissions on company views 2020-10-20 14:11:40 -05:00
Oliver Walters
96277edcf1 Improvements to progress bar function 2020-10-21 00:49:17 +11:00
Oliver Walters
8ae16a125e Build - Add functions to access build outputs 2020-10-21 00:24:55 +11:00
Oliver Walters
e02536071d Add a "completed" field to the Build model
- Keeps track of how many outputs have been produced
- Will not be directly editable by the user
2020-10-20 23:59:37 +11:00
Oliver Walters
fd6d630037 Improve grouping in Stock table 2020-10-20 23:45:36 +11:00
eeintech
5793839a01 Added UniqueConstraint on name/email pair, renamed migration file 2020-10-20 07:37:07 -05:00
Oliver Walters
3bb247a135 Create an initial stockitem output when a new build is created 2020-10-20 23:27:43 +11:00
eeintech
7bc925d016 Merge branch 'master' of git://github.com/inventree/InvenTree into unique_email_company 2020-10-20 07:19:48 -05:00
Oliver Walters
652c2dbcbe Automagically disable 'serial_numbers' field for StockItemCreate form
- Yay, ajax magic!
2020-10-20 22:37:55 +11:00
Oliver Walters
2e4613e702 Updates to build forms / etc 2020-10-20 22:37:21 +11:00
Oliver Walters
2df0f03a9a Change "ALLOCATED" to "PRODUCTION" 2020-10-20 21:10:36 +11:00
Oliver Walters
ac79e131bc Add "destination" field to BuildOrder 2020-10-20 21:01:51 +11:00
Oliver Walters
28460b3023 Validate that the BuildItem quantity is an integer 2020-10-20 20:42:29 +11:00
Oliver Walters
fdcef7b699 Add "install_into" field for BuildItem
- Points to which output stock item it will be going into
2020-10-20 20:37:57 +11:00
Oliver
bc6f58cf26 Merge pull request #1061 from SchrodingersGat/migration-fix
Except IntegrityError
2020-10-20 20:35:59 +11:00
Oliver Walters
4193d2e7fe Except IntegrityError
- This error may be thrown if the correct migrations have not been applied
2020-10-20 19:52:04 +11:00
Oliver
85ac1bfb95 Merge pull request #1058 from SchrodingersGat/stock-table-ordering
Fix table sorting when groups are used.
2020-10-20 12:07:11 +11:00
Oliver Walters
73a1765a11 Fix table sorting when groups are used.
This is necessary because the field names of the tables are specified like "part_detail.IPN" and multi-level string-based object access is weird.
Luckily someone has worked out the hard part for me.

Ref: https://stackoverflow.com/questions/6393943/convert-javascript-string-in-dot-notation-into-an-object-reference
2020-10-20 11:54:54 +11:00
Oliver
d242e04e64 Merge pull request #1055 from SchrodingersGat/build-reference
Build reference
2020-10-20 09:03:25 +11:00
Oliver Walters
a2ee172058 Updates tables for PurchaseOrder and SalesOrder 2020-10-20 08:45:17 +11:00
Oliver Walters
5a6697866f Update translations 2020-10-20 08:41:13 +11:00
Oliver Walters
406d7bcf80 Load build order prefix setting 2020-10-20 08:41:08 +11:00
Oliver Walters
7aa473712f Remove unused setting page 2020-10-20 08:32:00 +11:00
Oliver Walters
226a91718b Add a simple unit test for the settings model 2020-10-20 08:29:06 +11:00
Oliver Walters
c6e61c20fe Generate default settings for all InvenTreeSetting object 2020-10-20 08:24:23 +11:00
Oliver Walters
98d20bceeb Change "Build Title" to "Description" 2020-10-20 00:26:26 +11:00
Oliver Walters
e8a0095e50 Add some options for the build order settings page
- Not editable yet
2020-10-20 00:24:33 +11:00
Oliver Walters
a5639c380f Add regex validator to build order reference field 2020-10-20 00:13:43 +11:00
Oliver Walters
06040f94ee Remove "description" field from InvenTreeSettings key:value fields 2020-10-20 00:02:54 +11:00
Oliver Walters
92c1e3c1a5 Update settings pages 2020-10-19 23:50:39 +11:00
Oliver Walters
c13cee2407 Fixes for unit testing 2020-10-19 23:31:52 +11:00
Oliver Walters
9b7a9a3ee0 Update formatting of order pages 2020-10-19 23:23:16 +11:00
Oliver Walters
b5d15aab08 Add function to "predict" next build order reference value 2020-10-19 23:22:09 +11:00
Oliver Walters
5405ad566e Add 'reference' to API serializer 2020-10-19 22:53:40 +11:00
Oliver Walters
0b7cf9e7f3 Add "reference" to build order forms 2020-10-19 22:49:28 +11:00
Oliver Walters
a8d47c54f9 Upate admin interface 2020-10-19 22:40:19 +11:00
Oliver Walters
934078a42c Add "Reference" field to Build model 2020-10-19 22:36:14 +11:00
Oliver
416cfb99da Merge pull request #1053 from SchrodingersGat/modal-errors
Modal errors
2020-10-19 22:19:10 +11:00
Oliver Walters
6b99d923d7 Change "status code" to "error code" 2020-10-19 16:44:33 +11:00
Oliver Walters
396b7dba73 Extra error information when a modal dialog fails 2020-10-19 16:42:53 +11:00
Oliver
957c538136 Merge pull request #1052 from SchrodingersGat/barcode-add
Change text for barcode
2020-10-19 16:31:47 +11:00
Oliver Walters
647e2cf64d Change text for barcode 2020-10-19 16:06:18 +11:00
Oliver
ce1cce99bb Merge pull request #1051 from SchrodingersGat/po-stock-list
Display table of items received against a particular purchase order
2020-10-19 11:55:25 +11:00
Oliver Walters
634410294b Display table of items received against a particular purchase order
- Adds new tab to "Purchase Order" view
- Adds ability to filter StockList API by purchase_order ID
2020-10-19 11:40:57 +11:00
Oliver
2dc9109b11 Merge pull request #1047 from eeintech/add_ipn_supplier_part_str
Added IPN to Supplier Part string representation (global)
2020-10-19 11:21:34 +11:00
eeintech
dfa4d3f8ed Display IPN and pipe char only if IPN exists 2020-10-18 14:37:35 -05:00
eeintech
d1df647dde Merge branch 'master' of git://github.com/inventree/InvenTree into add_ipn_supplier_part_str 2020-10-18 14:33:38 -05:00
Oliver
529c4052ff Merge pull request #1038 from mpdgraev/fix_int_barcode
fix error when submitting some non-dict barcodes
2020-10-19 00:01:38 +11:00
Oliver
7edd08035f Merge pull request #1049 from SchrodingersGat/api-default-location
Update creation of StockItem via API
2020-10-18 22:49:09 +11:00
Oliver Walters
3c175a6c8d Update creation of StockItem via API
- If no location is specified, but a default location exists for the part, use that
- If a location is specified (even if it is null) then the specified value is used instead
2020-10-18 22:24:45 +11:00
Oliver
83077514cb Merge pull request #1041 from eeintech/api_default_location
Added part 'default_location' to serializer
2020-10-18 22:01:35 +11:00
Oliver
4d4f0e5cfc Merge pull request #1044 from eeintech/stock_permissions
Fixed insertion of backslash in the Stock barcode button group
2020-10-18 21:11:09 +11:00
eeintech
5a6cac43f5 Updated migration 2020-10-16 15:42:23 -05:00
eeintech
0b26d68d0f Added admin view, improved validation of part related relationship 2020-10-16 15:29:58 -05:00
eeintech
34e4409e7f Functional checkpoint: add/delete related parts from template 2020-10-16 13:50:31 -05:00
eeintech
8579abb9c2 Added related parts urls, views, form and templates
Adding related part relationships work but are still not shown in the part detail page
2020-10-15 16:58:39 -05:00
eeintech
3d9223c2ee Introduced PartRelated model to store part relationships 2020-10-15 14:11:24 -05:00
eeintech
af6b30eaca Added IPN to Supplier Part string representation
Improved Supplier Part templates and fixed 'Order Part' button in supplier_part_orders
2020-10-15 13:09:00 -05:00
eeintech
dbee26aaad Fixed insertion of backslash in the barcode button group 2020-10-13 10:29:34 -05:00
eeintech
70a3b7f891 Improved migration, still fails if email duplicates exist in current DB 2020-10-13 07:43:57 -05:00
eeintech
ac82640c6c Company: allowed duplicate names, made email field unique, custom migration 2020-10-12 17:51:48 -05:00
eeintech
3143242d13 Added category 'default_location' to serializer 2020-10-12 13:14:24 -05:00
eeintech
eb98496a79 Added part 'default_location' to serializer 2020-10-12 07:25:32 -05:00
mpdgraev
f1f31a1338 fix error caused by assumption that json.loads() returns an object with a .keys() function 2020-10-09 16:32:54 +02:00
Oliver
ca8472ac23 Merge pull request #1037 from SchrodingersGat/tz-support
Add support for setting timezone in config.yaml
2020-10-08 21:35:36 +11:00
Oliver Walters
3d60bccae0 Add support for setting timezone in config.yaml 2020-10-08 21:02:38 +11:00
Oliver
26ee3032f6 Merge pull request #1036 from SchrodingersGat/bom-quantity-export
Normalize quantity field when exporting BOM
2020-10-08 14:21:50 +11:00
Oliver Walters
8b16304e84 Custom 404 page 2020-10-08 14:09:08 +11:00
Oliver Walters
b595f3b732 Normalize quantity field when exporting BOM 2020-10-08 14:05:55 +11:00
Oliver
305920d1ac Merge pull request #1030 from eeintech/stock_permissions
Stock permissions
2020-10-07 14:11:52 +11:00
Oliver
ec4bc357df Merge pull request #1031 from eeintech/fix_superuser_permission
Fixed context permissions for superuser with no group assigned
2020-10-07 13:40:59 +11:00
eeintech
01eee4d208 Fixed style 2020-10-06 10:40:58 -05:00
eeintech
8499ced636 Changed from validation error to warning message when group instance is saved 2020-10-06 10:38:06 -05:00
eeintech
19a2326638 Merge branch 'master' of git://github.com/inventree/InvenTree into user_unique_group_validation 2020-10-06 10:04:35 -05:00
eeintech
1ce2166843 Fixed context permissions for superuser with no group assigned 2020-10-06 09:59:51 -05:00
eeintech
5bcf8529ff Only users with Part view permission have part URL shown 2020-10-06 09:16:38 -05:00
eeintech
e4ce19d22a Added Test user and all permissions 2020-10-06 09:02:10 -05:00
eeintech
095cfe9845 Updated Stock permission views and templates 2020-10-06 08:55:40 -05:00
Oliver
279b50d977 Merge pull request #1029 from SchrodingersGat/sales-order-permissions
Sales order permissions
2020-10-06 20:44:01 +11:00
Oliver Walters
8b37229e4b The real translations are the ones we made along the way 2020-10-06 20:31:38 +11:00
Oliver Walters
b80e4302ba Update permissions for build app 2020-10-06 20:29:16 +11:00
Oliver Walters
2325b1e4ba Unit test fixes 2020-10-06 20:10:14 +11:00
Oliver Walters
9abb211cdf Update template permissions 2020-10-06 20:09:55 +11:00
Oliver Walters
1c97aaf87a Set permissions for order views 2020-10-06 19:46:53 +11:00
Oliver
606c62078f Merge pull request #1024 from SchrodingersGat/part-permissions
Permissions
2020-10-06 18:29:05 +11:00
Oliver Walters
ab454e5ba4 More template changes: perms -> roles 2020-10-06 16:46:13 +11:00
Oliver Walters
88f73443ee Yet more style fixes 2020-10-06 16:43:39 +11:00
Oliver Walters
77a2b6de8b Merge branch 'part-permissions' of https://github.com/SchrodingersGat/InvenTree into part-permissions 2020-10-06 16:03:33 +11:00
Oliver Walters
b3e4efd96e Unit testing fixes 2020-10-06 16:03:19 +11:00
Oliver
e076470305 Merge branch 'master' into part-permissions 2020-10-06 12:35:45 +11:00
Oliver Walters
d691b15f4b Fix conflicts 2020-10-06 12:34:30 +11:00
Oliver Walters
11d31960c7 Change modal form permissions to use new "role" strategy 2020-10-06 11:42:16 +11:00
Oliver Walters
c740cce5e4 PEP fixes 2020-10-06 11:31:04 +11:00
Oliver Walters
dc2c9aa662 Add InvenTreeRoleMixin
- Simplifies permission requirements for views
- e.g. 'part.view' rather than 'part.view_partcategory'
2020-10-06 11:29:38 +11:00
Oliver Walters
d2e2e7511f Update templates: Change perms to roles 2020-10-06 10:07:39 +11:00
Oliver Walters
fa21d66c41 Fix logic for global context object 'roles'
- User may be a part of multiple groups
- Roles are additive across groups
2020-10-06 09:54:37 +11:00
Oliver Walters
23aee234f0 Change index page to use roles rather than perms to determine user permissions 2020-10-06 09:32:05 +11:00
Oliver Walters
556ffa1099 Change label for permissions to match django permission names 2020-10-06 09:28:05 +11:00
Oliver Walters
8b2189daca Add global context 'roles'
- Access via template e.g. {% if roles.part.view %}
- Always True if the user is a superuser
2020-10-06 09:27:22 +11:00
Oliver
e74bfb90a5 Merge pull request #1025 from eeintech/fixed_group_redundant_saves
Fixed Group model permissions redundant saves
2020-10-06 07:40:44 +11:00
eeintech
911b23ca24 Added validation logic for user list to Group admin form 2020-10-05 13:12:52 -05:00
eeintech
d980da7247 Fixed permission assign test unit 2020-10-05 10:52:47 -05:00
eeintech
c910307ce5 Only saving Group model rulesets on instance creation and when inlines are saved 2020-10-05 10:04:54 -05:00
Oliver Walters
3f59ce3f93 Update unit tests
- requires the user to actually have the necessary permissions!
2020-10-06 01:30:36 +11:00
Oliver Walters
16d720b62c Update permission requirements for API
- Automatically use model permissions by default!
-
2020-10-06 00:36:55 +11:00
Oliver Walters
8ee16d6f98 update translation files 2020-10-06 00:20:57 +11:00
Oliver Walters
ba4c829b10 Add permission requirements in various part templates 2020-10-06 00:20:45 +11:00
Oliver Walters
afadd51a14 Fix permissions in views.py
Silly, "add" not "create"
2020-10-06 00:19:44 +11:00
Oliver Walters
66bdce3d04 Hide elements on the PartCategory page, based on permissions 2020-10-05 23:53:24 +11:00
Oliver Walters
4d49cb029f Change part views to require permissions
Also adds custom 403 page
2020-10-05 23:49:32 +11:00
Oliver
796e89c921 Merge pull request #1023 from SchrodingersGat/index-permissions
Change what elements the user can see on the index page
2020-10-05 23:19:13 +11:00
Oliver Walters
3e9c7cda21 Change what elements the user can see on the index page, based on permissions! 2020-10-05 23:11:55 +11:00
Oliver
e5960f6ce4 Merge pull request #1022 from SchrodingersGat/permission-fixes
Fixes for role permissions
2020-10-05 23:04:50 +11:00
Oliver Walters
806a7f961d Fixes for role permissions
- Fixed a strange interaction if multiple rulesets referred to the same models
- Order of operations was incorrect.
- Now is good? Yes!
2020-10-05 22:57:05 +11:00
Oliver
731c796254 Merge pull request #1011 from SchrodingersGat/navbar-permissions
Hide main elements of navigation bar based on user permissions
2020-10-05 11:17:41 +11:00
Oliver
dc41231fcc Merge pull request #1018 from SchrodingersGat/group-roles
Roles and Permissions
2020-10-05 11:16:52 +11:00
Oliver
cc05220263 Merge pull request #1020 from SchrodingersGat/stock-building
Add "is_building" field to StockItem model
2020-10-05 10:08:40 +11:00
Oliver Walters
898c604b3b Fix incorrect permission names
- Uses the app_model name, *NOT* the name of the database table
- Adds extra tests to ensure that permissions get assigned and removed correctly
2020-10-05 08:55:15 +11:00
Oliver Walters
095ef51991 Cleanup unit testing 2020-10-05 08:29:36 +11:00
Oliver Walters
bce7eb1aad update translation files 2020-10-05 01:02:36 +11:00
Oliver Walters
13cd8624b2 Fix permissions 2020-10-05 01:01:56 +11:00
Oliver Walters
48e050d317 Add some more unit tests and validation code for the StockItem model
- Ensure that the build part matches the stockitem part!
2020-10-05 00:49:00 +11:00
Oliver Walters
3ee7be1d58 Add "optional" field to BomItem
- Defaults to False
- Indicates that the BomItem is "optional" for a build
- Will be used in the future when calculating if a Build output is fully allocated!
2020-10-05 00:42:09 +11:00
Oliver Walters
c1595396c4 Unit testing: fix PEP issues 2020-10-05 00:29:31 +11:00
Oliver Walters
fe3a72c6cc Add some unit testing 2020-10-05 00:29:06 +11:00
Oliver Walters
26d113e8ad Update IN_STOCK_FILTER to reject stock items which have is_building set to True 2020-10-05 00:14:04 +11:00
Oliver Walters
ee28b4eea5 Add "is_building" field to StockItem model
- This will be set to TRUE until a stock item has been completed
2020-10-05 00:12:42 +11:00
Oliver
7f3ce9b0b1 Merge pull request #1019 from SchrodingersGat/installed-stock-improvements
Improvements for the "Installed Items" tab for StockItem display
2020-10-05 00:09:23 +11:00
Oliver Walters
62734c4b72 Add a custom template for the install item form 2020-10-05 00:01:01 +11:00
Oliver Walters
3fe0886207 Remove a debug statement 2020-10-04 23:49:01 +11:00
Oliver Walters
852da6d696 Fix form validation 2020-10-04 23:48:15 +11:00
Oliver Walters
42a75a8238 Add hidden input to the InstallStockForm form
- keeps track of "part" object
- so we can filter the stock_items queryset if the form validation fails
- Is there a more djangonic way of doing this??
2020-10-04 23:45:52 +11:00
Oliver Walters
46f459b4c7 Better display of stock table 2020-10-04 23:34:02 +11:00
Oliver Walters
b9291c6705 Improve transaction note recording for the StockItem model 2020-10-04 23:33:43 +11:00
Oliver Walters
824ce6778f Progress bar tweaks
- If no maximum value supplied, just show the value (and fill to 100% width)
2020-10-04 23:33:20 +11:00
Oliver Walters
3c5968ef1a Add subrow table to the "installed items" view
Ah, javascript...
2020-10-04 22:58:41 +11:00
Oliver Walters
9c27680202 Finish function to install stock item(s) 2020-10-04 21:32:21 +11:00
Oliver Walters
45c888e13d Custom cleaning for form
Ok, looks like I've been doing this wrong the whole time!
The "djangonic" way is pretty cool
2020-10-04 21:31:44 +11:00
Oliver Walters
a686500df1 Calculate initial values for the view 2020-10-04 21:02:20 +11:00
Oliver Walters
fd22e713ff Filter available stock items by Part reference 2020-10-04 20:50:06 +11:00
Oliver Walters
f04977e7e1 Add form / view for installing a stock item into another stock item 2020-10-04 20:41:28 +11:00
Oliver Walters
b467c8a1ef Add front-end functions to render an "installed stock" table 2020-10-04 15:17:46 +11:00
Oliver Walters
b27f926310 Add ability to filter BOM API by "trackable" status of the sub_part object 2020-10-04 13:51:52 +11:00
Oliver Walters
fb09f53dc9 Add missing migration file 2020-10-04 12:58:45 +11:00
Oliver Walters
929411e49a Remove "general" ruleset 2020-10-04 12:53:24 +11:00
Oliver Walters
31b699d521 Hide "user permissions" view from the admin interface 2020-10-04 12:47:19 +11:00
Oliver Walters
cda52a58e3 Remove manual 'permissions' control from groups admin interface
- Does not actually *do* anything any more as the RuleSet approach overrides it anyway
2020-10-04 12:19:56 +11:00
Oliver Walters
c19c014f55 Add or remove permissions from groups as defined by the RuleSet links
- Only runs when the group is changed
- Does not add permissions if they already exist
- Does not remove permissions if they do not exist
2020-10-04 12:18:31 +11:00
Oliver Walters
d5c0c12d78 Add some more unit testing
- ALL models must be covered by rulesets
- Added a RULESET_IGNORE list for models we do not want permissions for
2020-10-04 11:03:14 +11:00
Oliver Walters
c09b4980ad PEP fixes 2020-10-04 00:43:02 +10:00
Oliver Walters
1ded9e1fc0 Add a warning showing which databases tables are not covered by defined rulesets 2020-10-04 00:38:53 +10:00
Oliver Walters
6c2eb959a6 More unit testing 2020-10-04 00:34:22 +10:00
Oliver Walters
2039100d3e Add some unit testing 2020-10-04 00:24:48 +10:00
Oliver Walters
6bc5fe2497 Tab fix 2020-10-04 00:03:10 +10:00
Oliver Walters
9e4cc73b1c Add migration files 2020-10-04 00:01:18 +10:00
Oliver Walters
16f1b4c784 Add hook to update group permission roles
(doesn't do anything yet)
2020-10-03 23:45:24 +10:00
Oliver Walters
bedda66949 Add custom admin view for the "Group" model
- Ref: https://github.com/Microdisseny/django-groupadmin-users
- Adds ability to edit users within a particular group from the group admin page!
2020-10-03 17:37:20 +10:00
Oliver
d81aa5c051 Merge pull request #1017 from SchrodingersGat/admin-shell
Add shell interface
2020-10-03 16:24:55 +10:00
Oliver Walters
c7403fd512 Add shell interface 2020-10-03 16:18:03 +10:00
Oliver
e6526288cd Merge pull request #1013 from SchrodingersGat/next-available-fix
Fix for "next avilable serial number" string
2020-10-02 14:01:25 +10:00
Oliver Walters
f12f8156bd Fix for "next avilable serial number" string 2020-10-02 13:54:23 +10:00
Oliver
7f3018ebf8 Merge pull request #1008 from eeintech/parametric_part_tables
Add parametric part tables to category detail page
2020-10-02 08:56:05 +10:00
eeintech
496232ed6d Added tests for Category parameters methods, some code clean-up 2020-10-01 13:46:56 -05:00
eeintech
9d3d9a190b Added bootstrap table 'filter-control' extension to use in parametric tables 2020-10-01 12:10:35 -05:00
eeintech
15e1c05791 Fixed 'Part' column sorting 2020-10-01 11:05:08 -05:00
eeintech
b7d25a75c4 Hide part toolbar, nicer part representation, improved parameters prefetching 2020-10-01 10:03:49 -05:00
eeintech
a71b5ef0a0 Merge branch 'master' of git://github.com/inventree/InvenTree into parametric_part_tables 2020-10-01 09:02:21 -05:00
Oliver
7356fc3dfc Merge pull request #1002 from eeintech/empty_search_query
Empty search query returned all elements from database
2020-10-01 09:34:02 +10:00
eeintech
4763f3ea46 Reformulated empty query message 2020-09-30 11:53:14 -05:00
eeintech
87d836617e Merge branch 'master' of git://github.com/inventree/InvenTree into empty_search_query 2020-09-30 11:50:12 -05:00
Oliver
4f648f8787 Merge pull request #1010 from SchrodingersGat/admin-permission-fixes
Update admin links to require specific permissions
2020-10-01 00:37:43 +10:00
Oliver Walters
756f3ddb0f Hide main elements of navigation bar based on user permissions 2020-10-01 00:25:24 +10:00
Oliver Walters
626d0266c8 Add framework for required permissions for any ajax modal forms
- Default permissions of "*" will not immediately change any modal forms
- Set the permission_required attribute of any modal form for this to be implemented
2020-10-01 00:16:04 +10:00
Oliver Walters
56660d52f2 Add "permission denied" message on modal forms 2020-10-01 00:09:21 +10:00
Oliver Walters
81864a6ab8 Fix button layout for stock table 2020-10-01 00:00:37 +10:00
Oliver Walters
27656633df Update admin links to require specific permissions 2020-09-30 23:57:23 +10:00
Oliver
400f183597 Merge pull request #1009 from SchrodingersGat/ipn-filter
Add filtering for parts which have an IPN set
2020-09-30 23:55:27 +10:00
Oliver Walters
a952dc38a3 Add filtering for parts which have an IPN set 2020-09-30 23:35:39 +10:00
Oliver
c4cae02170 Update version.py 2020-09-30 08:06:58 +10:00
eeintech
40d8a07acc Now loading data! Still need to be bonified 2020-09-29 16:49:53 -05:00
eeintech
d05a5978a0 Unique parameters names from category makes it to bootstrap table 2020-09-29 16:13:08 -05:00
eeintech
6b48977e7b Added 'Parametric Table' tab to category detail view, added part_count to 'Parts' tab 2020-09-29 15:16:12 -05:00
eeintech
18e19d7920 Empty search query returned all elements from database 2020-09-28 16:34:41 -05:00
564 changed files with 84185 additions and 14806 deletions

View File

@@ -1,8 +1,6 @@
[run]
source = ./InvenTree
omit =
# Do not run coverage on migration files
*/migrations/*
InvenTree/manage.py
InvenTree/setup.py
InvenTree/InvenTree/middleware.py

48
.github/workflows/coverage.yaml vendored Normal file
View File

@@ -0,0 +1,48 @@
# Perform CI checks, and calculate code coverage
name: SQLite
on: ["push", "pull_request"]
jobs:
# Run tests on SQLite database
# These tests are used for code coverage analysis
coverage:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INVENTREE_DB_NAME: './test_db.sqlite'
INVENTREE_DB_ENGINE: django.db.backends.sqlite3
INVENTREE_DEBUG: info
INVENTREE_MEDIA_ROOT: ./media
INVENTREE_STATIC_ROOT: ./static
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Dependencies
run: |
sudo apt-get update
pip3 install invoke
invoke install
- name: Coverage Tests
run: |
invoke coverage
- name: Data Import Export
run: |
invoke migrate
invoke import-fixtures
invoke export-records -f data.json
rm test_db.sqlite
invoke migrate
invoke import-records -f data.json
- name: Check Migration Files
run: python3 ci/check_migration_files.py
- name: Upload Coverage Report
run: coveralls

18
.github/workflows/docker_build.yaml vendored Normal file
View File

@@ -0,0 +1,18 @@
# Test that the docker file builds correctly
name: Docker
on: ["push", "pull_request"]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Server Image
run: cd docker/inventree && docker build . --tag inventree:$(date +%s)
- name: Build nginx Image
run: cd docker/nginx && docker build . --tag nxinx:$(date +%s)

38
.github/workflows/docker_publish.yaml vendored Normal file
View File

@@ -0,0 +1,38 @@
# Publish docker images to dockerhub
name: Docker Publish
on:
release:
types: [published]
jobs:
server_image:
name: Push InvenTree web server image to dockerhub
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: inventree/inventree
tag_with_ref: true
context: docker/inventree
nginx_image:
name: Push InvenTree nginx image to dockerhub
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: inventree/nginx
tag_with_ref: true
context: docker/nginx

51
.github/workflows/mysql.yaml vendored Normal file
View File

@@ -0,0 +1,51 @@
# MySQL Unit Testing
name: MySQL
on: ["push", "pull_request"]
jobs:
test:
runs-on: ubuntu-latest
env:
# Database backend configuration
INVENTREE_DB_ENGINE: django.db.backends.mysql
INVENTREE_DB_NAME: inventree
INVENTREE_DB_USER: root
INVENTREE_DB_PASSWORD: password
INVENTREE_DB_HOST: '127.0.0.1'
INVENTREE_DB_PORT: 3306
INVENTREE_DEBUG: info
INVENTREE_MEDIA_ROOT: ./media
INVENTREE_STATIC_ROOT: ./static
services:
mysql:
image: mysql:latest
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: inventree
MYSQL_USER: inventree
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
ports:
- 3306:3306
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Dependencies
run: |
sudo apt-get install mysql-server libmysqlclient-dev
pip3 install invoke
pip3 install mysqlclient
invoke install
- name: Run Tests
run: invoke test

47
.github/workflows/postgresql.yaml vendored Normal file
View File

@@ -0,0 +1,47 @@
# PostgreSQL Unit Testing
name: PostgreSQL
on: ["push", "pull_request"]
jobs:
test:
runs-on: ubuntu-latest
env:
# Database backend configuration
INVENTREE_DB_ENGINE: django.db.backends.postgresql
INVENTREE_DB_NAME: inventree
INVENTREE_DB_USER: inventree
INVENTREE_DB_PASSWORD: password
INVENTREE_DB_HOST: '127.0.0.1'
INVENTREE_DB_PORT: 5432
INVENTREE_DEBUG: info
INVENTREE_MEDIA_ROOT: ./media
INVENTREE_STATIC_ROOT: ./static
services:
postgres:
image: postgres
env:
POSTGRES_USER: inventree
POSTGRES_PASSWORD: password
ports:
- 5432:5432
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Dependencies
run: |
sudo apt-get install libpq-dev
pip3 install invoke
pip3 install psycopg2
invoke install
- name: Run Tests
run: invoke test

27
.github/workflows/style.yaml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Style Checks
on: ["push", "pull_request"]
jobs:
style:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install deps
run: |
pip install flake8==3.8.3
pip install pep8-naming==0.11.1
- name: flake8
run: |
flake8 InvenTree

View File

@@ -1,17 +0,0 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
formats: all
# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.5
install:
- requirements: docs/requirements.txt

View File

@@ -1,40 +0,0 @@
dist: xenial
services:
- mysql
- postgresql
language: python
python:
- 3.6
- 3.7
addons:
apt-packages:
- sqlite3
before_install:
- sudo apt-get update
- sudo apt-get install gettext
- sudo apt-get install mysql-server libmysqlclient-dev
- sudo apt-get install libpq-dev
- pip3 install invoke
- pip3 install mysqlclient
- pip3 install psycopg2
- invoke install
- invoke migrate
- cd InvenTree && python3 manage.py createsuperuser --username InvenTreeAdmin --email admin@inventree.com --noinput && cd ..
- psql -c 'create database inventree_test_db;' -U postgres
- mysql -e 'CREATE DATABASE inventree_test_db;'
script:
- cd InvenTree && python3 manage.py makemigrations && cd ..
- python3 ci/check_migration_files.py
- invoke coverage
- cd InvenTree && python3 manage.py test --settings=InvenTree.ci_mysql && cd ..
- cd InvenTree && python3 manage.py test --settings=InvenTree.ci_postgresql && cd ..
- invoke translate
- invoke style
after_success:
- coveralls

View File

@@ -5,7 +5,9 @@ Main JSON interface views
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.utils.translation import ugettext as _
import logging
from django.utils.translation import ugettext_lazy as _
from django.http import JsonResponse
from django_filters.rest_framework import DjangoFilterBackend
@@ -16,12 +18,16 @@ from rest_framework.response import Response
from rest_framework.views import APIView
from .views import AjaxView
from .version import inventreeVersion, inventreeInstanceName
from .version import inventreeVersion, inventreeApiVersion, inventreeInstanceName
from .status import is_worker_running
from plugins import plugins as inventree_plugins
print("Loading action plugins")
logger = logging.getLogger("inventree")
logger.info("Loading action plugins...")
action_plugins = inventree_plugins.load_action_plugins()
@@ -30,17 +36,38 @@ class InfoView(AjaxView):
Use to confirm that the server is running, etc.
"""
permission_classes = [permissions.AllowAny]
def get(self, request, *args, **kwargs):
data = {
'server': 'InvenTree',
'version': inventreeVersion(),
'instance': inventreeInstanceName(),
'apiVersion': inventreeApiVersion(),
'worker_running': is_worker_running(),
}
return JsonResponse(data)
class NotFoundView(AjaxView):
"""
Simple JSON view when accessing an invalid API view.
"""
permission_classes = [permissions.AllowAny]
def get(self, request, *args, **kwargs):
data = {
'details': _('API endpoint not found'),
'url': request.build_absolute_uri(),
}
return JsonResponse(data, status=404)
class AttachmentMixin:
"""
Mixin for creating attachment objects,

View File

@@ -0,0 +1,94 @@
"""
Helper functions for performing API unit tests
"""
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group
from rest_framework.test import APITestCase
class InvenTreeAPITestCase(APITestCase):
"""
Base class for running InvenTree API tests
"""
# User information
username = 'testuser'
password = 'mypassword'
email = 'test@testing.com'
superuser = False
auto_login = True
# Set list of roles automatically associated with the user
roles = []
def setUp(self):
super().setUp()
# Create a user to log in with
self.user = get_user_model().objects.create_user(
username=self.username,
password=self.password,
email=self.email
)
# Create a group for the user
self.group = Group.objects.create(name='my_test_group')
self.user.groups.add(self.group)
if self.superuser:
self.user.is_superuser = True
self.user.save()
for role in self.roles:
self.assignRole(role)
if self.auto_login:
self.client.login(username=self.username, password=self.password)
def assignRole(self, role):
"""
Set the user roles for the registered user
"""
# role is of the format 'rule.permission' e.g. 'part.add'
rule, perm = role.split('.')
for ruleset in self.group.rule_sets.all():
if ruleset.name == rule:
if perm == 'view':
ruleset.can_view = True
elif perm == 'change':
ruleset.can_change = True
elif perm == 'delete':
ruleset.can_delete = True
elif perm == 'add':
ruleset.can_add = True
ruleset.save()
break
def get(self, url, data={}, code=200):
"""
Issue a GET request
"""
response = self.client.get(url, data, format='json')
self.assertEqual(response.status_code, code)
return response
def post(self, url, data):
"""
Issue a POST request
"""
response = self.client.post(url, data=data, format='json')
return response

View File

@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
import logging
from django.apps import AppConfig
from django.core.exceptions import AppRegistryNotReady
import InvenTree.tasks
logger = logging.getLogger("inventree")
class InvenTreeConfig(AppConfig):
name = 'InvenTree'
def ready(self):
self.start_background_tasks()
def start_background_tasks(self):
try:
from django_q.models import Schedule
except (AppRegistryNotReady):
return
logger.info("Starting background tasks...")
InvenTree.tasks.schedule_task(
'InvenTree.tasks.delete_successful_tasks',
schedule_type=Schedule.DAILY,
)
InvenTree.tasks.schedule_task(
'InvenTree.tasks.check_for_updates',
schedule_type=Schedule.DAILY
)
InvenTree.tasks.schedule_task(
'InvenTree.tasks.heartbeat',
schedule_type=Schedule.MINUTES,
minutes=15
)

View File

@@ -1,18 +0,0 @@
"""
Configuration file for running tests against a MySQL database.
"""
from InvenTree.settings import *
# Override the 'test' database
if 'test' in sys.argv:
eprint('InvenTree: Running tests - Using MySQL test database')
DATABASES['default'] = {
# Ensure mysql backend is being used
'ENGINE': 'django.db.backends.mysql',
'NAME': 'inventree_test_db',
'USER': 'travis',
'PASSWORD': '',
'HOST': '127.0.0.1'
}

View File

@@ -1,17 +0,0 @@
"""
Configuration file for running tests against a MySQL database.
"""
from InvenTree.settings import *
# Override the 'test' database
if 'test' in sys.argv:
eprint('InvenTree: Running tests - Using PostGreSQL test database')
DATABASES['default'] = {
# Ensure postgresql backend is being used
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'inventree_test_db',
'USER': 'postgres',
'PASSWORD': '',
}

View File

@@ -7,8 +7,56 @@ Provides extra global data to all templates.
from InvenTree.status_codes import SalesOrderStatus, PurchaseOrderStatus
from InvenTree.status_codes import BuildStatus, StockStatus
import InvenTree.status
from users.models import RuleSet
def health_status(request):
"""
Provide system health status information to the global context.
- Not required for AJAX requests
- Do not provide if it is already provided to the context
"""
if request.path.endswith('.js'):
# Do not provide to script requests
return {}
if hasattr(request, '_inventree_health_status'):
# Do not duplicate efforts
return {}
request._inventree_health_status = True
status = {
'django_q_running': InvenTree.status.is_worker_running(),
}
all_healthy = True
for k in status.keys():
if status[k] is not True:
all_healthy = False
status['system_healthy'] = all_healthy
status['up_to_date'] = InvenTree.version.isInvenTreeUpToDate()
return status
def status_codes(request):
"""
Provide status code enumerations.
"""
if hasattr(request, '_inventree_status_codes'):
# Do not duplicate efforts
return {}
request._inventree_status_codes = True
return {
# Expose the StatusCode classes to the templates
@@ -17,3 +65,52 @@ def status_codes(request):
'BuildStatus': BuildStatus,
'StockStatus': StockStatus,
}
def user_roles(request):
"""
Return a map of the current roles assigned to the user.
Roles are denoted by their simple names, and then the permission type.
Permissions can be access as follows:
- roles.part.view
- roles.build.delete
Each value will return a boolean True / False
"""
user = request.user
roles = {
}
if user.is_superuser:
for ruleset in RuleSet.RULESET_MODELS.keys():
roles[ruleset] = {
'view': True,
'add': True,
'change': True,
'delete': True,
}
else:
for group in user.groups.all():
for rule in group.rule_sets.all():
# Ensure the role name is in the dict
if rule.name not in roles:
roles[rule.name] = {
'view': user.is_superuser,
'add': user.is_superuser,
'change': user.is_superuser,
'delete': user.is_superuser
}
# Roles are additive across groups
roles[rule.name]['view'] |= rule.can_view
roles[rule.name]['add'] |= rule.can_add
roles[rule.name]['change'] |= rule.can_change
roles[rule.name]['delete'] |= rule.can_delete
return {'roles': roles}

View File

@@ -0,0 +1,21 @@
from djmoney.contrib.exchange.backends.base import BaseExchangeBackend
class InvenTreeManualExchangeBackend(BaseExchangeBackend):
"""
Backend for manually updating currency exchange rates
See the documentation for django-money: https://github.com/django-money/django-money
Specifically: https://github.com/django-money/django-money/tree/master/djmoney/contrib/exchange/backends
"""
name = "inventree"
url = None
def get_rates(self, **kwargs):
"""
Do not get any rates...
"""
return {}

View File

@@ -5,10 +5,13 @@ from __future__ import unicode_literals
from .validators import allowable_url_schemes
from django.utils.translation import ugettext_lazy as _
from django.forms.fields import URLField as FormURLField
from django.db import models as models
from django.core import validators
from django import forms
from decimal import Decimal
import InvenTree.helpers
@@ -31,6 +34,34 @@ class InvenTreeURLField(models.URLField):
})
class DatePickerFormField(forms.DateField):
"""
Custom date-picker field
"""
def __init__(self, **kwargs):
help_text = kwargs.get('help_text', _('Enter date'))
label = kwargs.get('label', None)
required = kwargs.get('required', False)
initial = kwargs.get('initial', None)
widget = forms.DateInput(
attrs={
'type': 'date',
}
)
forms.DateField.__init__(
self,
required=required,
initial=initial,
help_text=help_text,
widget=widget,
label=label
)
def round_decimal(value, places):
"""
Round value to the specified number of places.

View File

@@ -5,13 +5,14 @@ Helper forms which subclass Django forms to provide additional functionality
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy as _
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Field
from crispy_forms.bootstrap import PrependedText, AppendedText, PrependedAppendedText, StrictButton, Div
from django.contrib.auth.models import User
from common.models import ColorTheme
from part.models import PartCategory
class HelperForm(forms.ModelForm):
@@ -27,6 +28,7 @@ class HelperForm(forms.ModelForm):
self.helper = FormHelper()
self.helper.form_tag = False
self.helper.form_show_errors = True
"""
Create a default 'layout' for this form.
@@ -38,6 +40,12 @@ class HelperForm(forms.ModelForm):
self.rebuild_layout()
def is_valid(self):
valid = super(HelperForm, self).is_valid()
return valid
def rebuild_layout(self):
layouts = []
@@ -115,6 +123,7 @@ class DeleteForm(forms.Form):
confirm_delete = forms.BooleanField(
required=False,
initial=False,
label=_('Confirm delete'),
help_text=_('Confirm item deletion')
)
@@ -147,6 +156,7 @@ class SetPasswordForm(HelperForm):
required=True,
initial='',
widget=forms.PasswordInput(attrs={'autocomplete': 'off'}),
label=_('Enter password'),
help_text=_('Enter new password'))
confirm_password = forms.CharField(max_length=100,
@@ -154,6 +164,7 @@ class SetPasswordForm(HelperForm):
required=True,
initial='',
widget=forms.PasswordInput(attrs={'autocomplete': 'off'}),
label=_('Confirm password'),
help_text=_('Confirm new password'))
class Meta:
@@ -195,3 +206,33 @@ class ColorThemeSelectForm(forms.ModelForm):
css_class='row',
),
)
class SettingCategorySelectForm(forms.ModelForm):
""" Form for setting category settings """
category = forms.ModelChoiceField(queryset=PartCategory.objects.all())
class Meta:
model = PartCategory
fields = [
'category'
]
def __init__(self, *args, **kwargs):
super(SettingCategorySelectForm, self).__init__(*args, **kwargs)
self.helper = FormHelper()
# Form rendering
self.helper.form_show_labels = False
self.helper.layout = Layout(
Div(
Div(Field('category'),
css_class='col-sm-6',
style='width: 70%;'),
Div(StrictButton(_('Select Category'), css_class='btn btn-primary', type='submit'),
css_class='col-sm-6',
style='width: 30%; padding-left: 0;'),
css_class='row',
),
)

View File

@@ -12,14 +12,25 @@ from decimal import Decimal
from wsgiref.util import FileWrapper
from django.http import StreamingHttpResponse
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext as _
from django.core.exceptions import ValidationError, FieldError
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import Permission
import InvenTree.version
from common.models import InvenTreeSetting
from .settings import MEDIA_URL, STATIC_URL
def getSetting(key, backup_value=None):
"""
Shortcut for reading a setting value from the database
"""
return InvenTreeSetting.get_setting(key, backup_value=backup_value)
def generateTestKey(test_name):
"""
Generate a test 'key' for a given test name.
@@ -109,6 +120,19 @@ def str2bool(text, test=True):
return str(text).lower() in ['0', 'n', 'no', 'none', 'f', 'false', 'off', ]
def is_bool(text):
"""
Determine if a string value 'looks' like a boolean.
"""
if str2bool(text, True):
return True
elif str2bool(text, False):
return True
else:
return False
def isNull(text):
"""
Test if a string 'looks' like a null value.
@@ -243,7 +267,7 @@ def WrapWithQuotes(text, quote='"'):
return text
def MakeBarcode(object_name, object_pk, object_data, **kwargs):
def MakeBarcode(object_name, object_pk, object_data={}, **kwargs):
""" Generate a string for a barcode. Adds some global InvenTree parameters.
Args:
@@ -256,7 +280,7 @@ def MakeBarcode(object_name, object_pk, object_data, **kwargs):
json string of the supplied data plus some other data
"""
brief = kwargs.get('brief', False)
brief = kwargs.get('brief', True)
data = {}
@@ -313,7 +337,7 @@ def DownloadFile(data, filename, content_type='application/text'):
return response
def ExtractSerialNumbers(serials, expected_quantity):
def extract_serial_numbers(serials, expected_quantity):
""" Attempt to extract serial numbers from an input string.
- Serial numbers must be integer values
- Serial numbers must be positive
@@ -358,17 +382,17 @@ def ExtractSerialNumbers(serials, expected_quantity):
if a < b:
for n in range(a, b + 1):
if n in numbers:
errors.append(_('Duplicate serial: {n}'.format(n=n)))
errors.append(_('Duplicate serial: {n}').format(n=n))
else:
numbers.append(n)
else:
errors.append(_("Invalid group: {g}".format(g=group)))
errors.append(_("Invalid group: {g}").format(g=group))
except ValueError:
errors.append(_("Invalid group: {g}".format(g=group)))
errors.append(_("Invalid group: {g}").format(g=group))
continue
else:
errors.append(_("Invalid group: {g}".format(g=group)))
errors.append(_("Invalid group: {g}").format(g=group))
continue
else:
@@ -385,12 +409,12 @@ def ExtractSerialNumbers(serials, expected_quantity):
# The number of extracted serial numbers must match the expected quantity
if not expected_quantity == len(numbers):
raise ValidationError([_("Number of unique serial number ({s}) must match quantity ({q})".format(s=len(numbers), q=expected_quantity))])
raise ValidationError([_("Number of unique serial number ({s}) must match quantity ({q})").format(s=len(numbers), q=expected_quantity)])
return numbers
def validateFilterString(value):
def validateFilterString(value, model=None):
"""
Validate that a provided filter string looks like a list of comma-separated key=value pairs
@@ -440,4 +464,100 @@ def validateFilterString(value):
results[k] = v
# If a model is provided, verify that the provided filters can be used against it
if model is not None:
try:
model.objects.filter(**results)
except FieldError as e:
raise ValidationError(
str(e),
)
return results
def addUserPermission(user, permission):
"""
Shortcut function for adding a certain permission to a user.
"""
perm = Permission.objects.get(codename=permission)
user.user_permissions.add(perm)
def addUserPermissions(user, permissions):
"""
Shortcut function for adding multiple permissions to a user.
"""
for permission in permissions:
addUserPermission(user, permission)
def getMigrationFileNames(app):
"""
Return a list of all migration filenames for provided app
"""
local_dir = os.path.dirname(os.path.abspath(__file__))
migration_dir = os.path.join(local_dir, '..', app, 'migrations')
files = os.listdir(migration_dir)
# Regex pattern for migration files
pattern = r"^[\d]+_.*\.py$"
migration_files = []
for f in files:
if re.match(pattern, f):
migration_files.append(f)
return migration_files
def getOldestMigrationFile(app, exclude_extension=True, ignore_initial=True):
"""
Return the filename associated with the oldest migration
"""
oldest_num = -1
oldest_file = None
for f in getMigrationFileNames(app):
if ignore_initial and f.startswith('0001_initial'):
continue
num = int(f.split('_')[0])
if oldest_file is None or num < oldest_num:
oldest_num = num
oldest_file = f
if exclude_extension:
oldest_file = oldest_file.replace('.py', '')
return oldest_file
def getNewestMigrationFile(app, exclude_extension=True):
"""
Return the filename associated with the newest migration
"""
newest_file = None
newest_num = -1
for f in getMigrationFileNames(app):
num = int(f.split('_')[0])
if newest_file is None or num > newest_num:
newest_num = num
newest_file = f
if exclude_extension:
newest_file = newest_file.replace('.py', '')
return newest_file

View File

@@ -0,0 +1,42 @@
"""
Custom management command, wait for the database to be ready!
"""
from django.core.management.base import BaseCommand
from django.db import connection
from django.db.utils import OperationalError, ImproperlyConfigured
import time
class Command(BaseCommand):
"""
django command to pause execution until the database is ready
"""
def handle(self, *args, **kwargs):
self.stdout.write("Waiting for database...")
connected = False
while not connected:
time.sleep(5)
try:
connection.ensure_connection()
connected = True
except OperationalError as e:
self.stdout.write(f"Could not connect to database: {e}")
except ImproperlyConfigured as e:
self.stdout.write(f"Improperly configured: {e}")
else:
if not connection.is_usable():
self.stdout.write("Database configuration is not usable")
if connected:
self.stdout.write("Database connection sucessful!")

View File

@@ -8,7 +8,7 @@ import operator
from rest_framework.authtoken.models import Token
logger = logging.getLogger(__name__)
logger = logging.getLogger("inventree")
class AuthRequiredMiddleware(object):
@@ -47,7 +47,12 @@ class AuthRequiredMiddleware(object):
authorized = False
if 'Authorization' in request.headers.keys():
# Allow static files to be accessed without auth
# Important for e.g. login page
if request.path_info.startswith('/static/'):
authorized = True
elif 'Authorization' in request.headers.keys():
auth = request.headers['Authorization'].strip()
if auth.startswith('Token') and len(auth.split()) == 2:
@@ -56,7 +61,7 @@ class AuthRequiredMiddleware(object):
# Does the provided token match a valid user?
if Token.objects.filter(key=token).exists():
allowed = ['/api/', '/media/', '/static/']
allowed = ['/api/', '/media/']
# Only allow token-auth for /media/ or /static/ dirs!
if any([request.path_info.startswith(a) for a in allowed]):

View File

@@ -56,19 +56,20 @@ class InvenTreeAttachment(models.Model):
def __str__(self):
return os.path.basename(self.attachment.name)
attachment = models.FileField(upload_to=rename_attachment,
attachment = models.FileField(upload_to=rename_attachment, verbose_name=_('Attachment'),
help_text=_('Select file to attach'))
comment = models.CharField(blank=True, max_length=100, help_text=_('File comment'))
comment = models.CharField(blank=True, max_length=100, verbose_name=_('Comment'), help_text=_('File comment'))
user = models.ForeignKey(
User,
on_delete=models.SET_NULL,
blank=True, null=True,
verbose_name=_('User'),
help_text=_('User'),
)
upload_date = models.DateField(auto_now_add=True, null=True, blank=True)
upload_date = models.DateField(auto_now_add=True, null=True, blank=True, verbose_name=_('upload date'))
@property
def basename(self):
@@ -103,12 +104,14 @@ class InvenTreeTree(MPTTModel):
blank=False,
max_length=100,
validators=[validate_tree_name],
verbose_name=_("Name"),
help_text=_("Name"),
)
description = models.CharField(
blank=True,
max_length=250,
verbose_name=_("Description"),
help_text=_("Description (optional)")
)
@@ -117,6 +120,7 @@ class InvenTreeTree(MPTTModel):
on_delete=models.DO_NOTHING,
blank=True,
null=True,
verbose_name=_("parent"),
related_name='children')
@property

View File

@@ -0,0 +1,72 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from rest_framework import permissions
import users.models
class RolePermission(permissions.BasePermission):
"""
Role mixin for API endpoints, allowing us to specify the user "role"
which is required for certain operations.
Each endpoint can have one or more of the following actions:
- GET
- POST
- PUT
- PATCH
- DELETE
Specify the required "role" using the role_required attribute.
e.g.
role_required = "part"
The RoleMixin class will then determine if the user has the required permission
to perform the specified action.
For example, a DELETE action will be rejected unless the user has the "part.remove" permission
"""
def has_permission(self, request, view):
"""
Determine if the current user has the specified permissions
"""
user = request.user
# Superuser can do it all
if user.is_superuser:
return True
# Map the request method to a permission type
rolemap = {
'GET': 'view',
'OPTIONS': 'view',
'POST': 'add',
'PUT': 'change',
'PATCH': 'change',
'DELETE': 'delete',
}
permission = rolemap[request.method]
try:
# Extract the model name associated with this request
model = view.serializer_class.Meta.model
app_label = model._meta.app_label
model_name = model._meta.model_name
table = f"{app_label}_{model_name}"
except AttributeError:
# We will assume that if the serializer class does *not* have a Meta,
# then we don't need a permission
return True
result = users.models.RuleSet.check_table_permission(user, table, permission)
return result

View File

@@ -11,42 +11,152 @@ database setup in this file.
"""
import sys
import os
import logging
import os
import random
import string
import shutil
import sys
import tempfile
import yaml
from datetime import datetime
import yaml
from django.utils.translation import gettext_lazy as _
def eprint(*args, **kwargs):
""" Print a warning message to stderr """
print(*args, file=sys.stderr, **kwargs)
def _is_true(x):
# Shortcut function to determine if a value "looks" like a boolean
return str(x).lower() in ['1', 'y', 'yes', 't', 'true']
def get_setting(environment_var, backup_val, default_value=None):
"""
Helper function for retrieving a configuration setting value
- First preference is to look for the environment variable
- Second preference is to look for the value of the settings file
- Third preference is the default value
"""
val = os.getenv(environment_var)
if val is not None:
return val
if backup_val is not None:
return backup_val
return default_value
# Determine if we are running in "test" mode e.g. "manage.py test"
TESTING = 'test' in sys.argv
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
cfg_filename = os.path.join(BASE_DIR, 'config.yaml')
# Specify where the "config file" is located.
# By default, this is 'config.yaml'
cfg_filename = os.getenv('INVENTREE_CONFIG_FILE')
if cfg_filename:
cfg_filename = cfg_filename.strip()
cfg_filename = os.path.abspath(cfg_filename)
else:
# Config file is *not* specified - use the default
cfg_filename = os.path.join(BASE_DIR, 'config.yaml')
if not os.path.exists(cfg_filename):
CONFIG = {}
eprint("Warning: config.yaml not found - using default settings")
else:
with open(cfg_filename, 'r') as cfg:
print("InvenTree configuration file 'config.yaml' not found - creating default file")
cfg_template = os.path.join(BASE_DIR, "config_template.yaml")
shutil.copyfile(cfg_template, cfg_filename)
print(f"Created config file {cfg_filename}")
with open(cfg_filename, 'r') as cfg:
CONFIG = yaml.safe_load(cfg)
# Read the autogenerated key-file
key_file = open(os.path.join(BASE_DIR, 'secret_key.txt'), 'r')
SECRET_KEY = key_file.read().strip()
# Default action is to run the system in Debug mode
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = CONFIG.get('debug', True)
DEBUG = _is_true(get_setting(
'INVENTREE_DEBUG',
CONFIG.get('debug', True)
))
# Configure logging settings
log_level = get_setting(
'INVENTREE_LOG_LEVEL',
CONFIG.get('log_level', 'DEBUG')
)
logging.basicConfig(
level=log_level,
format="%(asctime)s %(levelname)s %(message)s",
)
if log_level not in ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']:
log_level = 'WARNING'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'root': {
'handlers': ['console'],
'level': log_level,
},
}
# Get a logger instance for this setup file
logger = logging.getLogger("inventree")
"""
Specify a secret key to be used by django.
Following options are tested, in descending order of preference:
A) Check for environment variable INVENTREE_SECRET_KEY => Use raw key data
B) Check for environment variable INVENTREE_SECRET_KEY_FILE => Load key data from file
C) Look for default key file "secret_key.txt"
d) Create "secret_key.txt" if it does not exist
"""
if os.getenv("INVENTREE_SECRET_KEY"):
# Secret key passed in directly
SECRET_KEY = os.getenv("INVENTREE_SECRET_KEY").strip()
logger.info("SECRET_KEY loaded by INVENTREE_SECRET_KEY")
else:
# Secret key passed in by file location
key_file = os.getenv("INVENTREE_SECRET_KEY_FILE")
if key_file:
key_file = os.path.abspath(key_file)
else:
# default secret key location
key_file = os.path.join(BASE_DIR, "secret_key.txt")
key_file = os.path.abspath(key_file)
if not os.path.exists(key_file):
logger.info(f"Generating random key file at '{key_file}'")
# Create a random key file
with open(key_file, 'w') as f:
options = string.digits + string.ascii_letters + string.punctuation
key = ''.join([random.choice(options) for i in range(100)])
f.write(key)
logger.info(f"Loading SECRET_KEY from '{key_file}'")
try:
SECRET_KEY = open(key_file, "r").read().strip()
except Exception:
logger.exception(f"Couldn't load keyfile {key_file}")
sys.exit(-1)
# List of allowed hosts (default = allow all)
ALLOWED_HOSTS = CONFIG.get('allowed_hosts', ['*'])
@@ -65,18 +175,16 @@ if cors_opt:
if not CORS_ORIGIN_ALLOW_ALL:
CORS_ORIGIN_WHITELIST = cors_opt.get('whitelist', [])
if DEBUG:
# will output to your console
logging.basicConfig(
level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(message)s',
)
# Web URL endpoint for served static files
STATIC_URL = '/static/'
# The filesystem location for served static files
STATIC_ROOT = os.path.abspath(CONFIG.get('static_root', os.path.join(BASE_DIR, 'static')))
STATIC_ROOT = os.path.abspath(
get_setting(
'INVENTREE_STATIC_ROOT',
CONFIG.get('static_root', '/home/inventree/static')
)
)
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'InvenTree', 'static'),
@@ -89,33 +197,18 @@ STATIC_COLOR_THEMES_DIR = os.path.join(STATIC_ROOT, 'css', 'color-themes')
MEDIA_URL = '/media/'
# The filesystem location for served static files
MEDIA_ROOT = os.path.abspath(CONFIG.get('media_root', os.path.join(BASE_DIR, 'media')))
MEDIA_ROOT = os.path.abspath(
get_setting(
'INVENTREE_MEDIA_ROOT',
CONFIG.get('media_root', '/home/inventree/data/media')
)
)
if DEBUG:
print("InvenTree running in DEBUG mode")
print("MEDIA_ROOT:", MEDIA_ROOT)
print("STATIC_ROOT:", STATIC_ROOT)
logger.info("InvenTree running in DEBUG mode")
# Does the user wish to use the sentry.io integration?
sentry_opts = CONFIG.get('sentry', {})
if sentry_opts.get('enabled', False):
dsn = sentry_opts.get('dsn', None)
if dsn is not None:
# Try to import required modules (exit if not installed)
try:
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
sentry_sdk.init(dsn=dsn, integrations=[DjangoIntegration()], send_default_pii=True)
except ModuleNotFoundError:
print("sentry_sdk module not found. Install using 'pip install sentry-sdk'")
sys.exit(-1)
else:
print("Warning: Sentry.io DSN not specified")
logger.info(f"MEDIA_ROOT: '{MEDIA_ROOT}'")
logger.info(f"STATIC_ROOT: '{STATIC_ROOT}'")
# Application definition
@@ -138,6 +231,8 @@ INSTALLED_APPS = [
'part.apps.PartConfig',
'report.apps.ReportConfig',
'stock.apps.StockConfig',
'users.apps.UsersConfig',
'InvenTree.apps.InvenTreeConfig', # InvenTree app runs last
# Third part add-ons
'django_filters', # Extended filter functionality
@@ -147,25 +242,17 @@ INSTALLED_APPS = [
'corsheaders', # Cross-origin Resource Sharing for DRF
'crispy_forms', # Improved form rendering
'import_export', # Import / export tables to file
'django_cleanup', # Automatically delete orphaned MEDIA files
'qr_code', # Generate QR codes
'django_cleanup.apps.CleanupConfig', # Automatically delete orphaned MEDIA files
'mptt', # Modified Preorder Tree Traversal
'markdownx', # Markdown editing
'markdownify', # Markdown template rendering
'django_tex', # LaTeX output
'django_admin_shell', # Python shell for the admin interface
'djmoney', # django-money integration
'djmoney.contrib.exchange', # django-money exchange rates
'error_report', # Error reporting in the admin interface
'django_q',
]
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
},
},
}
MIDDLEWARE = CONFIG.get('middleware', [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
@@ -179,13 +266,16 @@ MIDDLEWARE = CONFIG.get('middleware', [
'InvenTree.middleware.AuthRequiredMiddleware'
])
# Error reporting middleware
MIDDLEWARE.append('error_report.middleware.ExceptionProcessor')
AUTHENTICATION_BACKENDS = CONFIG.get('authentication_backends', [
'django.contrib.auth.backends.ModelBackend'
])
# If the debug toolbar is enabled, add the modules
if DEBUG and CONFIG.get('debug_toolbar', False):
print("Running with DEBUG_TOOLBAR enabled")
logger.info("Running with DEBUG_TOOLBAR enabled")
INSTALLED_APPS.append('debug_toolbar')
MIDDLEWARE.append('debug_toolbar.middleware.DebugToolbarMiddleware')
@@ -198,6 +288,7 @@ TEMPLATES = [
os.path.join(BASE_DIR, 'templates'),
# Allow templates in the reporting directory to be accessed
os.path.join(MEDIA_ROOT, 'report'),
os.path.join(MEDIA_ROOT, 'label'),
],
'APP_DIRS': True,
'OPTIONS': {
@@ -207,18 +298,12 @@ TEMPLATES = [
'django.template.context_processors.i18n',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'InvenTree.context.health_status',
'InvenTree.context.status_codes',
'InvenTree.context.user_roles',
],
},
},
# Backend for LaTeX report rendering
{
'NAME': 'tex',
'BACKEND': 'django_tex.engine.TeXEngine',
'DIRS': [
os.path.join(MEDIA_ROOT, 'report'),
]
},
]
REST_FRAMEWORK = {
@@ -229,11 +314,29 @@ REST_FRAMEWORK = {
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.TokenAuthentication',
),
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema'
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
'rest_framework.permissions.DjangoModelPermissions',
'InvenTree.permissions.RolePermission',
),
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema',
}
WSGI_APPLICATION = 'InvenTree.wsgi.application'
# django-q configuration
Q_CLUSTER = {
'name': 'InvenTree',
'workers': 4,
'timeout': 90,
'retry': 120,
'queue_limit': 50,
'bulk': 10,
'orm': 'default',
'sync': False,
}
# Markdownx configuration
# Ref: https://neutronx.github.io/django-markdownx/customization/
MARKDOWNX_MEDIA_PATH = datetime.now().strftime('markdownx/%Y/%m/%d')
@@ -268,42 +371,78 @@ MARKDOWNIFY_BLEACH = False
DATABASES = {}
"""
When running unit tests, enforce usage of sqlite3 database,
so that the tests can be run in RAM without any setup requirements
"""
if 'test' in sys.argv:
eprint('InvenTree: Running tests - Using sqlite3 memory database')
DATABASES['default'] = {
# Ensure sqlite3 backend is being used
'ENGINE': 'django.db.backends.sqlite3',
# Doesn't matter what the database is called, it is executed in RAM
'NAME': 'ram_test_db.sqlite3',
}
Configure the database backend based on the user-specified values.
# Database backend selection
else:
if 'database' in CONFIG:
DATABASES['default'] = CONFIG['database']
else:
eprint("Warning: Database backend not specified - using default (sqlite)")
DATABASES['default'] = {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'inventree_db.sqlite3'),
}
- Primarily this configuration happens in the config.yaml file
- However there may be reason to configure the DB via environmental variables
- The following code lets the user "mix and match" database configuration
"""
logger.info("Configuring database backend:")
# Extract database configuration from the config.yaml file
db_config = CONFIG.get('database', {})
if not db_config:
db_config = {}
# Environment variables take preference over config file!
db_keys = ['ENGINE', 'NAME', 'USER', 'PASSWORD', 'HOST', 'PORT']
for key in db_keys:
# First, check the environment variables
env_key = f"INVENTREE_DB_{key}"
env_var = os.environ.get(env_key, None)
if env_var:
logger.info(f"{env_key}={env_var}")
# Override configuration value
db_config[key] = env_var
# Check that required database configuration options are specified
reqiured_keys = ['ENGINE', 'NAME']
for key in reqiured_keys:
if key not in db_config:
error_msg = f'Missing required database configuration value {key}'
logger.error(error_msg)
print('Error: ' + error_msg)
sys.exit(-1)
"""
Special considerations for the database 'ENGINE' setting.
It can be specified in config.yaml (or envvar) as either (for example):
- sqlite3
- django.db.backends.sqlite3
- django.db.backends.postgresql
"""
db_engine = db_config['ENGINE']
if db_engine.lower() in ['sqlite3', 'postgresql', 'mysql']:
# Prepend the required python module string
db_engine = f'django.db.backends.{db_engine.lower()}'
db_config['ENGINE'] = db_engine
db_name = db_config['NAME']
db_host = db_config.get('HOST', "''")
print("InvenTree Database Configuration")
print("================================")
print(f"ENGINE: {db_engine}")
print(f"NAME: {db_name}")
print(f"HOST: {db_host}")
DATABASES['default'] = db_config
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
},
'qr-code': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'qr-code-cache',
'TIMEOUT': 3600
}
}
QR_CODE_CACHE_ALIAS = 'qr-code'
# Password validation
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
@@ -328,65 +467,71 @@ AUTH_PASSWORD_VALIDATORS = [
EXTRA_URL_SCHEMES = CONFIG.get('extra_url_schemes', [])
if not type(EXTRA_URL_SCHEMES) in [list]:
eprint("Warning: extra_url_schemes not correctly formatted")
logger.warning("extra_url_schemes not correctly formatted")
EXTRA_URL_SCHEMES = []
# Internationalization
# https://docs.djangoproject.com/en/1.10/topics/i18n/
# https://docs.djangoproject.com/en/dev/topics/i18n/
LANGUAGE_CODE = CONFIG.get('language', 'en-us')
# If a new language translation is supported, it must be added here
LANGUAGES = [
('en', _('English')),
('de', _('German')),
('fr', _('French')),
('de', _('German')),
('pk', _('Polish')),
('tr', _('Turkish')),
]
# Currencies available for use
CURRENCIES = CONFIG.get(
'currencies',
[
'AUD', 'CAD', 'EUR', 'GBP', 'JPY', 'NZD', 'USD',
],
)
# TODO - Allow live web-based backends in the future
EXCHANGE_BACKEND = 'InvenTree.exchange.InvenTreeManualExchangeBackend'
LOCALE_PATHS = (
os.path.join(BASE_DIR, 'locale/'),
)
TIME_ZONE = 'UTC'
TIME_ZONE = get_setting(
'INVENTREE_TIMEZONE',
CONFIG.get('timezone', 'UTC')
)
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Do not use native timezone support in "test" mode
# It generates a *lot* of cruft in the logs
if not TESTING:
USE_TZ = True
DATE_INPUT_FORMATS = [
"%Y-%m-%d",
]
# LaTeX rendering settings (django-tex)
LATEX_SETTINGS = CONFIG.get('latex', {})
# Is LaTeX rendering enabled? (Off by default)
LATEX_ENABLED = LATEX_SETTINGS.get('enabled', False)
# Set the latex interpreter in the config.yaml settings file
LATEX_INTERPRETER = LATEX_SETTINGS.get('interpreter', 'pdflatex')
LATEX_INTERPRETER_OPTIONS = LATEX_SETTINGS.get('options', '')
LATEX_GRAPHICSPATH = [
# Allow LaTeX files to access the report assets directory
os.path.join(MEDIA_ROOT, "report", "assets"),
]
# crispy forms use the bootstrap templates
CRISPY_TEMPLATE_PACK = 'bootstrap3'
# Use database transactions when importing / exporting data
IMPORT_EXPORT_USE_TRANSACTIONS = True
BACKUP_DIR = get_setting(
'INVENTREE_BACKUP_DIR',
CONFIG.get('backup_dir', tempfile.gettempdir()),
)
# Settings for dbbsettings app
DBBACKUP_STORAGE = 'django.core.files.storage.FileSystemStorage'
DBBACKUP_STORAGE_OPTIONS = {
'location': CONFIG.get('backup_dir', tempfile.gettempdir()),
'location': BACKUP_DIR,
}
# Internal IP addresses allowed to see the debug toolbar

View File

@@ -0,0 +1,13 @@
@charset "UTF-8";
/**
* @author: Dennis Hernández
* @webSite: http://djhvscf.github.io/Blog
* @version: v2.1.1
*/
.no-filter-control {
height: 34px;
}
.filter-control {
margin: 0 2px 2px 2px;
}

View File

@@ -1,5 +1,3 @@
/* Color Theme: "Dark Reader" (Autogenerated) */
/*
_______
/ \
@@ -62,9 +60,6 @@ select:-webkit-autofill {
::-webkit-scrollbar-corner {
background-color: #181a1b;
}
* {
scrollbar-color: #202324 #454a4d;
}
::selection {
background-color: #004daa !important;
color: #e8e6e3 !important;
@@ -75,24 +70,14 @@ select:-webkit-autofill {
}
/* Invert Style */
.jfk-bubble.gtx-bubble {
.jfk-bubble.gtx-bubble, .captcheck_answer_label > input + img, span#closed_text > img[src^="https://www.gstatic.com/images/branding/googlelogo"], span[data-href^="https://www.hcaptcha.com/"] > #icon {
filter: invert(100%) hue-rotate(180deg) contrast(90%) !important;
}
/* Override Style */
.vimvixen-hint {
background-color: #7b5300 !important;
border-color: #d8b013 !important;
color: #f3e8c8 !important;
}
::placeholder {
opacity: 0.5 !important;
}
/* Variables Style */
:root {
--darkreader-neutral-background: #181a1b;
--darkreader-neutral-text: #e8e6e3;
--darkreader-neutral-background: #131516;
--darkreader-neutral-text: #d8d4cf;
--darkreader-selection-background: #004daa;
--darkreader-selection-text: #e8e6e3;
}
@@ -125,10 +110,10 @@ select:-webkit-autofill {
color: rgb(232, 230, 227);
}
.treegrid-expander-expanded {
background-image: url("http://127.0.0.1:8000/static/treegrid/img/collapse.png");
background-image: url("/static/treegrid/img/collapse.png");
}
.treegrid-expander-collapsed {
background-image: url("http://127.0.0.1:8000/static/treegrid/img/expand.png");
background-image: url("/static/treegrid/img/expand.png");
}
a {
background-color: transparent;
@@ -2582,6 +2567,378 @@ button.close {
.toggle-off {
border-color: initial;
}
.fc-unselectable {
-webkit-tap-highlight-color: rgba(232, 230, 227, 0);
}
.fc a[data-navlink]:hover {
text-decoration-color: initial;
}
.fc-theme-standard td,
.fc-theme-standard th {
border-color: rgb(58, 62, 65);
}
.fc .fc-button:focus {
outline-color: rgb(186, 123, 0);
}
.fc .fc-button {
background-color: transparent;
border-color: transparent;
}
.fc .fc-button:hover {
text-decoration-color: initial;
}
.fc .fc-button:focus {
outline-color: initial;
box-shadow: rgba(35, 50, 64, 0.25) 0px 0px 0px 0.2rem;
}
.fc .fc-button-primary {
color: rgb(232, 230, 227);
background-color: rgb(35, 50, 64);
border-color: rgb(77, 109, 141);
}
.fc .fc-button-primary:hover {
color: rgb(232, 230, 227);
background-color: rgb(24, 34, 44);
border-color: rgb(128, 119, 105);
}
.fc .fc-button-primary:disabled {
color: rgb(232, 230, 227);
background-color: rgb(35, 50, 64);
border-color: rgb(77, 109, 141);
}
.fc .fc-button-primary:focus {
box-shadow: rgba(61, 73, 85, 0.5) 0px 0px 0px 0.2rem;
}
.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
color: rgb(232, 230, 227);
background-color: rgb(21, 30, 38);
border-color: rgb(130, 121, 107);
}
.fc .fc-button-primary:not(:disabled):active:focus,
.fc .fc-button-primary:not(:disabled).fc-button-active:focus {
box-shadow: rgba(61, 73, 85, 0.5) 0px 0px 0px 0.2rem;
}
.fc-theme-standard .fc-scrollgrid {
border-color: rgb(58, 62, 65);
}
.fc .fc-scrollgrid-section-sticky > * {
background-image: initial;
background-color: rgb(24, 26, 27);
}
.fc .fc-non-business {
background-image: initial;
background-color: rgba(47, 50, 52, 0.3);
}
.fc .fc-bg-event {
background-image: initial;
background-color: rgb(60, 116, 30);
}
.fc .fc-highlight {
background-image: initial;
background-color: rgba(17, 71, 82, 0.3);
}
.fc .fc-cell-shaded,
.fc .fc-day-disabled {
background-image: initial;
background-color: rgba(51, 55, 57, 0.3);
}
a.fc-event,
a.fc-event:hover {
text-decoration-color: initial;
}
.fc-event-dragging.fc-event-selected {
box-shadow: rgba(0, 0, 0, 0.3) 0px 2px 7px;
}
.fc-event-selected .fc-event-resizer {
border-color: inherit;
background-image: initial;
background-color: rgb(24, 26, 27);
}
.fc-event-selected {
box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 5px;
}
.fc-event-selected::after {
background-image: initial;
background-color: rgba(0, 0, 0, 0.25);
}
.fc-h-event {
border-color: rgb(28, 87, 145);
background-color: rgb(32, 98, 163);
}
.fc-h-event .fc-event-main {
color: rgb(232, 230, 227);
}
.fc .fc-popover {
box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 6px;
}
.fc-theme-standard .fc-popover {
border-color: rgb(58, 62, 65);
background-image: initial;
background-color: rgb(24, 26, 27);
}
.fc-theme-standard .fc-popover-header {
background-image: initial;
background-color: rgba(51, 55, 57, 0.3);
}
.fc .fc-daygrid-day.fc-day-today {
background-color: rgba(180, 151, 0, 0.15);
}
.fc .fc-daygrid-week-number {
background-color: rgba(51, 55, 57, 0.3);
color: rgb(152, 143, 129);
}
.fc-daygrid-dot-event:hover,
.fc-daygrid-dot-event.fc-event-mirror {
background-image: initial;
background-color: rgba(0, 0, 0, 0.1);
}
.fc-daygrid-event-dot {
border-color: rgb(28, 87, 145);
}
.fc-v-event {
border-color: rgb(28, 87, 145);
background-color: rgb(32, 98, 163);
}
.fc-v-event .fc-event-main {
color: rgb(232, 230, 227);
}
.fc .fc-timegrid-slot {
border-bottom-color: initial;
}
.fc .fc-timegrid-col.fc-day-today {
background-color: rgba(180, 151, 0, 0.15);
}
.fc-timegrid-event-harness-inset .fc-timegrid-event,
.fc-timegrid-event.fc-event-mirror {
box-shadow: rgb(24, 26, 27) 0px 0px 0px 1px;
}
.fc .fc-timegrid-now-indicator-line {
border-color: rgb(179, 0, 0);
}
.fc .fc-timegrid-now-indicator-arrow {
border-color: rgb(179, 0, 0);
}
.fc-direction-ltr .fc-timegrid-now-indicator-arrow {
border-top-color: transparent;
border-bottom-color: transparent;
}
.fc-direction-rtl .fc-timegrid-now-indicator-arrow {
border-top-color: transparent;
border-bottom-color: transparent;
}
.fc-theme-standard .fc-list {
border-color: rgb(58, 62, 65);
}
.fc .fc-list-empty {
background-color: rgba(51, 55, 57, 0.3);
}
.fc .fc-list-table tr > * {
border-left-color: initial;
border-right-color: initial;
}
.fc .fc-list-sticky .fc-list-day > * {
background-image: initial;
background-color: rgb(24, 26, 27);
}
.fc-theme-standard .fc-list-day-cushion {
background-color: rgba(51, 55, 57, 0.3);
}
.fc .fc-list-event:hover td {
background-color: rgb(30, 32, 33);
}
.fc .fc-list-event-dot {
border-color: rgb(28, 87, 145);
}
.fc .fc-list-event-title a {
color: inherit;
text-decoration-color: initial;
}
.fc .fc-list-event.fc-event-forced-url:hover a {
text-decoration-color: initial;
}
.fc-theme-bootstrap a:not([href]) {
color: inherit;
}
.ui-helper-hidden-accessible {
border-color: initial;
}
.ui-helper-reset {
border-color: initial;
outline-color: initial;
text-decoration-color: initial;
list-style-image: initial;
}
.ui-widget.ui-widget-content {
border-color: rgb(64, 70, 72);
}
.ui-widget-content {
border-color: rgb(58, 62, 65);
background-image: initial;
background-color: rgb(24, 26, 27);
color: rgb(200, 195, 188);
}
.ui-widget-content a {
color: rgb(200, 195, 188);
}
.ui-widget-header {
border-color: rgb(58, 62, 65);
background-image: initial;
background-color: rgb(36, 39, 41);
color: rgb(200, 195, 188);
}
.ui-widget-header a {
color: rgb(200, 195, 188);
}
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default,
.ui-button,
html .ui-button.ui-state-disabled:hover,
html .ui-button.ui-state-disabled:active {
border-color: rgb(64, 70, 72);
background-image: initial;
background-color: rgb(29, 32, 33);
color: rgb(188, 183, 174);
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited,
a.ui-button,
a:link.ui-button,
a:visited.ui-button,
.ui-button {
color: rgb(188, 183, 174);
text-decoration-color: initial;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus,
.ui-button:hover,
.ui-button:focus {
border-color: rgb(62, 68, 70);
background-image: initial;
background-color: rgb(34, 37, 38);
color: rgb(205, 200, 194);
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited,
a.ui-button:hover,
a.ui-button:focus {
color: rgb(205, 200, 194);
text-decoration-color: initial;
}
.ui-visual-focus {
box-shadow: rgb(35, 90, 137) 0px 0px 3px 1px;
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
border-color: rgb(0, 43, 179);
background-image: initial;
background-color: rgb(0, 102, 204);
color: rgb(232, 230, 227);
}
.ui-icon-background,
.ui-state-active .ui-icon-background {
border-color: rgb(0, 43, 179);
background-color: rgb(24, 26, 27);
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: rgb(232, 230, 227);
text-decoration-color: initial;
}
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border-color: rgb(131, 127, 30);
background-image: initial;
background-color: rgb(118, 112, 0);
color: rgb(222, 221, 132);
}
.ui-state-checked {
border-color: rgb(131, 127, 30);
background-image: initial;
background-color: rgb(118, 112, 0);
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: rgb(222, 221, 132);
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border-color: rgb(120, 34, 17);
background-image: initial;
background-color: rgb(67, 4, 4);
color: rgb(182, 176, 166);
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
color: rgb(182, 176, 166);
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
color: rgb(182, 176, 166);
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
background-image: none;
}
.ui-state-active .ui-icon,
.ui-button:active .ui-icon {
background-image: url("/static/script/jquery-ui/images/ui-icons_ffffff_256x240.png");
}
.ui-state-highlight .ui-icon,
.ui-button .ui-state-highlight.ui-icon {
background-image: url("/static/script/jquery-ui/images/ui-icons_777620_256x240.png");
}
.ui-button .ui-icon {
background-image: url("/static/script/jquery-ui/images/ui-icons_777777_256x240.png");
}
.ui-widget-overlay {
background-image: initial;
background-color: rgb(72, 78, 81);
}
.ui-widget-shadow {
box-shadow: rgb(77, 83, 86) 0px 0px 5px;
}
.login-screen {
background-image: url("/static/img/paper_splash.jpg");
color: rgb(221, 218, 214);
}
.login-container {
background-color: rgba(38, 41, 42, 0.75);
}
.login-container input {
background-color: rgba(27, 29, 30, 0.9);
}
.login-button {
background-color: rgba(27, 29, 30, 0.9);
color: rgb(200, 195, 188);
border-color: rgb(72, 78, 81);
}
.index-action-selected {
background-color: rgb(32, 34, 36);
}
.markdownx .row {
border-color: rgb(31, 31, 92);
}
@@ -2610,7 +2967,7 @@ button.close {
.progress-value {
color: rgb(200, 195, 188);
}
.navbar-barcode-li {
#navbar-barcode-li {
border-left-color: initial;
border-right-color: initial;
}
@@ -2698,6 +3055,9 @@ button.close {
.rowinvalid {
color: rgb(255, 85, 85);
}
.rowinherited {
background-color: rgb(34, 36, 38);
}
.filter-list {
background-image: initial;
background-color: rgb(34, 36, 38);
@@ -2741,8 +3101,14 @@ button.close {
.badge-alert {
background-color: rgb(173, 0, 0);
}
.badge-orange {
background-color: rgb(202, 149, 2);
}
.badge-green {
background-color: rgb(14, 136, 14);
}
.part-thumb {
border-color: rgb(72, 78, 81);
border-color: rgb(58, 62, 65);
}
input[type="submit"] {
color: rgb(200, 195, 188);
@@ -2755,6 +3121,10 @@ input[type="submit"] {
.sidenav {
background-color: rgb(24, 26, 27);
}
.sidenav .list-group-item.active {
background-color: rgb(43, 47, 49);
border-color: rgb(62, 68, 70);
}
.help-inline {
color: rgb(238, 90, 90);
}
@@ -2770,6 +3140,9 @@ input[type="submit"] {
.panel-heading {
background-color: rgb(27, 29, 30);
}
.panel-inventree {
box-shadow: rgb(43, 47, 49) 1px 1px;
}
.warning-msg {
color: rgb(255, 37, 37);
}
@@ -2791,3 +3164,16 @@ input[type="submit"] {
.node-part-tree:not(.node-disabled):hover {
background-color: rgb(30, 32, 33);
}
/* Override Style */
.vimvixen-hint {
background-color: #7b5300 !important;
border-color: #d8b013 !important;
color: #f3e8c8 !important;
}
::placeholder {
opacity: 0.5 !important;
}
a[href="https://coinmarketcap.com/"] > svg[width="94"][height="16"] > path {
fill: var(--darkreader-neutral-text) !important;
}

View File

@@ -11,6 +11,55 @@
--label-yellow: #fdc82a;
}
.login-screen {
background-image: url("/static/img/paper_splash.jpg");
background-size: cover;
background-repeat: no-repeat;
height: 100%;
font-family: 'Numans', sans-serif;
color: #eee;
}
.login-container {
left: 50%;
position: fixed;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
align-content: center;
border-radius: 15px;
padding: 20px;
padding-bottom: 35px;
background-color: rgba(50, 50, 50, 0.75);
}
.login-header {
padding-right: 30px;
margin-right: 30px;
}
.login-container input {
background-color: rgba(250, 250, 250, 0.9);
}
.login-button {
background-color: rgba(250, 250, 250, 0.9);
color: #333;
border-color: #AAA;
width: 100%;
border-radius: 5px;
}
.index-bg {
width: 100%;
object-fit: fill;
opacity: 5%;
}
.index-action-selected {
background-color: #EEEEF5;
}
.markdownx .row {
margin: 5px;
padding: 5px;
@@ -76,6 +125,7 @@
.qr-container {
width: 100%;
align-content: center;
object-fit: fill;
}
.navbar-brand {
@@ -157,7 +207,12 @@
}
.treeview .list-group-item {
padding: 6px 12px;
padding: 10px 5px;
}
.treeview .list-group-item .indent {
margin-left: 3px;
margin-right: 3px;
}
.list-group-item-condensed {
@@ -265,6 +320,10 @@
.rowinvalid {
color: #A00;
}
.rowinherited {
background-color: #eee;
font-style: italic;
}
@@ -444,13 +503,21 @@
background-color: #f33;
}
.badge-orange {
background-color: #fcba03;
}
.badge-green {
background-color: #1A1;
}
.part-thumb {
width: 200px;
height: 200px;
margin: 2px;
padding: 3px;
object-fit: contain;
border: 1px solid #aaa;
border: 1px solid #ddd;
border-radius: 3px;
}
@@ -464,7 +531,8 @@
left: 0;
opacity: 0;
transition: .25s ease;
padding: 15px;
padding-top: 10px;
padding-left: 25px;
margin: 5px;
}
@@ -478,7 +546,7 @@
}
.media {
padding-top: 15px;
//padding-top: 15px;
overflow: visible;
}
@@ -518,6 +586,8 @@
.breadcrump {
margin-bottom: 5px;
margin-left: 5px;
margin-right: 10px;
}
.inventree-body {
@@ -527,15 +597,15 @@
}
.inventree-pre-content {
width: 100%;
clear: both;
width: auto;
}
.inventree-content {
padding-left: 5px;
padding-right: 5px;
padding-left: 10px;
padding-right: 10px;
padding-top: 5px;
width: auto;
width: 100%;
display: inline-block;
transition: 0.1s;
}
@@ -556,6 +626,53 @@
z-index: 11000;
}
.modal-close {
position: absolute;
top: 15px;
right: 35px;
color: #f1f1f1;
font-size: 40px;
font-weight: bold;
transition: 0.25s;
}
.modal-close:hover,
.modal-close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}
.modal-image-content {
margin: auto;
display: block;
width: 80%;
max-width: 700px;
text-align: center;
color: #ccc;
padding: 10px 0;
}
@media only screen and (max-width: 700px){
.modal-image-content {
width: 100%;
}
}
.modal-image {
display: none;
position: fixed;
z-index: 10000;
padding-top: 100px;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.85); /* Black w/ opacity */
}
.js-modal-form .checkbox {
margin-left: 0px;
}
@@ -574,7 +691,7 @@
margin-bottom: 3px;
}
.modal-form-content {
.modal-form-content-wrapper {
border-radius: 0;
position:relative;
height: auto !important;
@@ -612,16 +729,65 @@ input[type="submit"] {
background-color: #5e7d87;
}
/* The side navigation menu */
.inventree-navs {
display: flex;
}
.sidenav {
height: 100%; /* 100% Full-height */
width: 0px; /* 0 width - change this with JavaScript */
position: fixed; /* Stay in place */
background-color: #fff; /* Black*/
position: relative; /* Stay in place */
overflow-x: hidden; /* Disable horizontal scroll */
overflow: hidden;
transition: 0.1s; /* 0.5 second transition effect to slide in the sidenav */
z-index: 100;
background-color: #fff; /* Black*/
padding-top: 5px;
}
.sidenav li {
white-space: nowrap;
overflow-x: hidden;
}
.sidenav .list-group-item.active {
background-color: #ddd;
border-color: #ccc;
}
/* The side navigation menu */
.sidenav-left {
left: 0px;
top: 0px;
width: 0px;
z-index: 500;
}
.sidenav-left .badge {
position: absolute;
right: 3px;
margin-right: 5px;
}
.sidenav-right {
left: 0px;
top: 70px;
position: sticky;
font-size: 115%;
margin-left: 5px;
}
.sidenav-right svg {
margin-right: 10px;
}
.container > aside,
.container > main {
padding: 10px;
overflow: auto;
}
.wrapper {
align-items: stretch;
display: flex;
@@ -700,6 +866,11 @@ input[type="submit"] {
background-color: #fafafa;
}
.panel-inventree {
padding: 10px;
box-shadow: 1px 1px #DDD;
}
.float-right {
float: right;
}
@@ -708,13 +879,6 @@ input[type="submit"] {
color: #e00;
}
.login {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.part-allocation {
padding: 3px 10px;
border: 1px solid #ccc;
@@ -748,3 +912,6 @@ input[type="submit"] {
to { transform: scale(1) rotate(360deg);}
}
input[type="date"].form-control, input[type="time"].form-control, input[type="datetime-local"].form-control, input[type="month"].form-control {
line-height: unset;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var af = {
code: 'af',
week: {
dow: 1, // Maandag is die eerste dag van die week.
doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
},
buttonText: {
prev: 'Vorige',
next: 'Volgende',
today: 'Vandag',
year: 'Jaar',
month: 'Maand',
week: 'Week',
day: 'Dag',
list: 'Agenda',
},
allDayText: 'Heeldag',
moreLinkText: 'Addisionele',
noEventsText: 'Daar is geen gebeurtenisse nie',
};
return af;
}());

View File

@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var arDz = {
code: 'ar-dz',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 4, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return arDz;
}());

View File

@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var arKw = {
code: 'ar-kw',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return arKw;
}());

View File

@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var arLy = {
code: 'ar-ly',
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return arLy;
}());

View File

@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var arMa = {
code: 'ar-ma',
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return arMa;
}());

View File

@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var arSa = {
code: 'ar-sa',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return arSa;
}());

View File

@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var arTn = {
code: 'ar-tn',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return arTn;
}());

View File

@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ar = {
code: 'ar',
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
};
return ar;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var az = {
code: 'az',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Əvvəl',
next: 'Sonra',
today: 'Bu Gün',
month: 'Ay',
week: 'Həftə',
day: 'Gün',
list: 'Gündəm',
},
weekText: 'Həftə',
allDayText: 'Bütün Gün',
moreLinkText: function(n) {
return '+ daha çox ' + n
},
noEventsText: 'Göstərmək üçün hadisə yoxdur',
};
return az;
}());

View File

@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var bg = {
code: 'bg',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'назад',
next: 'напред',
today: 'днес',
month: 'Месец',
week: 'Седмица',
day: 'Ден',
list: 'График',
},
allDayText: 'Цял ден',
moreLinkText: function(n) {
return '+още ' + n
},
noEventsText: 'Няма събития за показване',
};
return bg;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var bs = {
code: 'bs',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Prošli',
next: 'Sljedeći',
today: 'Danas',
month: 'Mjesec',
week: 'Sedmica',
day: 'Dan',
list: 'Raspored',
},
weekText: 'Sed',
allDayText: 'Cijeli dan',
moreLinkText: function(n) {
return '+ još ' + n
},
noEventsText: 'Nema događaja za prikazivanje',
};
return bs;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ca = {
code: 'ca',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Anterior',
next: 'Següent',
today: 'Avui',
month: 'Mes',
week: 'Setmana',
day: 'Dia',
list: 'Agenda',
},
weekText: 'Set',
allDayText: 'Tot el dia',
moreLinkText: 'més',
noEventsText: 'No hi ha esdeveniments per mostrar',
};
return ca;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var cs = {
code: 'cs',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Dříve',
next: 'Později',
today: 'Nyní',
month: 'Měsíc',
week: 'Týden',
day: 'Den',
list: 'Agenda',
},
weekText: 'Týd',
allDayText: 'Celý den',
moreLinkText: function(n) {
return '+další: ' + n
},
noEventsText: 'Žádné akce k zobrazení',
};
return cs;
}());

View File

@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var cy = {
code: 'cy',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Blaenorol',
next: 'Nesaf',
today: 'Heddiw',
year: 'Blwyddyn',
month: 'Mis',
week: 'Wythnos',
day: 'Dydd',
list: 'Rhestr',
},
weekText: 'Wythnos',
allDayText: 'Trwy\'r dydd',
moreLinkText: 'Mwy',
noEventsText: 'Dim digwyddiadau',
};
return cy;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var da = {
code: 'da',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Forrige',
next: 'Næste',
today: 'I dag',
month: 'Måned',
week: 'Uge',
day: 'Dag',
list: 'Agenda',
},
weekText: 'Uge',
allDayText: 'Hele dagen',
moreLinkText: 'flere',
noEventsText: 'Ingen arrangementer at vise',
};
return da;
}());

View File

@@ -0,0 +1,30 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var deAt = {
code: 'de-at',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Zurück',
next: 'Vor',
today: 'Heute',
year: 'Jahr',
month: 'Monat',
week: 'Woche',
day: 'Tag',
list: 'Terminübersicht',
},
weekText: 'KW',
allDayText: 'Ganztägig',
moreLinkText: function(n) {
return '+ weitere ' + n
},
noEventsText: 'Keine Ereignisse anzuzeigen',
};
return deAt;
}());

View File

@@ -0,0 +1,30 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var de = {
code: 'de',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Zurück',
next: 'Vor',
today: 'Heute',
year: 'Jahr',
month: 'Monat',
week: 'Woche',
day: 'Tag',
list: 'Terminübersicht',
},
weekText: 'KW',
allDayText: 'Ganztägig',
moreLinkText: function(n) {
return '+ weitere ' + n
},
noEventsText: 'Keine Ereignisse anzuzeigen',
};
return de;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var el = {
code: 'el',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4st is the first week of the year.
},
buttonText: {
prev: 'Προηγούμενος',
next: 'Επόμενος',
today: 'Σήμερα',
month: 'Μήνας',
week: 'Εβδομάδα',
day: 'Ημέρα',
list: 'Ατζέντα',
},
weekText: 'Εβδ',
allDayText: 'Ολοήμερο',
moreLinkText: 'περισσότερα',
noEventsText: 'Δεν υπάρχουν γεγονότα προς εμφάνιση',
};
return el;
}());

View File

@@ -0,0 +1,14 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var enAu = {
code: 'en-au',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
};
return enAu;
}());

View File

@@ -0,0 +1,14 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var enGb = {
code: 'en-gb',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
};
return enGb;
}());

View File

@@ -0,0 +1,14 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var enNz = {
code: 'en-nz',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
};
return enNz;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var eo = {
code: 'eo',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Antaŭa',
next: 'Sekva',
today: 'Hodiaŭ',
month: 'Monato',
week: 'Semajno',
day: 'Tago',
list: 'Tagordo',
},
weekText: 'Sm',
allDayText: 'Tuta tago',
moreLinkText: 'pli',
noEventsText: 'Neniuj eventoj por montri',
};
return eo;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var esUs = {
code: 'es',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Ant',
next: 'Sig',
today: 'Hoy',
month: 'Mes',
week: 'Semana',
day: 'Día',
list: 'Agenda',
},
weekText: 'Sm',
allDayText: 'Todo el día',
moreLinkText: 'más',
noEventsText: 'No hay eventos para mostrar',
};
return esUs;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var es = {
code: 'es',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Ant',
next: 'Sig',
today: 'Hoy',
month: 'Mes',
week: 'Semana',
day: 'Día',
list: 'Agenda',
},
weekText: 'Sm',
allDayText: 'Todo el día',
moreLinkText: 'más',
noEventsText: 'No hay eventos para mostrar',
};
return es;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var et = {
code: 'et',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Eelnev',
next: 'Järgnev',
today: 'Täna',
month: 'Kuu',
week: 'Nädal',
day: 'Päev',
list: 'Päevakord',
},
weekText: 'näd',
allDayText: 'Kogu päev',
moreLinkText: function(n) {
return '+ veel ' + n
},
noEventsText: 'Kuvamiseks puuduvad sündmused',
};
return et;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var eu = {
code: 'eu',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Aur',
next: 'Hur',
today: 'Gaur',
month: 'Hilabetea',
week: 'Astea',
day: 'Eguna',
list: 'Agenda',
},
weekText: 'As',
allDayText: 'Egun osoa',
moreLinkText: 'gehiago',
noEventsText: 'Ez dago ekitaldirik erakusteko',
};
return eu;
}());

View File

@@ -0,0 +1,30 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var fa = {
code: 'fa',
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: 'قبلی',
next: 'بعدی',
today: 'امروز',
month: 'ماه',
week: 'هفته',
day: 'روز',
list: 'برنامه',
},
weekText: 'هف',
allDayText: 'تمام روز',
moreLinkText: function(n) {
return 'بیش از ' + n
},
noEventsText: 'هیچ رویدادی به نمایش',
};
return fa;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var fi = {
code: 'fi',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Edellinen',
next: 'Seuraava',
today: 'Tänään',
month: 'Kuukausi',
week: 'Viikko',
day: 'Päivä',
list: 'Tapahtumat',
},
weekText: 'Vk',
allDayText: 'Koko päivä',
moreLinkText: 'lisää',
noEventsText: 'Ei näytettäviä tapahtumia',
};
return fi;
}());

View File

@@ -0,0 +1,24 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var frCa = {
code: 'fr',
buttonText: {
prev: 'Précédent',
next: 'Suivant',
today: "Aujourd'hui",
year: 'Année',
month: 'Mois',
week: 'Semaine',
day: 'Jour',
list: 'Mon planning',
},
weekText: 'Sem.',
allDayText: 'Toute la journée',
moreLinkText: 'en plus',
noEventsText: 'Aucun événement à afficher',
};
return frCa;
}());

View File

@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var frCh = {
code: 'fr-ch',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Précédent',
next: 'Suivant',
today: 'Courant',
year: 'Année',
month: 'Mois',
week: 'Semaine',
day: 'Jour',
list: 'Mon planning',
},
weekText: 'Sm',
allDayText: 'Toute la journée',
moreLinkText: 'en plus',
noEventsText: 'Aucun événement à afficher',
};
return frCh;
}());

View File

@@ -0,0 +1,28 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var fr = {
code: 'fr',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Précédent',
next: 'Suivant',
today: "Aujourd'hui",
year: 'Année',
month: 'Mois',
week: 'Semaine',
day: 'Jour',
list: 'Planning',
},
weekText: 'Sem.',
allDayText: 'Toute la journée',
moreLinkText: 'en plus',
noEventsText: 'Aucun événement à afficher',
};
return fr;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var gl = {
code: 'gl',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Ant',
next: 'Seg',
today: 'Hoxe',
month: 'Mes',
week: 'Semana',
day: 'Día',
list: 'Axenda',
},
weekText: 'Sm',
allDayText: 'Todo o día',
moreLinkText: 'máis',
noEventsText: 'Non hai eventos para amosar',
};
return gl;
}());

View File

@@ -0,0 +1,24 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var he = {
code: 'he',
direction: 'rtl',
buttonText: {
prev: 'הקודם',
next: 'הבא',
today: 'היום',
month: 'חודש',
week: 'שבוע',
day: 'יום',
list: 'סדר יום',
},
allDayText: 'כל היום',
moreLinkText: 'אחר',
noEventsText: 'אין אירועים להצגה',
weekText: 'שבוע',
};
return he;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var hi = {
code: 'hi',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'पिछला',
next: 'अगला',
today: 'आज',
month: 'महीना',
week: 'सप्ताह',
day: 'दिन',
list: 'कार्यसूची',
},
weekText: 'हफ्ता',
allDayText: 'सभी दिन',
moreLinkText: function(n) {
return '+अधिक ' + n
},
noEventsText: 'कोई घटनाओं को प्रदर्शित करने के लिए',
};
return hi;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var hr = {
code: 'hr',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Prijašnji',
next: 'Sljedeći',
today: 'Danas',
month: 'Mjesec',
week: 'Tjedan',
day: 'Dan',
list: 'Raspored',
},
weekText: 'Tje',
allDayText: 'Cijeli dan',
moreLinkText: function(n) {
return '+ još ' + n
},
noEventsText: 'Nema događaja za prikaz',
};
return hr;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var hu = {
code: 'hu',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'vissza',
next: 'előre',
today: 'ma',
month: 'Hónap',
week: 'Hét',
day: 'Nap',
list: 'Napló',
},
weekText: 'Hét',
allDayText: 'Egész nap',
moreLinkText: 'további',
noEventsText: 'Nincs megjeleníthető esemény',
};
return hu;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var hyAm = {
code: 'hy-am',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Նախորդ',
next: 'Հաջորդ',
today: 'Այսօր',
month: 'Ամիս',
week: 'Շաբաթ',
day: 'Օր',
list: 'Օրվա ցուցակ',
},
weekText: 'Շաբ',
allDayText: 'Ամբողջ օր',
moreLinkText: function(n) {
return '+ ևս ' + n
},
noEventsText: 'Բացակայում է իրադարձությունը ցուցադրելու',
};
return hyAm;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var id = {
code: 'id',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'mundur',
next: 'maju',
today: 'hari ini',
month: 'Bulan',
week: 'Minggu',
day: 'Hari',
list: 'Agenda',
},
weekText: 'Mg',
allDayText: 'Sehari penuh',
moreLinkText: 'lebih',
noEventsText: 'Tidak ada acara untuk ditampilkan',
};
return id;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var is = {
code: 'is',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Fyrri',
next: 'Næsti',
today: 'Í dag',
month: 'Mánuður',
week: 'Vika',
day: 'Dagur',
list: 'Dagskrá',
},
weekText: 'Vika',
allDayText: 'Allan daginn',
moreLinkText: 'meira',
noEventsText: 'Engir viðburðir til að sýna',
};
return is;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var it = {
code: 'it',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Prec',
next: 'Succ',
today: 'Oggi',
month: 'Mese',
week: 'Settimana',
day: 'Giorno',
list: 'Agenda',
},
weekText: 'Sm',
allDayText: 'Tutto il giorno',
moreLinkText: function(n) {
return '+altri ' + n
},
noEventsText: 'Non ci sono eventi da visualizzare',
};
return it;
}());

View File

@@ -0,0 +1,25 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ja = {
code: 'ja',
buttonText: {
prev: '前',
next: '次',
today: '今日',
month: '月',
week: '週',
day: '日',
list: '予定リスト',
},
weekText: '週',
allDayText: '終日',
moreLinkText: function(n) {
return '他 ' + n + ' 件'
},
noEventsText: '表示する予定はありません',
};
return ja;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ka = {
code: 'ka',
week: {
dow: 1,
doy: 7,
},
buttonText: {
prev: 'წინა',
next: 'შემდეგი',
today: 'დღეს',
month: 'თვე',
week: 'კვირა',
day: 'დღე',
list: 'დღის წესრიგი',
},
weekText: 'კვ',
allDayText: 'მთელი დღე',
moreLinkText: function(n) {
return '+ კიდევ ' + n
},
noEventsText: 'ღონისძიებები არ არის',
};
return ka;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var kk = {
code: 'kk',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Алдыңғы',
next: 'Келесі',
today: 'Бүгін',
month: 'Ай',
week: 'Апта',
day: 'Күн',
list: 'Күн тәртібі',
},
weekText: 'Не',
allDayText: 'Күні бойы',
moreLinkText: function(n) {
return '+ тағы ' + n
},
noEventsText: 'Көрсету үшін оқиғалар жоқ',
};
return kk;
}());

View File

@@ -0,0 +1,23 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ko = {
code: 'ko',
buttonText: {
prev: '이전달',
next: '다음달',
today: '오늘',
month: '월',
week: '주',
day: '일',
list: '일정목록',
},
weekText: '주',
allDayText: '종일',
moreLinkText: '개',
noEventsText: '일정이 없습니다',
};
return ko;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var lb = {
code: 'lb',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Zréck',
next: 'Weider',
today: 'Haut',
month: 'Mount',
week: 'Woch',
day: 'Dag',
list: 'Terminiwwersiicht',
},
weekText: 'W',
allDayText: 'Ganzen Dag',
moreLinkText: 'méi',
noEventsText: 'Nee Evenementer ze affichéieren',
};
return lb;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var lt = {
code: 'lt',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Atgal',
next: 'Pirmyn',
today: 'Šiandien',
month: 'Mėnuo',
week: 'Savaitė',
day: 'Diena',
list: 'Darbotvarkė',
},
weekText: 'SAV',
allDayText: 'Visą dieną',
moreLinkText: 'daugiau',
noEventsText: 'Nėra įvykių rodyti',
};
return lt;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var lv = {
code: 'lv',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Iepr.',
next: 'Nāk.',
today: 'Šodien',
month: 'Mēnesis',
week: 'Nedēļa',
day: 'Diena',
list: 'Dienas kārtība',
},
weekText: 'Ned.',
allDayText: 'Visu dienu',
moreLinkText: function(n) {
return '+vēl ' + n
},
noEventsText: 'Nav notikumu',
};
return lv;
}());

View File

@@ -0,0 +1,25 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var mk = {
code: 'mk',
buttonText: {
prev: 'претходно',
next: 'следно',
today: 'Денес',
month: 'Месец',
week: 'Недела',
day: 'Ден',
list: 'График',
},
weekText: 'Сед',
allDayText: 'Цел ден',
moreLinkText: function(n) {
return '+повеќе ' + n
},
noEventsText: 'Нема настани за прикажување',
};
return mk;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ms = {
code: 'ms',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Sebelum',
next: 'Selepas',
today: 'hari ini',
month: 'Bulan',
week: 'Minggu',
day: 'Hari',
list: 'Agenda',
},
weekText: 'Mg',
allDayText: 'Sepanjang hari',
moreLinkText: function(n) {
return 'masih ada ' + n + ' acara'
},
noEventsText: 'Tiada peristiwa untuk dipaparkan',
};
return ms;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var nb = {
code: 'nb',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Forrige',
next: 'Neste',
today: 'I dag',
month: 'Måned',
week: 'Uke',
day: 'Dag',
list: 'Agenda',
},
weekText: 'Uke',
allDayText: 'Hele dagen',
moreLinkText: 'til',
noEventsText: 'Ingen hendelser å vise',
};
return nb;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ne = {
code: 'ne', // code for nepal
week: {
dow: 7, // Sunday is the first day of the week.
doy: 1, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'अघिल्लो',
next: 'अर्को',
today: 'आज',
month: 'महिना',
week: 'हप्ता',
day: 'दिन',
list: 'सूची',
},
weekText: 'हप्ता',
allDayText: 'दिनभरि',
moreLinkText: 'थप लिंक',
noEventsText: 'देखाउनको लागि कुनै घटनाहरू छैनन्',
};
return ne;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var nl = {
code: 'nl',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Vorige',
next: 'Volgende',
today: 'Vandaag',
year: 'Jaar',
month: 'Maand',
week: 'Week',
day: 'Dag',
list: 'Agenda',
},
allDayText: 'Hele dag',
moreLinkText: 'extra',
noEventsText: 'Geen evenementen om te laten zien',
};
return nl;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var nn = {
code: 'nn',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Førre',
next: 'Neste',
today: 'I dag',
month: 'Månad',
week: 'Veke',
day: 'Dag',
list: 'Agenda',
},
weekText: 'Veke',
allDayText: 'Heile dagen',
moreLinkText: 'til',
noEventsText: 'Ingen hendelser å vise',
};
return nn;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var pl = {
code: 'pl',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Poprzedni',
next: 'Następny',
today: 'Dziś',
month: 'Miesiąc',
week: 'Tydzień',
day: 'Dzień',
list: 'Plan dnia',
},
weekText: 'Tydz',
allDayText: 'Cały dzień',
moreLinkText: 'więcej',
noEventsText: 'Brak wydarzeń do wyświetlenia',
};
return pl;
}());

View File

@@ -0,0 +1,25 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ptBr = {
code: 'pt-br',
buttonText: {
prev: 'Anterior',
next: 'Próximo',
today: 'Hoje',
month: 'Mês',
week: 'Semana',
day: 'Dia',
list: 'Lista',
},
weekText: 'Sm',
allDayText: 'dia inteiro',
moreLinkText: function(n) {
return 'mais +' + n
},
noEventsText: 'Não há eventos para mostrar',
};
return ptBr;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var pt = {
code: 'pt',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Anterior',
next: 'Seguinte',
today: 'Hoje',
month: 'Mês',
week: 'Semana',
day: 'Dia',
list: 'Agenda',
},
weekText: 'Sem',
allDayText: 'Todo o dia',
moreLinkText: 'mais',
noEventsText: 'Não há eventos para mostrar',
};
return pt;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ro = {
code: 'ro',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'precedentă',
next: 'următoare',
today: 'Azi',
month: 'Lună',
week: 'Săptămână',
day: 'Zi',
list: 'Agendă',
},
weekText: 'Săpt',
allDayText: 'Toată ziua',
moreLinkText: function(n) {
return '+alte ' + n
},
noEventsText: 'Nu există evenimente de afișat',
};
return ro;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ru = {
code: 'ru',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Пред',
next: 'След',
today: 'Сегодня',
month: 'Месяц',
week: 'Неделя',
day: 'День',
list: 'Повестка дня',
},
weekText: 'Нед',
allDayText: 'Весь день',
moreLinkText: function(n) {
return '+ ещё ' + n
},
noEventsText: 'Нет событий для отображения',
};
return ru;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var sk = {
code: 'sk',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Predchádzajúci',
next: 'Nasledujúci',
today: 'Dnes',
month: 'Mesiac',
week: 'Týždeň',
day: 'Deň',
list: 'Rozvrh',
},
weekText: 'Ty',
allDayText: 'Celý deň',
moreLinkText: function(n) {
return '+ďalšie: ' + n
},
noEventsText: 'Žiadne akcie na zobrazenie',
};
return sk;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var sl = {
code: 'sl',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Prejšnji',
next: 'Naslednji',
today: 'Trenutni',
month: 'Mesec',
week: 'Teden',
day: 'Dan',
list: 'Dnevni red',
},
weekText: 'Teden',
allDayText: 'Ves dan',
moreLinkText: 'več',
noEventsText: 'Ni dogodkov za prikaz',
};
return sl;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var sq = {
code: 'sq',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'mbrapa',
next: 'Përpara',
today: 'sot',
month: 'Muaj',
week: 'Javë',
day: 'Ditë',
list: 'Listë',
},
weekText: 'Ja',
allDayText: 'Gjithë ditën',
moreLinkText: function(n) {
return '+më tepër ' + n
},
noEventsText: 'Nuk ka evente për të shfaqur',
};
return sq;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var srCyrl = {
code: 'sr-cyrl',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Претходна',
next: 'следећи',
today: 'Данас',
month: 'Месец',
week: 'Недеља',
day: 'Дан',
list: 'Планер',
},
weekText: 'Сед',
allDayText: 'Цео дан',
moreLinkText: function(n) {
return '+ још ' + n
},
noEventsText: 'Нема догађаја за приказ',
};
return srCyrl;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var sr = {
code: 'sr',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Prethodna',
next: 'Sledeći',
today: 'Danas',
month: 'Mеsеc',
week: 'Nеdеlja',
day: 'Dan',
list: 'Planеr',
},
weekText: 'Sed',
allDayText: 'Cеo dan',
moreLinkText: function(n) {
return '+ još ' + n
},
noEventsText: 'Nеma događaja za prikaz',
};
return sr;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var sv = {
code: 'sv',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Förra',
next: 'Nästa',
today: 'Idag',
month: 'Månad',
week: 'Vecka',
day: 'Dag',
list: 'Program',
},
weekText: 'v.',
allDayText: 'Heldag',
moreLinkText: 'till',
noEventsText: 'Inga händelser att visa',
};
return sv;
}());

View File

@@ -0,0 +1,30 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var th = {
code: 'th',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'ก่อนหน้า',
next: 'ถัดไป',
prevYear: 'ปีก่อนหน้า',
nextYear: 'ปีถัดไป',
year: 'ปี',
today: 'วันนี้',
month: 'เดือน',
week: 'สัปดาห์',
day: 'วัน',
list: 'กำหนดการ',
},
weekText: 'สัปดาห์',
allDayText: 'ตลอดวัน',
moreLinkText: 'เพิ่มเติม',
noEventsText: 'ไม่มีกิจกรรมที่จะแสดง',
};
return th;
}());

View File

@@ -0,0 +1,27 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var tr = {
code: 'tr',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'geri',
next: 'ileri',
today: 'bugün',
month: 'Ay',
week: 'Hafta',
day: 'Gün',
list: 'Ajanda',
},
weekText: 'Hf',
allDayText: 'Tüm gün',
moreLinkText: 'daha fazla',
noEventsText: 'Gösterilecek etkinlik yok',
};
return tr;
}());

View File

@@ -0,0 +1,17 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var ug = {
code: 'ug',
buttonText: {
month: 'ئاي',
week: 'ھەپتە',
day: 'كۈن',
list: 'كۈنتەرتىپ',
},
allDayText: 'پۈتۈن كۈن',
};
return ug;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var uk = {
code: 'uk',
week: {
dow: 1, // Monday is the first day of the week.
doy: 7, // The week that contains Jan 1st is the first week of the year.
},
buttonText: {
prev: 'Попередній',
next: 'далі',
today: 'Сьогодні',
month: 'Місяць',
week: 'Тиждень',
day: 'День',
list: 'Порядок денний',
},
weekText: 'Тиж',
allDayText: 'Увесь день',
moreLinkText: function(n) {
return '+ще ' + n + '...'
},
noEventsText: 'Немає подій для відображення',
};
return uk;
}());

View File

@@ -0,0 +1,21 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var uz = {
code: 'uz',
buttonText: {
month: 'Oy',
week: 'Xafta',
day: 'Kun',
list: 'Kun tartibi',
},
allDayText: "Kun bo'yi",
moreLinkText: function(n) {
return '+ yana ' + n
},
noEventsText: "Ko'rsatish uchun voqealar yo'q",
};
return uz;
}());

View File

@@ -0,0 +1,29 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var vi = {
code: 'vi',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Trước',
next: 'Tiếp',
today: 'Hôm nay',
month: 'Tháng',
week: 'Tuần',
day: 'Ngày',
list: 'Lịch biểu',
},
weekText: 'Tu',
allDayText: 'Cả ngày',
moreLinkText: function(n) {
return '+ thêm ' + n
},
noEventsText: 'Không có sự kiện để hiển thị',
};
return vi;
}());

View File

@@ -0,0 +1,30 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var zhCn = {
code: 'zh-cn',
week: {
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: '上月',
next: '下月',
today: '今天',
month: '月',
week: '周',
day: '日',
list: '日程',
},
weekText: '周',
allDayText: '全天',
moreLinkText: function(n) {
return '另外 ' + n + ' 个'
},
noEventsText: '没有事件显示',
};
return zhCn;
}());

View File

@@ -0,0 +1,23 @@
FullCalendar.globalLocales.push(function () {
'use strict';
var zhTw = {
code: 'zh-tw',
buttonText: {
prev: '上月',
next: '下月',
today: '今天',
month: '月',
week: '週',
day: '天',
list: '活動列表',
},
weekText: '周',
allDayText: '整天',
moreLinkText: '顯示更多',
noEventsText: '没有任何活動',
};
return zhTw;
}());

Some files were not shown because too many files have changed in this diff Show More