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 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
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
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 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
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 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 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 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 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
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 Walters
a35c4a5a95
Rename tabs for build order
2020-11-05 20:07:23 +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
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 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
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 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