Oliver Walters
cdc55bb5d3
PEP fixes
2019-05-18 23:08:42 +10:00
Oliver Walters
0cfb243eb3
Move SupplierPart and SupplierPriceBreak to the 'Company' app
...
- https://docs.djangoproject.com/en/2.2/ref/models/options/#django.db.models.Options.db_table
- https://stackoverflow.com/questions/3519143/django-how-to-specify-a-database-for-a-model
- And others, presumably
2019-05-18 23:08:34 +10:00
Oliver Walters
5043c354b1
Set default value for SupplierPriceBreak
...
Edit or Delete a SupplierPriceBreak
2019-05-18 23:08:30 +10:00
Oliver Walters
fc3072a459
Form for creating a new price break for a supplier part
2019-05-18 23:08:25 +10:00
Oliver Walters
a316681ec8
Pass object data back to modal when creating new object
2019-05-14 23:04:00 +10:00
Oliver Walters
d1de6eb1f9
Copy across default tags when creating a new part
2019-05-14 17:32:29 +10:00
Oliver Walters
069cebb669
PEP
2019-05-13 23:03:37 +10:00
Oliver Walters
fcdddf6bb6
Cleaup for delete supplier part form
2019-05-13 22:52:20 +10:00
Oliver Walters
e1e5cde60f
Renamed copyBomFrom to deepCopy
...
- Allows passing of more data (in the future) e.g. tags, etc
- Performs copy of the part image
2019-05-13 21:54:52 +10:00
Oliver Walters
00f7ece6b4
PEP fixes
2019-05-13 21:42:05 +10:00
Oliver Walters
2408318eae
Add new view to duplicate a part
...
- Allows 'deep_copy' (copies all BOM items for the duplicated part)
2019-05-13 21:41:32 +10:00
Oliver Walters
e3a9a70678
Add a form/view/etc for BOM validation
2019-05-12 16:27:50 +10:00
Oliver Walters
b3cca1d851
Improve form management when possible part matches are found
...
- Display the checkbox always
- Display a warning message above the form
2019-05-11 18:07:37 +10:00
Oliver Walters
19854b4709
Improve str2bool to validate checkbox return values
...
- A checked checkbox returns 'on' :|
2019-05-11 18:06:17 +10:00
Oliver Walters
2e5b0bc961
PEP
2019-05-11 12:29:51 +10:00
Oliver Walters
84d2fce8ca
Add a 'confirm_creation' input if there are possible part matches
2019-05-11 12:29:02 +10:00
Oliver Walters
d9c0d2f5e3
Update PartCreate form
...
- Display list of close matches
- Invalidate form (for now)
2019-05-11 11:55:17 +10:00
Oliver Walters
343850c4f0
Cleanup for part.views
2019-05-11 09:51:45 +10:00
Oliver Walters
fb38ddb1b3
Limit choices for 'parent' field when editing PartCategory
2019-05-08 17:57:31 +10:00
Oliver Walters
9a6cf259a6
PEP fixes
2019-05-07 14:48:35 +10:00
Oliver Walters
dcbd5d819c
Enable DnD for Company image
...
- Can actually use the existing form to do partial upload!
- Generecise the drag-and-drop upload function
- Remove some (now unnecessary) Python View code
2019-05-07 14:47:31 +10:00
Oliver Walters
0969edc431
Some tweaks
...
- Add (unused) function to download an external file
- JS tweaks
2019-05-07 08:07:33 +10:00
Oliver Walters
22ff085b15
PEP fixes
2019-05-07 00:11:27 +10:00
Oliver Walters
fe4acd48a7
Add the ability to extract image URL information when drag-and-dropping image URL from a browser window
...
- Can't do anything with it yet...
- Code is almost there but leaving for now
2019-05-07 00:04:35 +10:00
Oliver Walters
bb702367b6
Test that uploaded image is an image file, return error otherwise
...
- New javascript function inventreeFileUpload
2019-05-06 22:20:06 +10:00
Oliver Walters
c88149b9aa
POST image data to View
...
- https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects
- https://stackoverflow.com/questions/25390598/append-called-on-an-object-that-does-not-implement-interface-formdata#25390646
2019-05-06 21:49:01 +10:00
Oliver Walters
bbd164407f
Display 'starred' status on the Part information page
2019-05-05 10:54:35 +10:00
Oliver Walters
ecb8e71d75
Fixed a missing form title
2019-05-05 00:46: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
8e65c0a120
Fixes for some broken views
2019-05-04 17:20:05 +10:00
Oliver Walters
6c7613ba2f
Fix form title
2019-05-04 01:03:43 +10:00
Oliver Walters
6e8c1bcc84
Add views to Create / Edit / Delete a PartAttachment
...
- Buttons to edit or delete existing attachments
- Button to add a new attachment
- Fixed conflicting migrations
2019-05-02 17:29:21 +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
436d158cfe
Merge remote-tracking branch 'inventree/master' into build-allocation
...
# Conflicts:
# InvenTree/company/templates/company/tabs.html
2019-05-01 08:15:58 +10:00
Oliver Walters
b6becbc570
Rework build allocation
...
- Each item renders as a collapsible panel with overview data at the top
2019-05-01 07:48:46 +10:00
Oliver Walters
395db4df38
Pepe fixes
2019-04-30 00:18:58 +10:00
Oliver Walters
8ec4101edd
Reduce items presented in BOM creation list
...
- Don't allow selection of parts that are already in the BOM!
2019-04-30 00:16:20 +10:00
Oliver Walters
3b838d29ec
Small fixes
...
- Hide some tabs that aren't functional yet
- Hide fields instead of marking them as disabled
- Default behaviour is to allow all hosts
2019-04-29 18:35:16 +10:00
Oliver Walters
05333e7e7d
PEP fixes
2019-04-28 23:58:14 +10:00
Oliver Walters
87411293cf
docstring improvements
2019-04-28 23:57:29 +10:00
Oliver Walters
bc12af5994
Remove the 'supplier_part' field when first creating a Part object
...
- As the Part does not yet exist, there are no matching SupplierPart objects
2019-04-28 23:55:21 +10:00
Oliver Walters
4e3702384b
Limit SupplierPart option in Part edit form
...
- Only allow selection of SupplierPart that match the Part being edited
2019-04-28 23:50:35 +10:00
Oliver Walters
1171953e65
Limit SupplierPart options in CreateBomItem form
...
- If Part is selected, limit the options in supplier_part field
- Only allow supplier_parts which map back to the same part
2019-04-28 11:24:26 +10:00
Oliver Walters
a9fbbc3a37
Remove references to get_object_or_404
...
- Properly handle DoesNotExist errors
2019-04-28 11:09:19 +10:00
Oliver Walters
624c5094c5
Prevent editing of SupplierPart fields if initial values are provided
2019-04-28 10:57:32 +10:00
Oliver Walters
cd438f0569
Add generic method for retriving GET or POST params
2019-04-28 09:53:42 +10:00
Oliver Walters
e5fc43a00f
Fix improper references to template_name for ajax forms
...
- Should be ajax_template_name
2019-04-28 09:00:54 +10:00
Oliver Walters
ed3ae30248
Documentation for Part app
2019-04-27 22:18:07 +10:00
Oliver Walters
456164f1d9
PEP fixes
2019-04-18 23:47:04 +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
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
19a11eac1a
PEP fixes
2019-04-17 07:49:46 +10:00
Oliver Walters
a3b544e2a4
typo fix
2019-04-17 00:21:11 +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
ca96c8e22b
Better query param parsing
2019-04-15 23:30:17 +10:00
Oliver Walters
7e78f0aa67
Changed query param from '1' to 'True'
2019-04-15 22:36:50 +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
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
4f63d12837
Consolidated 'Part' app views
...
- Improved templating
- Part tree open/close status stored to session
2018-05-04 18:55:55 +10:00
Oliver
bc716e25f7
Fixed bugs in Inventree/views.py
...
- Need to pass request.FILES to the form! (duh!)
- Prevent form data from being saved twice
2018-05-03 23:40:27 +10:00
Oliver
a9c20f5d95
Added modal form success messages
...
- More to be done, just a start
- Create / edit / delete
2018-04-30 00:23:02 +10:00
Oliver
aca0d236ee
Javascript consolidation
2018-04-29 12:25:07 +10:00
Oliver
7ebb723d15
Revert "Set initial value fields to disabled for some forms"
...
This reverts commit c1271367bd
.
2018-04-28 12:19:50 +10:00
Oliver
c1271367bd
Set initial value fields to disabled for some forms
...
- Prevent user from changing certain fields
- Only when a form is launched from a particular view
2018-04-28 12:14:18 +10:00
Oliver
bc597d7c21
Style fixes
2018-04-28 01:16:47 +10:00
Oliver
e1e3cc71e6
More modal forms
...
- supplier-part-edit
- supplier-part-delete
2018-04-27 21:32:48 +10:00
Oliver
bc3dca3aba
Modal for edit and delete part category
2018-04-27 20:42:12 +10:00
Oliver
5162c1d11f
Inline deletion for BOM items
2018-04-27 00:54:01 +10:00
Oliver
784b0dec02
Added AjaxDeleteView
...
- AjaxDeleteView handles ajaxified delete GET and POST events
- Added modal deletion window
- Added launchDeleteForm jQuery function
2018-04-27 00:06:44 +10:00
Oliver
9fd275ed3e
Part Edit view now ajaxified
2018-04-26 23:28:27 +10:00
Oliver
280f2c36cb
Modal form for part creation
2018-04-26 18:22:41 +10:00
Oliver
e395d89a7f
Fix issues for AjaxUdpateView
...
- Works properly now!
- Can edit BOM item inline
- Can add BOM item inline too
2018-04-26 09:26:43 +10:00
Oliver
d88da28871
Generic AjaxCreateView
...
- Allows for same form to be posted
2018-04-25 14:10:56 +10:00
Oliver
8bc4050d05
Modal form is working for 'create new category'
...
- Had to set form.helper.form_tag to False (so we could control form tags manually)
- Created a 'json' model view
2018-04-25 12:46:58 +10:00
Oliver
9004086632
Add button to launch modal form
2018-04-25 00:09:25 +10:00
Oliver
25fcd3e9f1
Simple search filtering for part list
...
- Needs to be 'generecised'
- Working well for now
2018-04-24 09:06:30 +10:00
Oliver
ac3de4ce3d
Add part detail page for company / supplier
2018-04-22 23:07:23 +10:00
Oliver
4bedf0ed4c
Finally got migrations working together
2018-04-22 21:54:12 +10:00
Oliver
fa23767150
Added skeleton for 'build' app
2018-04-17 00:32:02 +10:00
Oliver
a91ff58d84
Flakey
...
Fixing python style errors
2018-04-16 01:02:17 +10:00
Oliver
5861296974
Add view for BomItem model
...
- Create BOM item (auto-add to a parent part)
- Edit / delete
- View details
2018-04-15 21:29:24 +10:00
Oliver
9d89db34b2
Improvements to stock page
...
- Fixed URL / view (use class views)
- Better slug lookup
- Better table rendering using ol' mate bootstrap
2018-04-15 20:10:49 +10:00
Oliver
17b9f4ec8c
Added pages for editing categories
...
- category-detail
- category-delete
- category-edit
- category-new
2018-04-15 11:40:03 +10:00
Oliver
2c2db4fffb
Added "new part" feature
...
- Create a new part
- Button provided on the "category" list page
2018-04-15 10:08:44 +10:00
Oliver
54e78bf468
Ability to delete part
...
- Provides confirmation form
- Shows the flow-on effects (model.CASCADE) from deleting this part
- Bootstrap makes it prettyful
2018-04-15 09:08:35 +10:00
Oliver
21e3f415c6
Added ability to edit parts
...
- installed django_crispy_forms
- added EditPartForm in part/forms.py
- Vastly simplified parts views by using class views
(need to do this for the other apps too!)
2018-04-15 01:18:12 +10:00
Oliver
0e2c5e6af5
Add tabs to part detail view
...
- Currently each "tab" reloads the entire page but with the new tab selected
- We could use bootstrap js to do this without reloading (load ALL part data)
2018-04-14 22:10:19 +10:00
Oliver
6a98846a8f
Added supplier web interface
...
- Display list of suppliers
- Supplier detail page
- Supplier part detail page
- Part detail now includes list of supplier parts
2018-04-14 16:26:26 +10:00
Oliver
89ee09b01f
Implemented bidirectional traversal for PART and STOCK apps
...
- Added list view for StockItems
2018-04-14 15:13:16 +10:00
Oliver
1da6df0c5e
Separate API views into api.py
...
- Web views are still in views.py
- Files were getting too cluttered and hard to grok
2018-04-14 14:11:46 +10:00
Oliver
63f7fe640c
Added 'part tracking' page
...
- e.g. /part/<pk>/track
2018-04-14 00:46:18 +10:00
Oliver
eec725d90f
A good start on web interface
...
- Added details for "part" app
- Added BOM page for each part
- Added Stock page for each part
- Bootstrap! CSS!
2018-04-14 00:08:30 +10:00
Oliver
bd46f66d6b
Begin to add views for part models
...
- List BOM items
- Show category listing as linked items
- Fix some pathing issues with InvenTreeTree class
2018-04-13 22:36:59 +10:00
Oliver
ed61ebe5b7
Starting to implement BOM management
...
- Each part can be made of other parts
- Disable tracking and project apps for now
- Project will change (eventually) to work order
- Part parameters have been disabled (for now)
2018-04-12 16:27:26 +10:00
Oliver Walters
6c7f5fdaf3
Added MinValue validator(s)
2017-04-16 17:05:02 +10:00
Oliver Walters
057fd1dd20
Filtering improvements
2017-04-16 14:24:15 +10:00
Oliver Walters
7e1fbf8a04
Style fixes
2017-04-16 01:01:48 +10:00
Oliver Walters
a20987f122
Added part filters
2017-04-15 23:14:16 +10:00
Oliver Walters
71d7895148
Improved Part API docs
2017-04-15 23:04:09 +10:00
Oliver Walters
e5f6de5d2b
Style fixes
2017-04-14 16:12:54 +10:00
Oliver Walters
37808f3834
Simplified PART and PROJECT APIs
2017-04-14 15:25:10 +10:00
Oliver Walters
e8ec11e3cc
Added supplier API
2017-04-14 14:45:17 +10:00
Oliver Walters
15d27cafec
Further API improvements
2017-04-14 13:29:24 +10:00
Oliver Walters
7fe1c21ebd
Updated Part API
...
- categories can now be filtered by parent
- Added FilterChildren func to invenTree.models
2017-04-14 13:09:24 +10:00
Oliver Walters
2299cd0700
Further API improvements
2017-04-14 12:14:50 +10:00
Oliver Walters
39a6bcdf3e
Improved Part API
2017-04-14 11:46:18 +10:00
Oliver Walters
e0f86db664
Fixed unused import
2017-04-13 00:31:54 +10:00
Oliver Walters
0772b8d780
Major improvements to Parts API
...
- Requires authentication (or read only)
- Separated URL patterns
- Better use of generics
- Can add/edit parts and part categories
2017-04-13 00:27:29 +10:00
Oliver
eb4ef9de98
Fixed import that was not used
2017-04-11 23:50:25 +10:00
Oliver
5853a5767c
Fix for part category API
2017-04-11 23:36:01 +10:00
Oliver
4c07e8d8a0
Updated part API
2017-04-11 23:33:08 +10:00
Oliver
3704ad34dc
Updated part API
2017-04-11 23:07:02 +10:00
Oliver
338dcd3b72
Fixing python errors
2017-04-11 17:21:05 +10:00
Oliver
e06121ebda
Updated API URLs
2017-04-11 09:41:03 +10:00
Oliver Walters
7ce5a9a7e5
Papa Pep
2017-03-28 23:38:12 +11:00
Oliver Walters
b5dc22f33a
peppa pig
2017-03-28 23:31:41 +11:00
Oliver Walters
7bcea2f3ac
Added REST framework
...
- /part/ URL is now a JSON api
2017-03-28 22:12:02 +11:00
Oliver Walters
abe0bbf2e4
Simple supplier template
2017-03-27 22:05:35 +11:00
Oliver Walters
b919418fb5
Added a categorylist page
...
Displays list of all top-level part categories
2017-03-26 10:45:38 +11:00
Oliver Walters
3f81046a26
Added links to child categories
2017-03-26 10:23:22 +11:00
Oliver Walters
ddd927c436
Added views for part and part category
...
- Worked out simple linking
- Category path displaying correctly
- Category page lists parts in category
2017-03-26 10:06:00 +11:00
Oliver Walters
bb4fc9820f
Added PartCategory
...
- Parent can be null (top-level category)
- Parent can be other PartCategory
2017-03-25 23:07:43 +11:00