Commit Graph
514 Commits
Author SHA1 Message Date
Oliver Walters 67eda51cd2 Add part category tree traversal
- If a category doesn't have a default_location, look at the parent category
- And so on and so on
2019-05-04 21:56:18 +10:00
Oliver Walters 71972f4454 Add function to get the default location for a part
- If field not specified, look at the part category
2019-05-04 19:06:39 +10:00
Oliver Walters 4ffaad3f1a Add a default_location to the PartCategory model
- If a part does not specify a default location, look at the default location of  the category
2019-05-04 19:00:11 +10:00
Oliver Walters 9aa1a70f18 QR code improvements
- Display QR codes as links to served images
- The qr_code plugin caches these images in the background
- Make a qr_code template to push out as a modal form
- Create a QRCodeView to simplify display of QR codes
- Add option to launchModalForm() to disable the 'submit' button

Refactored QR code display for

- StockLocation
- StockItem
- Part
2019-05-04 18:46:57 +10:00
Oliver Walters 4af59f0ca9 Fixed part image upload
- Image was being saved twice
- Don't call super().post in AjaxUpdateView
- Instead, handle properly
2019-05-04 00:38:17 +10:00
Oliver 6482b54bc9 Merge pull request #205 from SchrodingersGat/qr-codes
Qr codes
2019-05-02 21:15:34 +10:00
Oliver Walters 5a234a1070 Added barcode for Part object 2019-05-02 20:57:53 +10:00
Oliver Walters 194a0962f3 PEP fixes 2019-05-02 20:19:08 +10:00
Oliver Walters 38100520df Add 'to_order' and 'to_build' collapsible panels 2019-05-02 20:18:34 +10:00
Oliver Walters fbb120da53 Use collapse template in allocation page 2019-05-02 18:53:03 +10:00
Oliver Walters ad6f4e19b1 Add 'comment' field to part attachment model 2019-05-02 01:06:06 +10:00
Oliver Walters 7c11d917de Bug fixes
- Part creation form was setting a field as HiddenInput() rather than its widget
- Added 'comment' file to FileAttachment model
2019-05-01 09:40:49 +10:00
Oliver Walters c29827e45a Add API endpoint and serializer for BuildItem model 2019-04-29 22:59:42 +10:00
Oliver Walters 6326d6d050 Fixed spelling mistake 2019-04-29 22:21:18 +10:00
Oliver Walters c2a35b6656 Add 'active' field to Part model 2019-04-28 23:00:38 +10:00
Oliver Walters ba49b080b0 Some small tweaks 2019-04-28 11:46:53 +10:00
Oliver Walters ed3ae30248 Documentation for Part app 2019-04-27 22:18:07 +10:00
Oliver Walters 95be2755f4 Adjust SupplierPart supplier foreignkey
- Limit choices to 'is_supplier'
2019-04-27 13:10:21 +10:00
Oliver Walters e57a8cdcd1 Fix rendering of BOM table view
- Edit and delete rows now works
2019-04-26 23:32:22 +10:00
Oliver Walters accec07fe9 BOM serializer now validates against model
- Need to call instance.clean()
- https://stackoverflow.com/questions/40697648/django-dry-model-form-serializer-validation
2019-04-26 22:36:44 +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 6b05078fd2 Merge pull request #133 from SchrodingersGat/part-files
Part files
2019-04-18 00:23:09 +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 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 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 c706f00733 Skeletong for exporting BOM in different formats 2019-04-16 14:22:27 +10:00
Oliver Walters bafce641a7 Limit sub-part choices to consumable parts only 2019-04-16 01:45:16 +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 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 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 cf374252c1 PEP fixes for /part 2019-04-14 09:25:46 +10:00
Oliver 7644617af0 Better string formatting for models
Allows for easier searching in drop-downs for ForeignKeys
2018-05-09 00:17:39 +10:00
Oliver a2ff1d16f3 Introspection of build allocation
Yay for dicts
2018-04-30 22:45:11 +10:00
Oliver b24ddac0b8 Part stuff 2018-04-30 22:30:15 +10:00
Oliver feb45513f7 Prevent serial number for stock item with quantity > 1 2018-04-29 13:20:02 +10:00
Oliver f49474ace5 Prevent recursive BOMs
- If A has B in its BOM, A cannot be added to the BOM of B
2018-04-27 23:42:23 +10:00
Oliver 06f9c67b11 Prevent part from adding itself as a BOM item 2018-04-27 23:23:44 +10:00
Oliver f46c09e3a7 Added part category path string to serializer 2018-04-24 17:54:08 +10:00
Oliver 08ed128bea PEP style fixes 2018-04-23 21:18:35 +10:00
Oliver ac3de4ce3d Add part detail page for company / supplier 2018-04-22 23:07:23 +10:00