2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-04 06:18:48 +00:00

109 Commits

Author SHA1 Message Date
Oliver
2635327c51
Add 'refresh' button for part parameter table (#3329)
* Add 'refresh' button for part parameter table

* Override default URL behaviour for unit test

(cherry picked from commit 2c12a695294c2785e82b7f469f79a7d1a5412e71)
2022-07-15 11:55:39 +10:00
Oliver
648faf4ed2
Reference fields (#3267)
* Adds a configurable 'reference pattern' to the IndexingReferenceMixin class

* Expand tests for reference_pattern validator:

- Prevent inclusion of illegal characters
- Prevent multiple groups of hash (#) characters
- Add unit tests

* Validator now checks for valid strftime formatter

* Adds build order reference pattern

* Adds function for creating a valid regex from the supplied pattern

- More unit tests
- Use it to validate BuildOrder reference field

* Refactoring the whole thing again - try using python string.format

* remove datetime-matcher from requirements.txt

* Add some more formatting helper functions

- Construct a regular expression from a format string
- Extract named values from a string, based on a format string

* Fix validator for build order reference field

* Adding unit tests for the new format string functionality

* Adds validation for reference fields

* Require the 'ref' format key as part of a valid reference pattern

* Extend format extraction to allow specification of integer groups

* Remove unused import

* Fix requirements

* Add method for generating the 'next' reference field for a model

* Fix function for generating next BuildOrder reference value

- A function is required as class methods cannot be used
- Simply wraps the existing class method

* Remove BUILDORDER_REFERENCE_REGEX setting

* Add unit test for build order reference field validation

* Adds unit testing for extracting integer values from a reference field

* Fix bugs from previous commit

* Add unit test for generation of default build order reference

* Add data migration for BuildOrder model

- Update reference field with old prefix
- Construct new pattern based on old prefix

* Adds unit test for data migration

- Check that the BuildOrder reference field is updated as expected

* Remove 'BUILDORDER_REFERENCE_PREFIX' setting

* Adds new setting for SalesOrder reference pattern

* Update method by which next reference value is generated

* Improved error handling in api_tester code

* Improve automated generation of order reference fields

- Handle potential errors
- Return previous reference if something goes wrong

* SalesOrder reference has now been updated also

- New reference pattern setting
- Updated default and validator for reference field
- Updated serializer and API
- Added unit tests

* Migrate the "PurchaseOrder" reference field to the new system

* Data migration for SalesOrder and PurchaseOrder reference fields

* Remove PURCHASEORDER_REFERENCE_PREFIX

* Remove references to SALESORDER_REFERENCE_PREFIX

* Re-add maximum value validation

* Bug fixes

* Improve algorithm for generating new reference

- Handle case where most recent reference does not conform to the reference pattern

* Fixes for 'order' unit tests

* Unit test fixes for order app

* More unit test fixes

* More unit test fixing

* Revert behaviour for "extract_int" clipping function

* Unit test value fix

* Prevent build order notification if we are importing records
2022-07-11 00:01:46 +10:00
Oliver
090f4f4387
Converting more forms to the API (#3181)
* Delete category via the API

* Delete StockLocation via the API

* Delete StockItem via the API

- Removes the final instance of AjaxDelete

* Remove URL path

* Add missing code
2022-06-11 21:53:26 +10:00
Oliver
2b1d8f5b79
Set part category (#3134)
* Refactor function to enable / disable submit button on modal forms

* Category selection now just uses the AP

* Remove unused forms / views

* JS linting fixes

* remove outdated unit test
2022-06-06 13:00:30 +10:00
Oliver
fe8f111a63
Delete part via API (#3135)
* Updates for the PartRelated model

- Deleting a part also deletes the relationships
- Add unique_together requirement
- Bug fixes
- Added unit tests

* Adds JS function to delete a part instance

* Remove legacy delete view

* JS linting
2022-06-06 11:42:22 +10:00
Oliver
2d1776a151
Refactor 'DeleteManufacturerPart' form (#3067)
* Refactor 'DeleteManufacturerPart' form

- Remove duplicated forms
- Update style to match other forms
- Block on each deletion before progressing to the next one

* PEP fix

* Adds deleteSupplierParts function

* Refactor all instances of supplier part deletion

* Refactor tractor : use convenience function for bootstraptable.getSelections

* Add deleter for manufacturerpartparameter.

Refactor existing code into a single function

* Refactor deletion for stock items

* JS linting
2022-05-25 23:35:53 +10:00
Matthias Mair
93b6934127 fix trailing 2022-05-20 13:20:55 +02:00
Oliver Walters
d69b5811b1 Improved javascript log / warn / error messages 2022-05-03 12:00:28 +10:00
Oliver Walters
e87a02638e Merge remote-tracking branch 'inventree/master' into order-parts-wizard
# Conflicts:
#	InvenTree/order/serializers.py
#	InvenTree/templates/js/translated/model_renderers.js
2022-05-02 16:11:11 +10:00
Oliver
6e7b307423 Prevent "null" from being displayed as part units 2022-04-28 09:51:51 +10:00
Oliver Walters
c66cd1d51b Adds button to expand row for "extra" information 2022-04-26 22:14:01 +10:00
Oliver Walters
b8ca7fb092 Merge remote-tracking branch 'inventree/master' into order-parts-wizard
# Conflicts:
#	InvenTree/templates/js/translated/model_renderers.js
2022-04-26 21:22:31 +10:00
Oliver Walters
7db11b627b Refactor PartSalePriceBreak and PartInternalPriceBreak tables to use the API
- Remove old server-side views
- Simplify code
2022-04-26 19:53:09 +10:00
Oliver Walters
f504dfe797 part variant table now displays information about variant stock quantities 2022-04-22 00:20:32 +10:00
Oliver Walters
18de4676dc Explicitly mark "parent" field in PartCategory and StockLocation as not required in API form fields 2022-04-15 19:22:06 +10:00
Oliver
40d6a1470f Tweak for part.js 2022-04-14 11:04:25 +10:00
Oliver Walters
e225d3b765 Fix action buttons in "part" table on category page 2022-04-07 19:09:43 +10:00
Oliver Walters
c93f9c94f3 Change column title 2022-04-05 00:33:54 +10:00
Oliver Walters
0908aa8c8c Allow sorting of part table by unallocated_stock 2022-04-05 00:31:44 +10:00
Oliver Walters
15253435af Adjustments for partStockLabel function 2022-04-05 00:02:11 +10:00
Kálmán Rózsahegyi
ade5a81a1a Enhance partStockLabel with ordering/building quantites 2022-04-03 12:36:46 +02:00
Kálmán Rózsahegyi
bc4b66e7d3 Render partStockLabel based on available/in stock quantites 2022-04-03 12:36:37 +02:00
Kálmán Rózsahegyi
d912846e41 Use available quantities in part table, enhance stock badge 2022-04-03 12:35:59 +02:00
Oliver Walters
467febf9ea The part parameter table is now loaded via the API 2022-03-19 22:09:17 +11:00
Oliver
38d33a3f5f Display a message if scheduling information is unavailable for a given part 2022-03-16 23:48:49 +11:00
Oliver
f7d724aa0c Merge remote-tracking branch 'inventree/master' into scheduling
# Conflicts:
#	InvenTree/InvenTree/version.py

(Update API version)
2022-03-08 12:25:36 +11:00
Oliver
ba406a4da9 Refactorin'
- Add the "download" button into the "filters" list
- Cuts down on boilerplate code
2022-03-03 21:16:27 +11:00
Oliver
954f0afb85 Merge branch 'master' into scheduling 2022-03-03 09:15:08 +11:00
Oliver
5dc543618e Allow duplication of subtitute parts when copying a BOM 2022-03-02 00:31:50 +11:00
Oliver
190822a680 JS linting 2022-03-01 23:40:38 +11:00
Oliver
f33f1a339d Add more information to scheduling chart
Also improves chart styling
2022-03-01 23:20:08 +11:00
Oliver
776dffe779 Scheduling information is now calculated on the server, and provided via a new API endpoint
- Much simpler than sequencing multiple API calls
2022-03-01 22:54:49 +11:00
Oliver
dfd6684699 Add incoming stock for build orders 2022-03-01 17:31:26 +11:00
Oliver
8f7164d5cd Add information for outgoing stock (sales orders) 2022-03-01 17:24:09 +11:00
Oliver
37ac8f6517 Display scheduled incoming stock for purchase orders 2022-03-01 17:13:47 +11:00
Oliver
a278e52443 Merge branch 'master' into scheduling 2022-03-01 16:50:57 +11:00
Oliver
784189be75 Update purchase order table from part context 2022-02-28 15:07:12 +11:00
Oliver
8587a59ec1 WIP - loading graph 2022-02-26 18:36:25 +11:00
Oliver
5df8377213 Fix "actions" column for part purchase order table 2022-01-12 15:12:53 +11:00
Oliver
77decc72ed Extra bug fix for part variant form 2022-01-08 20:07:54 +11:00
Oliver
3921af821c Fix filtering for part purchase order table 2021-12-22 10:58:46 +11:00
Oliver
774d834b7e
Merge pull request #2477 from SchrodingersGat/duplicate-bom-form
Duplicate bom form
2021-12-21 23:06:44 +11:00
Oliver
2c0da25cbc "Validate BOM" now uses the API also 2021-12-21 22:45:59 +11:00
Oliver
70f9a0fe13 Furher logic improvements to BOM copy
- Remove "self" part from list
- Stop inherited BOM items from being copied incorrectly
- Allow user to select whether "inherited" BOM items are copied
2021-12-21 22:07:08 +11:00
Oliver
0c8a047bc2 Adds simply endpoint for BOM duplication 2021-12-21 17:29:14 +11:00
Oliver
0060bb074e Updates for various part views 2021-12-21 16:56:47 +11:00
Oliver
81a3547120 Hide "receive parts" button for orders which have been cancelled 2021-12-20 11:17:29 +11:00
Oliver
f6e1de42f5 JS linting 2021-12-03 21:16:58 +11:00
Oliver
acfafe22c5 order lines can be received directly from the new table 2021-12-03 21:07:09 +11:00
Oliver
6d90ded27f First pass at a part-purchase-order table 2021-12-03 20:54:21 +11:00