Commit Graph

14340 Commits

Author SHA1 Message Date
Oliver
3001471706
README Updates (#5084)
* Update funding.yml

* Cleanup README.md

* More cleanup
2023-06-21 22:30:30 +10:00
Oliver
7f5e844367
Fix for loadPartTable (#5082)
- Recent changes introduced a bug related to filters
- Only really visible on index page
2023-06-21 16:42:10 +10:00
Oliver
66ec82d4d1
Add migration test workflow (#4973)
* Add migration test workflow

* Adds dummy migration

- For testing only
- Will be removed

* Improvements to workflow

* Update workflow

* Use manual git step

* Don't install twice

* Let's try again

* Does v3 work?

* Try https repo

* Fix repo address

* Once more with feeling

* Fix location of test database

* Revert change to wrong file

* Fix DB location

* Hard-code database path

* debugging

* More updates grrr

* Adjust permissions on database file

* Manual git operation

* Updates for migration test workflow

* Fix database names

* Remove dummy migration file

* Fix filters

* Fix path filter

* Explicit pathing

* Fix formatting error

* Another formatting error
2023-06-20 22:37:30 +10:00
Oliver
e2800b19ef
New Crowdin updates (#5061)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-20 22:27:16 +10:00
Oliver
303305e05f
Fix constraint for address model (#5076)
* Fix constraint for address model

- Do not handle at database level
- Add a "validate_unique" method to the address model
- Fixes https://github.com/inventree/InvenTree/issues/5070

* Remove unique constraint rule

* Unit test fix

- Adjust unit test around new code

* Further unit test updates
2023-06-20 16:57:20 +10:00
Matthias Mair
b700b44c53
Add dj-rest-auth (#4187)
* Add dj-rest-auth
[FR] User registration via API
Fixes #3978

* add jwt support for API

* check for old password

* Add check if registration is allowed

* make email mandatory if selected

* lower postgres version?

* update req

* revert psql change

* move form options out

* Update reqs

* Add handlers for most OAuth2

* refactor and add logging

* make error message more actionable

* add handler for twitter

* add keycloak endpoint

* warning for legacy apps

* remove legacy twitter support

* rename file

* move url to sub

* make JWT optional (default off)

* Add var to config template

* Add API endpoint to list available providers

* fix url pattern
2023-06-20 16:26:02 +10:00
Oliver
09cc654530
Required for order fix (#5077)
* Fix part tables on index page

- Stop table filters overriding each other

* Refactor "needed for build" table

- Now shows amount actually needed

* Fix typo

* js fix

* linting

* Fix warning messages on index page

* js linting
2023-06-20 12:39:18 +10:00
Oliver
4c9d4add2c
Table custom buttons (#5075)
* Add generic implementation for barcode actions

- Commonize code against tables
- Cleaner UI
- Better code
- Will make future react refactor easier

* Add permissions.js

- Separate .js file for dynamically checking permissions

* Update stock table to use client-side actions

* API endpoint for bulk category adjustment

* Bug fix for purchase_order.js

- Prevent some really strange API calls

* Refactor actions for part table

- Now done dynamically

* Refactor actions for the attachment tables

* Refactor actions for build output table

* Increment API version

* Cleanup janky button

* Refactor supplier part table

* Refactor manufacturer part table

* Remove linkButtonsToSelection

- no longer needed
- Cleanup, yay!

* Cleanup purchase order line table

* Refactor BOM table buttons

* JS linting

* Further cleanup

* Template cleanup

- remove extra div elements

* js linting

* js fix
2023-06-20 07:45:35 +10:00
Lavissa
13389845b1
Add Contacts to admin panel (#5065)
* Contact model added to admin panel
2023-06-19 22:42:02 +10:00
Oliver
021a5a4081
Fixes for purchase order receive buttons (#5072) 2023-06-19 20:01:00 +10:00
Matthias Mair
617ad6c233
decouble ruleset migration (#5067) 2023-06-19 16:56:26 +10:00
Oliver
2e8fb2a14a
Stock status change API (#5064)
* Add API endpoint for changing stock item status

- Change status for multiple items simultaneously
- Reduce number of database queries required

* Perform bulk update in serializer

* Update 'updated' field

* Add front-end code

* Bump API version

* Bug fix and unit test
2023-06-18 07:40:47 +10:00
Oliver
f6420f98c2
Simplify release notes docs (#5063) 2023-06-17 21:56:26 +10:00
Lavissa
bf707766b6
[Feature] Company Addresses (#4732)
* Add initial model structure

* Initial Address model defined

* Add migration and unit tests

* Initial migration for Address model generated

* Unit tests for Address model added

* Move address field to new model

* Added migration to move address field to Address model

* Implement address feature to backend

* API endpoints for list and detail implemented

* Serializer class for Address implemented

* Final migration to delete old address field from company added

* Tests for API and migrations added

* Amend migration file names

* Fix migration names in test

* Add address property to company model

* Iinital view and JS code

* Fix indents

* Fix different things

* Pre-emptive change before merge

* Post-merge fixes

* dotdotdot...

* ...

* iDots

* .

* .

* .

* Add form functionality and model checks

* Forms require a confirmation slider to be checked to submit
  if address is selected as primary

* Backend resets primary address before saving if new address
  is designated as primary

* Fix pre-save logic to enforce primary uniqueness

* Fix typos

* Sort out migrations

* Forgot one

* Add admin entry and small fixes

* Fix migration file name and dependency

* Update InvenTree/company/models.py

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

* Update InvenTree/company/models.py

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

* Correct final issues

* .

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2023-06-17 21:55:25 +10:00
Oliver
61d2f452b2
Homepage Improvements (#5057)
* remove STOCK_RECENT_COUNT parameter

- Now "recent" is set by date
- Tables are paginated by the server

* Display total row count

* remove PART_RECENT_COUNT

- Replace with date filter
- Update Part.api

* Bump API version
2023-06-17 08:21:25 +10:00
Oliver
31ff3599eb
Parameter by name (#5055)
* Add method get_parameter

- Return a parameter for a part, on name

* Add unit test for new method

* Adds template tag to retrieve parameter based on name

* Update docs
2023-06-16 12:14:17 +10:00
Oliver
51cece9e07
custom panel fix (#5049)
- Handle case where get_custom_panels returns None
2023-06-15 18:59:50 +10:00
Oliver
62faaf01c5
Stock installed items (#5030)
* Cleanup

* Add "installed_items" count to StockItem serializer

- Add queryset annotation
- Add API filter for list endpoint

* js code

* More js updates

* Load installed items on demand

* Make option configurable
2023-06-15 16:42:52 +10:00
Matthias Mair
013d206b91
Add metadata to plugin configs (#5019)
* add metadata to plugin

* Api version bump

* exclude metadata from admin to fix test
2023-06-15 16:17:05 +10:00
Matthias Mair
2322a98068
replace assertation with more targeted logging check (#5045) 2023-06-15 07:34:00 +10:00
Oliver
be6ab14c9b
Improve StockItem API speed (#5042)
- Removes child detail fields which cannot be effectively annotated
- Prefetch required fields
- Add unit test method for checking query count
2023-06-14 18:33:49 +10:00
Oliver
8d16abcefb
Build line labels (#5034)
* Adds BuildLineLabel model

- New type of label for printing against BuildLine objects

* Add serializer for new model

* Add API endpoints for new label type

* Add hooks to BuildLine table

* Create default label

- Create an example BuildLineLabel object

* Add admin integration

* Fix js code

* Use two-tiered template

- Allows base template to be updated

* Improve default label

* Add docs pages for labels

* Update nav

* Documentation for new label

* Add permission role

* Bump API version
2023-06-14 13:07:18 +10:00
Oliver
a3940cfc41
Improve error logging (#5039)
- Truncate path to < 200 chars
- Prevents exception when creating new Error object
2023-06-14 13:07:05 +10:00
Oliver
00bb740216
Add ProjectCode support to build orders (#4808)
* Add "project_code" field to Build model

* Add "project_code" field to Build model

* build javascript updates

(cherry picked from commit 3e27a3b739)

* Update table filters

(cherry picked from commit 196c675585)

* Adds API filtering

* Bump API version

* Hide project code field from build form if project codes not enabled

(cherry picked from commit 4e210e3dfa)

* refactoring to attempt to fix circular imports

* Upgrade django-test-migrations package

* Fix broken import

* Further fixes for unit tests

* Update unit tests for migration files

* Fix typo in build.js

* Migration test updates

- Need to specify MPTT stuff

* Fix build.js

* Fix migration order

* Update API version
2023-06-14 11:23:35 +10:00
Oliver
c8365ccd0c
Update app docs (#5032) 2023-06-13 21:04:17 +10:00
Oliver
6ba777d363
Build Order Updates (#4855)
* Add new BuildLine model

- Represents an instance of a BOM item against a BuildOrder

* Create BuildLine instances automatically

When a new Build is created, automatically generate new BuildLine items

* Improve logic for handling exchange rate backends

* logic fixes

* Adds API endpoints

Add list and detail API endpoints for new BuildLine model

* update users/models.py

- Add new model to roles definition

* bulk-create on auto_allocate

Save database hits by performing a bulk-create

* Add skeleton data migration

* Create BuildLines for existing orders

* Working on building out BuildLine table

* Adds link for "BuildLine" to "BuildItem"

- A "BuildItem" will now be tracked against a BuildLine
- Not tracked directly against a build
- Not tracked directly against a BomItem
- Add schema migration
- Add data migration to update links

* Adjust migration 0045

- bom_item and build fields are about to be removed
- Set them to "nullable" so the data doesn't get removed

* Remove old fields from BuildItem model

- build fk
- bom_item fk
- A lot of other required changes too

* Update BuildLine.bom_item field

- Delete the BuildLine if the BomItem is removed
- This is closer to current behaviour

* Cleanup for Build model

- tracked_bom_items -> tracked_line_items
- untracked_bom_items -> tracked_bom_items
- remove build.can_complete
- move bom_item specific methods to the BuildLine model
- Cleanup / consolidation

* front-end work

- Update javascript
- Cleanup HTML templates

* Add serializer annotation and filtering

- Annotate 'allocated' quantity
- Filter by allocated / trackable / optional / consumable

* Make table sortable

* Add buttons

* Add callback for building new stock

* Fix Part annotation

* Adds callback to order parts

* Allocation works again

* template cleanup

* Fix allocate / unallocate actions

- Also turns out "unallocate" is not a word..

* auto-allocate works again

* Fix call to build.is_over_allocated

* Refactoring updates

* Bump API version

* Cleaner implementation of allocation sub-table

* Fix rendering in build output table

* Improvements to StockItem list API

- Refactor very old code
- Add option to include test results to queryset

* Add TODO for later me

* Fix for serializers.py

* Working on cleaner implementation of build output table

* Add function to determine if a single output is fully allocated

* Updates to build.js

- Button callbacks
- Table rendering

* Revert previous changes to build.serializers.py

* Fix for forms.js

* Rearrange code in build.js

* Rebuild "allocated lines" for output table

* Fix allocation calculation

* Show or hide column for tracked parts

* Improve debug messages

* Refactor "loadBuildLineTable"

- Allow it to also be used as output sub-table

* Refactor "completed tests" column

* Remove old javascript

- Cleans up a *lot* of crusty old code

* Annotate the available stock quantity to BuildLine serializer

- Similar pattern to BomItem serializer
- Needs refactoring in the future

* Update available column

* Fix build allocation table

- Bug fix
- Make pretty

* linting fixes

* Allow sorting by available stock

* Tweak for "required tests" column

* Bug fix for completing a build output

* Fix for consumable stock

* Fix for trim_allocated_stock

* Fix for creating new build

* Migration fix

- Ensure initial django_q migrations are applied
- Why on earth is this failing now?

* Catch exception

* Update for exception handling

* Update migrations

- Ensure inventreesetting is added

* Catch all exceptions when getting default currency code

* Bug fix for currency exchange rates update

* Working on unit tests

* Unit test fixes

* More work on unit tests

* Use bulk_create in unit test

* Update required quantity when a BuildOrder is saved

* Tweak overage display in BOM table

* Fix icon in BOM table

* Fix spelling error

* More unit test fixes

* Build reports

- Add line_items
- Update docs
- Cleanup

* Reimplement is_partially_allocated method

* Update docs about overage

* Unit testing for data migration

* Add "required_for_build_orders" annotation

- Makes API query *much* faster now
- remove old "required_parts_to_complete_build" method
- Cleanup part API filter code

* Adjust order of fixture loading

* Fix unit test

* Prevent "schedule_pricing_update" in unit tests

- Should cut down on DB hits significantly

* Unit test updates

* Improvements for unit test

- Don't hard-code pk values
- postgresql no likey

* Better unit test
2023-06-13 20:18:32 +10:00
Oliver
98bddd32d0
Skip pricing updates when importing data (#5026)
* Skip pricing updates when importing data

- Depending on migration state, pricing table might not exist
- post-save hooks can call update_pricing
- So, ignore if running data migration or import

* Typo fix
2023-06-13 12:40:21 +10:00
Oliver
9117c2234b
Migration fixes (#5025)
* Catch exception on is_worker_running

- Exception may occur if table is not yet available
- If it *does* then we can assume the worker is no running

* General error catch in offload_task

* Pick an earlier migration to run from?

* Update initial common migration

- Handle error on table duplication

* Change target migration file

- Ensure that part MPTT migrations have been applied!

* Fix migration ref

- Need 0025
- Price field needs to be available
2023-06-13 07:34:56 +10:00
Oliver
89ad8312ce
Fix migration order (#5027)
- Ensure stock.0094 runs before company.0059
- Ref https://github.com/inventree/InvenTree/pull/4984
- Ideally addresses historical migration issues
2023-06-13 07:34:41 +10:00
Oliver
8ca02cb105
Catch exception (#5008)
* Catch exception

* Update settings.py

Don't print out exception message, just log error

* Update settings.py

Style fixes

* Update settings.py

Remove error message

* Update settings.py

Remove logger
2023-06-12 21:03:08 +10:00
Matthias Mair
2f98ed7022
remove signatur checking (we do not use included git anymore) (#5018) 2023-06-12 20:10:13 +10:00
Matthias Mair
9f56ee1023
[FR] Add Feature flags (#4982)
* make currency choices independend

* Remove check for field, just try to get rid of it

* Add IF EXISTS to avoid error (works in postgres)

* Look for operational error, not programming error

* Use variants, depending on errors caused

* [FR] Add Feature flags
Fixes #4965

* Add option to define custom flags

* Revert "make currency choices independend"

This reverts commit ab84a7ff83.

* try fixing mysql

* more safeguards

* fix executioner call

* a fck

* use migrations. syntax

* and another round for mysql

* revert print change

* use UTC for datetime

* Update part.migrations.0112

- Add custom migration class which handles errors

* Add unit test for migration

- Ensure that the new fields are added to the model

* Update reference to PR

* fix ruleset for missing_models

* fix ruleset for flags_flagstate

* add API endpoints for flags

* add tests for new API endpoints

* fix tests

* fix merge

* fix tests

---------

Co-authored-by: martin <martin@iggland.com>
Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
2023-06-12 13:13:53 +10:00
Matthias Mair
15ab911da6
Add more version information (#5014)
* Add info for installer, branch, publisher

* include version info

* fix permissions

* fix typo

* add more info

* use GH url

* fix node

* remove publisher

* remove more logging

* Add info to version view

* enable branch discovery when not set

* fix ref to github version

* add branch to about dialog

* use precise plattform information - if no env is set

* fix ref names

* load VERSION info

* rename plattform to target

* extend installer var

* add generic plattform info

* add docs for version info

* add more info

* add installer codes

* Ammend navigation
2023-06-12 00:32:03 +10:00
Matthias Mair
f3a13fc625
Add SBOM to container (#5017)
* Add sbom to docker

* Enable manual release

* remove dispatch
2023-06-11 23:37:03 +10:00
Oliver
aebff26ad3
New Crowdin updates (#4976)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-10 19:56:44 +10:00
Matthias Mair
d710efb64b
remove concurrency checks (#5002)
Fixes https://github.com/inventree/InvenTree/issues/4999
2023-06-09 10:30:03 +10:00
Matthias Mair
5d1d8ec889
Refactor states/status (#4857)
* add file for states

* move general definition out

* add some tests and docs

* add tests for invalid definitions

* make status_label tag generic

* move templatetags

* remove unused tag

* rename test file

* make status label a lookup

* rename tags

* move import structure

* add missing tag

* collect states dynamically

* fix context function

* move api function out

* add tests for tags

* rename tests

* refactor imports

* Add test for API function

* improve errors and add tests for imporved errors

* make test calls simpler

* refactor definitions to use enums

* switch to enum

* refactor definitions to use enums

* fix lookup

* fix tag name

* make _TAG lookup a function

* cleanup BaseEnum

* make _TAG definition simpler

* restructure status codes to enum

* reduce LoC

* type status codes as int

* add specific function for template context

* Add definition for lookups

* fix filter lookup

* TEST: "fix" action lookup

* Add missing migrations

* Make all group code references explict

* change default on models to value

* switch to IntEnum

* move groups into a seperate class

* only request _TAG if it exsists

* use value and list

* use dedicated groups

* fix stock assigment

* fix order code

* more fixes

* fix borked change

* fix render lookup

* add group

* fix import

* fix syntax

* clenup

* fix migrations

* fix typo

* fix wrong value usage

* fix test

* remove group section

* remove group section

* add more test cases

* Add more docstring

* move choices out of migrations

* change import ordeR?

* last try before I revert

* Update part.migrations.0112

- Add custom migration class which handles errors

* Add unit test for migration

- Ensure that the new fields are added to the model

* Update reference to PR

---------

Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
2023-06-09 10:27:26 +10:00
Matthias Mair
005c8341bf
Improve devdocs (#4813)
* move devcontainer docs

* rename bare metal pages

* fix backlinks

* Add getting started for devs

* add mermaid

* include contrib in docs

* use another plugin

* include everything

* update doc checks

* fix install command

* remove mermaid

* remove inclusion tag

* remove empty list item

* readd include-markdown

* use non-conflicting syntax for include

* fix table rendering in mkdocs

* make controbuting embedable

* re-add mermaid

* remove empty section

* resturcture

* remove mermaid again
2023-06-09 10:16:30 +10:00
Oliver
280f6241dd
Migration fix (#5006)
- Ensure initial django_q migrations are applied
- Why on earth is this failing now?
2023-06-09 10:09:02 +10:00
Oliver
f1031efa93
CSS fix for 2FA token (#5000)
- Enforce white background for the QR code
2023-06-09 01:09:12 +10:00
Matthias Mair
e807339c55
respect timezone when handeling git commit times (#4997) 2023-06-08 22:00:54 +10:00
Oliver
bae1c239e8
Fix for forms.js (#4996)
- Fixes subtle bug introduced in recent javascript linting fix
- Prevented error messages from displaying on modal forms
- The whole thing needs to be razed and rebuilt
2023-06-08 21:30:10 +10:00
Oliver
842d7a93d5
Fix for faulty data migrations (#4987)
* Update part.migrations.0112

- Add custom migration class which handles errors

* Add unit test for migration

- Ensure that the new fields are added to the model

* Update reference to PR
2023-06-08 21:12:57 +10:00
Matt Brown
a4b4df5ff4
Place uninstalled items back in stock (#4994)
reset the consumed_by field as well as belongs_to, so an uninstalled
item can be reused.

Fixes: #4992
2023-06-08 20:22:50 +10:00
Oliver
81413e02c4
Update CONTRIBUTING.md (#4988)
Add notes about "migration" tag
2023-06-07 22:15:59 +10:00
Matthias Mair
d7d3d8aa26
Currency migrations - stop migrations when defaults change (#4975)
* make currency choices independend

* replace hard coded default currency

* use function for psql?

* use callable default

* revert some fields

* also migrat all currency codes
2023-06-07 20:05:37 +10:00
Oliver
192c1ecb21
Add note on SSO behind proxy (#4985) 2023-06-07 11:55:02 +10:00
Oliver
a3150d9cb3
Refactor label API code (#4978)
* Refactor label API code

- Add common base class for serializers

* More import cleanup
2023-06-06 18:49:19 +10:00
Oliver
f65281c801
Migration bug fix 2 (#4977)
* Additional migration fix:

- In #4961 we did not notice that the migration files had been renamed
- There is still a chance that a production db (running from master) has a corrupted set of migrations
- Check if the duplicate columns already exist
- If they do, delete them first

* Typo fix

* Add PR reference
2023-06-06 15:45:24 +10:00
Oliver
ba24ff570a
SSO bug fix (#4972)
* Catch SSO error

- If social application is not assigned to at least one site, errors happen
- Check if at least one site is enabled

* Docs updates

* Typo fix
2023-06-05 21:03:16 +10:00