Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to filter stock by "in_stock" #376

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions assets/release_notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### -
---

- Improved filters for stock list

### 0.12.2 - June 2023
---

Expand All @@ -7,6 +12,7 @@
- Bug fix for scrolling long lists

### 0.12.1 - May 2023
---

- Fixes bug in purchase order form

Expand Down
1 change: 0 additions & 1 deletion lib/inventree/stock.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ class InvenTreeStockItem extends InvenTreeModel {
"part_detail": "true",
"location_detail": "true",
"supplier_detail": "true",
"in_stock": "true",
};
}

Expand Down
1 change: 1 addition & 0 deletions lib/widget/part_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class _PaginatedPartListState extends PaginatedSearchState<PaginatedPartList> {
"active": {
"label": L10().filterActive,
"help_text": L10().filterActiveDetail,
"tristate": true,
},
"assembly": {
"label": L10().filterAssembly,
Expand Down
6 changes: 6 additions & 0 deletions lib/widget/stock_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ class _PaginatedStockItemListState extends PaginatedSearchState<PaginatedStockIt

@override
Map<String, Map<String, dynamic>> get filterOptions => {
"in_stock": {
"default": true,
"label": L10().filterInStock,
"help_text": L10().filterInStockDetail,
"tristate": true,
},
"cascade": {
"default": false,
"label": L10().includeSublocations,
Expand Down