Commit Graph

3210 Commits

Author SHA1 Message Date
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 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 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 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 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 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
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 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 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
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 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 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 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 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 Walters
647e2cf64d Change text for barcode 2020-10-19 16:06:18 +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
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 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
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 Walters
3d60bccae0 Add support for setting timezone in config.yaml 2020-10-08 21:02:38 +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
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 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 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
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