2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 20:45:44 +00:00
Commit Graph

91 Commits

Author SHA1 Message Date
73445b4b79 Add confirmation for "over-allocated" stock when completing BuildOrder (#3272) 2022-06-29 14:59:55 +10:00
a066fcc909 Add new global setting to control auto-upload of test reports (#3137)
* Add new global setting to control auto-upload of test reports

* Adds callback to attach a copy of the test report when printing

* Fix for all attachment API endpoints

- The AttachmentMixin must come first!
- User was not being set, as the custom 'perform_create' function was never called

* Remove duplicated UserSerializer

* display uploading user in attachment table

* Add unit test to check the test report is automatically uploaded
2022-06-06 15:20:41 +10:00
0c97a50e47 Docstring checks in QC checks (#3089)
* Add pre-commit to the stack

* exclude static

* Add locales to excludes

* fix style errors

* rename pipeline steps

* also wait on precommit

* make template matching simpler

* Use the same code for python setup everywhere

* use step and cache for python setup

* move regular settings up into general envs

* just use full update

* Use invoke instead of static references

* make setup actions more similar

* use python3

* refactor names to be similar

* fix runner version

* fix references

* remove incidential change

* use matrix for os

* Github can't do this right now

* ignore docstyle errors

* Add seperate docstring test

* update flake call

* do not fail on docstring

* refactor setup into workflow

* update reference

* switch to action

* resturcture

* add bash statements

* remove os from cache

* update input checks

* make code cleaner

* fix boolean

* no relative paths

* install wheel by python

* switch to install

* revert back to simple wheel

* refactor import export tests

* move setup keys back to not disturbe tests

* remove docstyle till that is fixed

* update references

* continue on error

* add docstring test

* use relativ action references

* Change step / job docstrings

* update to merge

* reformat comments 1

* fix docstrings 2

* fix docstrings 3

* fix docstrings 4

* fix docstrings 5

* fix docstrings 6

* fix docstrings 7

* fix docstrings 8

* fix docstirns 9

* fix docstrings 10

* docstring adjustments

* update the remaining docstrings

* small docstring changes

* fix function name

* update support files for docstrings

* Add missing args to docstrings

* Remove outdated function

* Add docstrings for the 'build' app

* Make API code cleaner

* add more docstrings for plugin app

* Remove dead code for plugin settings
No idea what that was even intended for

* ignore __init__ files for docstrings

* More docstrings

* Update docstrings for the 'part' directory

* Fixes for related_part functionality

* Fix removed stuff from merge 99676ee

* make more consistent

* Show statistics for docstrings

* add more docstrings

* move specific register statements to make them clearer to understant

* More docstrings for common

* and more docstrings

* and more

* simpler call

* docstrings for notifications

* docstrings for common/tests

* Add docs for common/models

* Revert "move specific register statements to make them clearer to understant"

This reverts commit ca96654622.

* use typing here

* Revert "Make API code cleaner"

This reverts commit 24fb68bd3e.

* docstring updates for the 'users' app

* Add generic Meta info to simple Meta classes

* remove unneeded unique_together statements

* More simple metas

* Remove unnecessary format specifier

* Remove extra json format specifiers

* Add docstrings for the 'plugin' app

* Docstrings for the 'label' app

* Add missing docstrings for the 'report' app

* Fix build test regression

* Fix top-level files

* docstrings for InvenTree/InvenTree

* reduce unneeded code

* add docstrings

* and more docstrings

* more docstrings

* more docstrings for stock

* more docstrings

* docstrings for order/views

* Docstrings for various files in the 'order' app

* Docstrings for order/test_api.py

* Docstrings for order/serializers.py

* Docstrings for order/admin.py

* More docstrings for the order app

* Add docstrings for the 'company' app

* Add unit tests for rebuilding the reference fields

* Prune out some more dead code

* remove more dead code

Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
2022-06-02 01:37:39 +10:00
5a0acedce6 Add unit tests for BuildOutputCreate serializer 2022-05-17 13:00:53 +10:00
ecccfbd546 Remove encoding header
Fixes #2996
2022-05-15 20:33:00 +02:00
bd3d6f47a1 Refactor CancelBuild form 2022-05-04 16:30:46 +10:00
75e24635b5 Fix speling errors in translated strings 2022-05-04 09:17:42 +10:00
de6507e918 update translation commands 2022-05-01 22:03:49 +02:00
6b4592b3dc Display error if stock item is "double allocted" 2022-04-29 01:10:05 +10:00
f531e354b9 Allow completion of partially allocated build outputs
- Requires manual acceptance from user
2022-04-28 21:54:38 +10:00
4191a043b2 Add "exclude_location" to build order auto-allocation 2022-03-09 14:57:57 +11:00
0bb0047fcd Add unit tests for the auto_allocate_stock method 2022-03-04 16:27:50 +11:00
434f563a41 Adds API endpoint for "auto allocating" stock items against a build order.
- If stock exists in multiple locations, and the user "does not care" where to take from, simply iterate through and take
2022-03-04 15:26:00 +11:00
ab82f07ef1 Bug fix for BuildOutputComplete serializer
- Actually use the provided "location" value!
2022-02-25 15:41:10 +11:00
44008f33e2 Refactoring Build model functions
- Determining if a build order is correctly allocated has become more complex
- Complex BOM behaviours (e.g. variants, templates, and substitutes) have made it more difficult!
- Recently, a reference to the defining BomItem object was added to the BuildItem model
- Now, a simpler way is to check allocation against the parent BomItem
- It is much better, but means that a lot of refactoring and testing will be required!
2022-02-25 15:40:49 +11:00
7be832cc9b [BUG] Unable to create build output
Fix if no allocate set
Fixes #2663
2022-02-23 02:01:46 +01:00
bc6839d56e Spelling fix 2022-02-17 08:18:15 +11:00
2b344f1f25 PEP style fixes 2022-02-15 13:30:14 +11:00
07af0902a3 Optionally auto-allocate stock items when creating a new build output 2022-02-15 13:27:14 +11:00
24c13b04b6 Extract serial numbers from submitted form data 2022-02-15 13:19:41 +11:00
f90a27d01d Adds a new API endpoint for creating build outputs 2022-02-15 12:51:48 +11:00
71f9399760 Cleanup 2022-02-10 00:50:21 +11:00
0d7b94fbfa Remove old form code which is no longer used 2022-02-10 00:48:06 +11:00
96af074365 Adds API endpoint to delete build outputs 2022-02-10 00:46:38 +11:00
00d7cf88e8 Throw validation error if no build outputs have been started 2022-02-01 15:58:18 +11:00
6aa83796ea PEP fixes 2022-01-09 22:15:59 +11:00
da9fa1313c Increased unit testing 2022-01-09 22:14:48 +11:00
3e2e9aaf9e Mark serializer fields as not required 2022-01-09 20:10:00 +11:00
12b3a5c9cc Validate and save the new serailizer 2022-01-07 11:33:27 +11:00
960784644f Adds skeleton for new API endpoint for completing a build order 2022-01-07 10:50:29 +11:00
d573668f81 Correctly allow "inherited" BOM items to be allocated to a build order
- Some back-end logic was not running correctly
2021-12-11 01:05:19 +11:00
93173ef1ee Merge remote-tracking branch 'inventree/master' into partial-shipment
# Conflicts:
#	InvenTree/order/serializers.py
2021-12-02 23:58:52 +11:00
dc65634abc use mixin on all serializers whos models use ReferenceIndexingMixin 2021-12-01 23:36:21 +01:00
da6c723184 Merge branch 'master' into partial-shipment
# Conflicts:
#	InvenTree/order/serializers.py
2021-11-29 22:59:36 +11:00
32be39774f PEP fixes 2021-11-28 22:36:47 +11:00
0949bac175 serializer fixes 2021-11-28 14:21:09 +11:00
6582fd3d04 Add 'link' field to attachment serializer 2021-11-28 12:57:37 +11:00
68e2b0850b Merge branch 'master' into partial-shipment
# Conflicts:
#	InvenTree/build/serializers.py
#	InvenTree/order/templates/order/so_sidebar.html
2021-11-26 08:25:51 +11:00
d884e62be1 [FR] Confirm to W293
Fixes #2335
2021-11-23 00:28:23 +01:00
521ec4f1e6 Merge branch 'master' into partial-shipment
# Conflicts:
#	InvenTree/order/serializers.py
2021-11-18 23:43:36 +11:00
7ca36a092e convert remaining serializers 2021-11-18 23:01:19 +11:00
bff9f0828a Adds API endpoint to allocate stock items against a SalesOrder
- SalesOrderAllocations are no longer created manually
- API endpoint performs data validation
- Multiple line items can be allocated at once
- Adds unit testing for new API endpoint
2021-10-26 23:51:36 +11:00
50a79770e5 Un-comment lines in build.serializers 2021-10-20 23:37:26 +11:00
f83dc134ef linting 2021-10-20 23:20:43 +11:00
8805b0a553 Add similar auto field capabilities to build order 2021-10-20 23:14:52 +11:00
542b4113a1 Improvements for build output completion
- Check if the output is fully allocated (throw error if not)
- Reload tables after actions performed
2021-10-17 21:37:10 +11:00
54dd05a24d Add an API serializer to complete build outputs 2021-10-14 23:13:01 +11:00
7dfffcd5d3 Move "build unallocate" functionality to the API
- Much much simpler now!
- Filtering is against bom_item, not part
- Fixes a bug with the new (reasonably complex) substitution framework
2021-10-14 10:32:43 +11:00
ddcfc8996c Further fixes for API / serializer classes
- Correctly catch and re-throw errors
- Provide request to serializer context
2021-10-05 12:12:37 +11:00
dd4db6442e PEP fixes 2021-10-05 00:45:49 +11:00