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

968 Commits

Author SHA1 Message Date
Oliver
0d7b4f2f17
Fixes call to processField (#5943)
* Fixes call to processField

- Previously used options.fields?
- Should use fields?

* Update forms.js
2023-11-20 22:03:08 +11:00
Lukas
0b168c1d9a
CUI dependent/nested fields (#5924)
* Added backend changes to support printing options

* Pass printing options seperatly via kwargs for easier api refactor later

* Implemented printing options in CUI

* Fix js linting

* Use translations for printing dialog

* Support nested fields in CUI

* Added docs

* Remove plugin and template fields from send printing options

* Fix docs

* Added tests

* Fix tests

* Fix options response and added test for it

* Fix tests

* Bump api version

* Update docs

* Apply suggestions from code review

* Fix api change date

* Added dependent field and improved nested object fields on CUI

* Fix: cui js style

* Fix process field implementation if the 'old' __ syntax is used for nested fields
2023-11-16 11:58:51 +11:00
Oliver
247ad4dcf9
Revert "Form improvements (#5837)" (#5913)
This reverts commit 0d193d8cffae0dd48cfd79e9ca3306de9b77cb70.
2023-11-14 14:49:45 +11:00
Lukas
0d193d8cff
Form improvements (#5837)
* Added backend changes to support printing options

* Pass printing options seperatly via kwargs for easier api refactor later

* Implemented printing options in CUI

* Fix js linting

* Use translations for printing dialog

* Support nested fields in CUI

* Added docs

* Remove plugin and template fields from send printing options

* Fix docs

* Added tests

* Fix tests

* Fix options response and added test for it

* Fix tests

* Bump api version

* Update docs

* Apply suggestions from code review

* Fix api change date

* Added dependent field and improved nested object fields on CUI

* Fix: cui js style
2023-11-13 22:49:45 +11:00
Oliver
ac26f61ecd
Owner list API updates (#5906)
* Implement better search matching for owner list API

* Update UserSerializer

-Add filterset fields to various API endpoints

* Allow owner list to be filtered by "is_active" status

- Only applies to users (not groups)

* Add ability to filter "owner" list by "is_active" status

- Only applies to users

* Use "is_active" filter for "responsible" form field
2023-11-13 15:06:45 +11:00
Oliver
63edd39e2d
Ulugbek erkinov master (#5872)
* Remove stat context variables

* Revert "Remove stat context variables"

This reverts commit 0989c308d0cea9b9405a1338d257b542c6d33d73.

* Allow longer timeout for image download tests

* fix: Adding specific quantity of a part as installed item(s

* fix: Adding specific quantity of a part as installed item(s

* Update serializers.py

* Mark field as not required

* If value not provided, revert to "default" behavior

* Fix serializer validation

* Update frontend forms to mach

* Bump API version

---------

Co-authored-by: Ulugbek Erkinov <ulugbekerkinov606@gmail.com>
2023-11-06 22:58:46 +11:00
Oliver
4f8bca4ea4
PO auto fill fix (#5871)
* Take "on_order" quantity into account when ordering items

* Clean up panel.md

* update urls.d
2023-11-06 21:14:23 +11:00
Lukas
a11418398f
Printing options (#5786)
* Added backend changes to support printing options

* Pass printing options seperatly via kwargs for easier api refactor later

* Implemented printing options in CUI

* Fix js linting

* Use translations for printing dialog

* Added docs

* Remove plugin and template fields from send printing options

* Fix docs

* Added tests

* Fix tests

* Fix options response and added test for it

* Fix tests

* Bump api version

* Update docs

* Apply suggestions from code review

* Fix api change date
2023-11-02 00:39:19 +11:00
Oliver
a1f9260da6
Build part change fix (#5808)
* Add DiffMixin class

- Allows us to compute "diffs" against items stored in the database, when they are being updated

* Prevent build order part from being changed after creation

* Remove "part" field from buildorder edit form

* Add unit test
2023-10-29 23:13:38 +11:00
Oliver
f280e0aeaf
Update sales_order.js (#5784)
Typo fix
2023-10-25 12:24:30 +11:00
Oliver
dfc4fa7584
Fixes for table rendering (#5782)
- Handle case where related object does not exist in the dataset
2023-10-25 11:45:00 +11:00
Matthias Mair
158a209a0f
Version bump (#5740)
* Updated all dependencies

* fixed some spelling errors

* More spelling corrections

* Fixes for changes in react-query
2023-10-18 07:27:28 +11:00
Oliver
a566ac67a7
BOM Table - Fix pricing when subassembly is open (#5721)
- Ignore pricing for sub-items
- Fixes https://github.com/inventree/InvenTree/issues/5286
2023-10-17 14:12:32 +11:00
Lukas
e8e0b57cea
Feature/location types (#5588)
* Added model changes for StockLocationTypes

* Implement icon for CUI

* Added location type to location table with filters

* Fix ruleset

* Added tests

* Bump api version to v136

* trigger: ci

* Bump api version variable too
2023-10-11 16:34:38 +11:00
Lukas
9b4e1743c7
Feature/Tree picker (#5595)
* Show only the current modal over the backdrop, move others behind

* Added initial draft for tree picker

* Added filters to tree picker

* Added tree picker to more location fields

* Fixed bug with missing input group and filters side effect

* Added tree picker to part category inputs

* Added missing picker for part category parent input

* Fixed disabled items

* Fix js linting errors

* trigger: ci

* Bump api_version.py

* Update api_version.py
2023-10-05 00:11:49 +11:00
Oliver
ffda700244
Improve unit conversion (#5658)
- In previous implementation, could not have a value "10k" for a unit of "m"
- Now, correct result is obtained (10k [m] = 10[km])
- Still passes all previous unit tests
- Simpler code, too
2023-10-04 17:28:20 +11:00
Oliver
78905a45c7
Plugin missing fix (#5653)
* Add 'is_installed' property to PluginConfig model

- Allow us to show users which plugins are "outdated"

* Cleanup plugin table

- Display clearly if a plugin is no longer installed

* Fixes for plugin table

* Revert change due to failing CI
2023-10-03 19:44:10 +11:00
Oliver
88314da7b3
Fix for plugin installation via web interface (#5646)
* Fix for plugin installation via web interface

- Previous implementation did not correctly catch error output
- Refactored into new file plugin.installer.py
- Provides better "output" when plugin does install correctly

* Remove unnecessary debug output

* Update unit test

* Remove placeholder code
2023-10-03 18:47:55 +11:00
Oliver
352fb4f6ff
Allow plugin list to be filtered by "sample" or "builtin" status (#5647) 2023-10-03 10:39:24 +11:00
Oliver
324d5929b5
Primary address fix (#5592)
* Improve management of primary address for a company

- Simplify approach (remove "confirm_primary" field)
- Remove @receiver hook
- Move all logic into Address.save() method

* Make address primary if it is the only one defined for a company

* Update frontend table

* Fix saving logic

* Actually fix it this time

* Fix for unit test

* Another test fix
2023-09-23 10:14:59 +10:00
Oliver
17d227443d
Copy notes (#5546)
* Add option to copy notes when duplicating a part

* Update front-end forms
2023-09-15 14:52:47 +10:00
Oliver
1e55fc8b6d
Issued by filter (#5515)
* Construct dynamic user filter for issued-by

* Allow "build order" table to be filtered by "issued_by" field

* Bump API version

* Fix API version
2023-09-08 09:10:42 +10:00
Oliver
218618aa93
Paginate notifications on the server (#5503) 2023-09-05 13:00:50 +10:00
Oliver
dce565b4a3
Fix build output unallocate button (#5426) 2023-08-11 10:11:06 +10:00
Oliver
86ca0b27a4
Purchase history graph fix (#5421)
* Fix debug messages

* Fix bug in purchase history chart

- Use new pack_quantity_native attribute
2023-08-10 14:24:59 +10:00
Oliver
a1d2782137
Add optional "description" column to SalesOrderLineItem table (#5419)
- Provides more visibility for part information
2023-08-10 13:00:55 +10:00
Oliver
62362455b8
Sales order variant stock (#5415)
* Annotate available variant stock to SalesOrderLine serializer

* Filter variant stock by:

- active = True
- salable = True

* Add 'salable' filter to StockList API

* Filter available stock in sales order table:

- Must be salable
- Must be active

* Update table display

* Bump API version
2023-08-09 21:45:12 +10:00
Oliver
c39ae80a13
Improve sorting of part column for BOM table (#5386) 2023-08-02 17:37:00 +10:00
Oliver
7394ddae33
Build output table sort (#5380)
* Implement sorting for "build output" column in build output table

* Implement sorting for the "required tests" column

* use isNan
2023-08-01 12:52:36 +10:00
Miklós Márton
25334c0d91
Fix selecting the default stock item template (#5318) 2023-07-23 19:42:56 +10:00
Miklós Márton
feeccc5c91
Fix selecting default label template (#5317) 2023-07-23 17:09:41 +10:00
Oliver
f70294b247
Stock installed table fix (#5305)
* Prevent installed items from being hidden

* Fix parent / child relationship
2023-07-21 23:53:58 +10:00
Miklós Márton
6b4717cb28
Show built in label printing plugin even if the external plugins are disabled (#5304) 2023-07-21 21:55:51 +10:00
Oliver
e8d16298a4
Label plugin refactor (#5251)
* Add skeleton for builtin label printing plugin

* Force selection of plugin when printing labels

* Enhance LabelPrintingMixin class

- Add render_to_pdf method
- Add render_to_html method

* Enhance plugin mixin

- Add class attribute to select blocking or non-blocking printing
- Add render_to_png method
- Add default method for printing multiple labels
- Add method for offloding print job

* Simplify print_label background function

- All arguments now handled by specific plugin

* Simplify label printing API

- Simply pass data to the particular plugin
- Check result type
- Return result

* Updated sample plugin

* Working on client side code

* Cleanup

* Update sample plugin

* Add new model type

- LabelOutput model
- Stores generated label file to the database
- Makes available for download

* Update label printing plugin mixin

* Add background task to remove any old label outputs

* Open file if response contains filename

* Remove "default printer" option which does not specify a plugin

* Delete old labels after 5 days

* Remove debug statements

* Update API version

* Changed default behaviour to background printing

* Update label plugin mixin docs

* Provide default printer if none provided (legacy)

* Update unit test

* unit test updates

* Further fixes for unit tests

* unit test updates
2023-07-17 21:39:53 +10:00
Oliver
bd1689095d
fix typo (#5236) 2023-07-13 10:30:19 +10:00
Oliver
b3dcc28bd9
Add missing callback for attachment delete button (#5219) 2023-07-11 10:29:33 +10:00
Oliver
8fb7612894
Fix link to SalesOrder in stock history table (#5210) 2023-07-10 13:13:35 +10:00
Oliver
773dd3b210
Fix quantity aggregation for stock table (#5188)
* Fix quantity aggregation for stock table

- Stock quantity can only be added together if units are the same

* Add stock total footer to part table
2023-07-06 12:54:05 +10:00
Oliver
2d2a084866
Shorten string fix (#5187)
* Fix for model renderer code

- Handles string shortening without corrupting HTML

* Fix for BOM table
2023-07-06 12:37:40 +10:00
Oliver
9abcc0ec34
Param fix (#5183)
* Handle AttributeError in convert_physical_value

* Added new unit test
2023-07-06 11:02:18 +10:00
Oliver
831693e941
Stocktake external (#5182)
* Add 'location' filtering option for part.stock_entries

* Add "exclude_external" field to stocktake report

* Add "stocktake_exclude_external" default option

* Implement setting to exclude external stock

* Split stocktake functionality out into separate file

* Change name of internal setting

* Refactoring

* Add 'exclude_external' field to stocktake form
2023-07-05 22:53:44 +10:00
Oliver
17c2070503
Order table improvements (#5151)
- prevent "double loading" of order tables
2023-07-04 16:20:03 +10:00
Oliver
5f61b5f120
Rendering fix for build allocation table (#5145)
- Fix link to part
- Fix link to stock item
2023-07-04 13:30:26 +10:00
Oliver
752fb97d2f
Transfer stock location (#5117)
* Hide info messages if no data

* pre-fill location when transferring stock

* Change iteration variable

* Measure twice, cut once

* js improvements
2023-06-28 21:59:47 +10:00
Oliver
a78b26f93a
Child items table (#5114)
* Template cleanup

- Remove "buttons" attribute (outdated)

* Fix filters for "child stock items" table

* Fix 'ancestor' stock filter
2023-06-28 15:22:23 +10:00
Oliver
53e120cdb3
Fix for index page badge (#5115)
- If table was not paginated, totalRows did not exist
- Handle this case by looking at length of actual data
2023-06-28 15:22:08 +10:00
Oliver
8b6abe1505
Fix for stock status change (#5105)
- Recent refactor introduced bug
- Update stock.js
2023-06-26 12:14:44 +10:00
Oliver
693d24b4b6
Table filters refactor (#5086)
- Fix a couple of bugs
- Code cleanup
2023-06-22 10:29:14 +10:00
Oliver
09cc654530
Required for order fix (#5077)
* Fix part tables on index page

- Stop table filters overriding each other

* Refactor "needed for build" table

- Now shows amount actually needed

* Fix typo

* js fix

* linting

* Fix warning messages on index page

* js linting
2023-06-20 12:39:18 +10:00
Oliver
4c9d4add2c
Table custom buttons (#5075)
* Add generic implementation for barcode actions

- Commonize code against tables
- Cleaner UI
- Better code
- Will make future react refactor easier

* Add permissions.js

- Separate .js file for dynamically checking permissions

* Update stock table to use client-side actions

* API endpoint for bulk category adjustment

* Bug fix for purchase_order.js

- Prevent some really strange API calls

* Refactor actions for part table

- Now done dynamically

* Refactor actions for the attachment tables

* Refactor actions for build output table

* Increment API version

* Cleanup janky button

* Refactor supplier part table

* Refactor manufacturer part table

* Remove linkButtonsToSelection

- no longer needed
- Cleanup, yay!

* Cleanup purchase order line table

* Refactor BOM table buttons

* JS linting

* Further cleanup

* Template cleanup

- remove extra div elements

* js linting

* js fix
2023-06-20 07:45:35 +10:00