Commit Graph

571 Commits

Author SHA1 Message Date
Oliver Walters
79f8736b6b Add note on creation of StockItem 2019-04-25 22:10:46 +10:00
Oliver Walters
533fdb71c4 Javascript function to render stock tracking table
- Added extra info to StockItemTracking serializer
2019-04-25 22:04:32 +10:00
Oliver Walters
1112e5e3e2 PEP fixes 2019-04-25 18:50:22 +10:00
Oliver Walters
2ab8276672 better coverage for part/models
- Increase from 57% to 67%
2019-04-25 17:51:02 +10:00
Oliver Walters
f36f02b27f Tests for stock app
- Increase coverage of Stock/models.py to 84%
2019-04-25 17:30:44 +10:00
Oliver Walters
3c40418f04 100% coverage on company/models.py 2019-04-25 04:20:40 +10:00
Oliver
19001b98f7
Merge pull request #149 from SchrodingersGat/get_absolute_url
Get absolute url
2019-04-25 13:40:10 +10:00
Oliver Walters
7b68310d73 PEP fixes 2019-04-25 03:20:25 +10:00
Oliver Walters
7c91c9ba79 Reverse URL for stock models
- stock location
- stock item
- stock tracking

- Added blank test files
2019-04-25 03:13:41 +10:00
Oliver Walters
e6617fef80 reverse URL lookup for BomItem and SupplierPart
- created empty test files
2019-04-25 01:05:08 +10:00
Oliver Walters
0bc5617825 Reverse url lookup for Part model 2019-04-25 01:00:01 +10:00
Oliver Walters
f9db3b680d Reverse lookup for part category URL
- Added some test cases for PartCategory model
2019-04-25 00:28:40 +10:00
Oliver Walters
a2d4403968 Reverse lookup for company URL
- Added some simple tests
2019-04-24 23:55:11 +10:00
Oliver Walters
5098712d9c Use reverse to get Build URL
- Add test cases to Build
2019-04-24 23:47:39 +10:00
Oliver Walters
887250cd06 PEP fixes 2019-04-24 23:26:16 +10:00
Oliver Walters
40a18d0ce4 Ensure settings.py knows how to access secret_key.txt 2019-04-24 23:19:36 +10:00
Oliver Walters
7a65144641 Use random.choice instead of random.choices
- Allows compatibility with python3.5
2019-04-24 16:08:59 +10:00
Oliver Walters
3827806603 SECRET_KEY is now generated by a script and stored as a local file
- key file ignored from git
2019-04-24 16:01:47 +10:00
Oliver Walters
0cdf660a80 Merge remote-tracking branch 'inventree/master' into delete-old-forms
# Conflicts:
#	InvenTree/part/views.py
2019-04-18 23:51:58 +10:00
Oliver Walters
456164f1d9 PEP fixes 2019-04-18 23:47:04 +10:00
Oliver Walters
41ee6320a8 Delete some other old templates 2019-04-18 23:44:15 +10:00
Oliver Walters
9e9aa02b90 Remove old templates from Stock 2019-04-18 23:41:17 +10:00
Oliver Walters
4f51258cf8 Removed old forms in Part 2019-04-18 23:39:05 +10:00
Oliver Walters
e57303ed37 Removed old forms from Company 2019-04-18 23:35:20 +10:00
Oliver Walters
0654fa7cc9 Deleted unused forms in Build
- These now use modal forms
- Removed redundant templates
2019-04-18 23:35:06 +10:00
Oliver Walters
8040ad8a6a Add function to duplicate stock item 2019-04-18 23:28:46 +10:00
Oliver Walters
05beb26c82 Change form title if part is being copied 2019-04-18 23:22:58 +10:00
Oliver Walters
6de58edd41 Add button on part page to duplicate part
- Opens modal form
- Takes user to created page
2019-04-18 23:17:21 +10:00
Oliver Walters
deaaa48b7d Add ability to 'copy' a part
- Launch a PartCreate form
- initialize form data with the existing part (if it exists!)
- use model_to_dict to pass data around
2019-04-18 23:12:29 +10:00
Oliver Walters
590dedce13 Add some helper functions 2019-04-18 23:08:33 +10:00
Oliver Walters
a0b6900eb8 Disable buttons that require row selection, until a selection has been made
- Stock table
2019-04-18 22:35:51 +10:00
Oliver Walters
bcebb1c73c Add select column to BOM table
- Doesn't do anything yet
2019-04-18 21:40:09 +10:00
Oliver Walters
8948536f0f Allow export of binary file data
- Use io.BytesIO for non-string-data file objects
2019-04-18 21:33:00 +10:00
Oliver Walters
5d887f3785 Remove 'simple-history'
- Might re-add it later on
2019-04-18 21:28:09 +10:00
Oliver Walters
88a7fa9656 Update logo colours 2019-04-18 09:16:16 +10:00
Oliver Walters
8dc3063765 Vertical centering for header image 2019-04-18 08:40:54 +10:00
Oliver Walters
18c48e9191 Split part details display into two columns 2019-04-18 08:33:25 +10:00
Oliver Walters
fd3f6ec21e Add stock item filtering by sub-category 2019-04-18 08:33:12 +10:00
Oliver
6b05078fd2
Merge pull request #133 from SchrodingersGat/part-files
Part files
2019-04-18 00:23:09 +10:00
Oliver Walters
3bac4fc9ee Added some pepper 2019-04-18 00:20:49 +10:00
Oliver Walters
e707eb3a2b Provide download link for part attachments
- Better upload management for attachment files (separated based on part ID)
2019-04-18 00:14:53 +10:00
Oliver Walters
d9d4e0043a Display list of part attachments 2019-04-18 00:01:19 +10:00
Oliver Walters
00199c26de Add part attachments to the admin interface 2019-04-17 23:58:13 +10:00
Oliver Walters
cb7e98aa1c Add extra BOM export format options
- Uses tablib (already used by django-import-export plugin)
- Needs cleanup but works well
- Problem exporting XLSX data (needs work!)
2019-04-17 23:52:15 +10:00
Oliver Walters
ebcbf9a90e Add status_text to API 2019-04-17 23:33:19 +10:00
Oliver Walters
963883acd6 Consolidated function to adjust stock
- Add / remove / stocktake
- Handle forms and tables properly
2019-04-17 23:17:04 +10:00
Oliver Walters
ba1b8d9181 Created js function to load stock table
- Avoid duplication of code
2019-04-17 22:59:52 +10:00
Oliver Walters
16dc5e2436 Reorganize script locations
- Delete script files that are no longer used
2019-04-17 19:03:28 +10:00
Oliver Walters
b9b8b5ee12 Update model for StockItem 2019-04-17 18:34:21 +10:00
Oliver Walters
69e8f4f5cc Fix up search box display in the navbar 2019-04-17 08:21:07 +10:00
Oliver Walters
86c31e8c0d Allow regex searching on part name 2019-04-17 08:19:40 +10:00
Oliver Walters
ca7182bf6b search page now returns matching parts
- Searches 'name' and 'description' field
- Uses the JSON API
2019-04-17 08:16:34 +10:00
Oliver Walters
fbf764e2ef Send search query text to template 2019-04-17 07:53:31 +10:00
Oliver Walters
19a11eac1a PEP fixes 2019-04-17 07:49:46 +10:00
Oliver Walters
52c3a63c61 Updated SupplierPriceBreak page 2019-04-17 00:48:01 +10:00
Oliver Walters
150bc1e674 Add API interface for SupplierPriceBreak 2019-04-17 00:35:49 +10:00
Oliver Walters
a3b544e2a4 typo fix 2019-04-17 00:21:11 +10:00
Oliver Walters
5cd837be07 Limit supplierpart part link to purchasable parts only 2019-04-17 00:14:22 +10:00
Oliver Walters
cd0b6a6511 Updated Supplier models
- Added cost calculation for supplier part
- Added more validators and help text
2019-04-17 00:09:39 +10:00
Oliver Walters
01bdf2f19b PEP fixes 2019-04-16 22:32:43 +10:00
Oliver Walters
7eea9d1a20 Launch a modal to select BOM download format
- This will have to change! A client-side hack for now..
- Work out a better way to do this!
2019-04-16 21:46:12 +10:00
Oliver Walters
be60fbcc25 More cleanup for modal forms
- Require 'ajax_template_name' to be set or weird things happen!
2019-04-16 21:25:20 +10:00
Oliver Walters
c0dd253137 Cleanup for AjaxUpdateView 2019-04-16 19:38:29 +10:00
Oliver Walters
7708ffb069 Cleanup for AjaxDeleteView
- Doesn't call renderJsonResponse as it returns html_data not html_form
2019-04-16 19:01:58 +10:00
Oliver Walters
7190a6fb7f Cleanup for AjaxCreateView 2019-04-16 18:43:41 +10:00
Oliver Walters
c706f00733 Skeletong for exporting BOM in different formats 2019-04-16 14:22:27 +10:00
Oliver Walters
29f33a8eec Move button locations into bootstrap-table headers
- part category
- stock location
- build list
- company list
- supplier part list
2019-04-16 11:46:07 +10:00
Oliver Walters
338a30b50e API endpoint for build list
- Changed part/build table to bootstrap table (ajax)
2019-04-16 08:31:43 +10:00
Oliver Walters
94b280eed3 Move button groups into the table toolbar next to search box
- part stock list
- part bom list
2019-04-16 08:13:05 +10:00
Oliver Walters
a4467fee21 Remove bootstrap-editable
- Revert to using modal django forms
2019-04-16 07:53:30 +10:00
Oliver Walters
bafce641a7 Limit sub-part choices to consumable parts only 2019-04-16 01:45:16 +10:00
Oliver Walters
bad46f85f4 Edit / delete / add BOM items
- Remove x-editable inline editing
- Uses only bootstrap-table and modal forms
- Hide the 'part' field in the bom item edit
2019-04-16 01:41:01 +10:00
Oliver Walters
6e2b111b9c Add 'consumable' field to Part
- Indicates that a part can be used to make other parts
- This is the inverse of 'buildable'
- Add this field to the serializer and edit forms
- Display parameter on part info page
- BOM edit window only requests sub-parts that are marked as 'consumable'
- Also added option to edit 'units' field for part
2019-04-16 00:01:52 +10:00
Oliver Walters
ca96c8e22b Better query param parsing 2019-04-15 23:30:17 +10:00
Oliver Walters
3d9a1acc2e Don't render full category information in part API
- Lots of data duplication!
- Just send the category ID (and the category name)
-
2019-04-15 22:52:53 +10:00
Oliver Walters
ac0b28a06c Simplify part filtering 2019-04-15 22:39:28 +10:00
Oliver Walters
7e78f0aa67 Changed query param from '1' to 'True' 2019-04-15 22:36:50 +10:00
Oliver Walters
a5e3af97ed Move table functionality to external script 2019-04-15 22:28:29 +10:00
Oliver Walters
b522ca5b29 Don't render editable items when ont in editing mode 2019-04-15 18:41:48 +10:00
Oliver Walters
ec98f7829e Add context flag to enable editing mode
- pass ?edit=1 to the BOM
- Display page differently if in editing mode
-
2019-04-15 18:32:15 +10:00
Oliver Walters
258555a813 Add placeholder text option for field editing 2019-04-15 00:11:26 +10:00
Oliver Walters
264f189917 Add function to wrap a value in an in-line editable field
- Requires bootstrap-editable
2019-04-15 00:11:14 +10:00
Oliver Walters
e370cb8d3c Add note field to BomItem serializer 2019-04-14 22:20:11 +10:00
Oliver Walters
d5186fc615 Add 'note' field to BOM item model 2019-04-14 18:26:11 +10:00
Oliver Walters
9e5eed5d5e Move the export_bom function to the part model 2019-04-14 12:34:14 +10:00
Oliver Walters
b8e28c003d Provide download link to export BOM file
- Helper function for generating temporary file (in memory) for exporting
2019-04-14 12:34:14 +10:00
Oliver Walters
b58c49e066 Create BOM export form
- Select output format
2019-04-14 12:34:13 +10:00
Oliver Walters
14de111130 Allow better passthrough of context variables for non-form views 2019-04-14 12:34:13 +10:00
Oliver Walters
0cc59540ef Generate modal form to export BOM
- Doesn't do anything yet
- Extends AjaxView
2019-04-14 12:34:13 +10:00
Oliver Walters
2202dfd55d Peppy fixes 2019-04-14 12:30:06 +10:00
Oliver Walters
00c21d521e Always display category
- Display full category path
2019-04-14 12:25:21 +10:00
Oliver Walters
9d98c429d6 Complex filtering for parts
- Allow filtering against child categories
- Could potentially be slooow
2019-04-14 11:59:07 +10:00
Oliver Walters
1ef81ecf2e Ignore some rules 2019-04-14 09:39:01 +10:00
Oliver Walters
29ab19d51d PEP fixes in /InvenTree 2019-04-14 09:33:17 +10:00
Oliver Walters
ac3a4e3de4 PEP fixes for /company 2019-04-14 09:30:45 +10:00
Oliver Walters
b9f23554a5 PEP fixes for /build 2019-04-14 09:29:05 +10:00
Oliver Walters
cf374252c1 PEP fixes for /part 2019-04-14 09:25:46 +10:00
Oliver Walters
76b0d17b11 PEP fixes for /stock 2019-04-14 09:23:24 +10:00
Oliver Walters
e6e03963c4 Simplified custom button text for modal forms
- Now only configured from the javascript end
- No server-side configuration of button text
2019-04-13 23:02:23 +10:00
Oliver Walters
0e7472dabc Fix display of custom button text
- Missing first parameter (modal object) to function call
2019-04-13 21:20:02 +10:00