Skip to content

Commit

Permalink
limit panel visibility to purchasable parts
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeoLacruz committed Apr 25, 2024
1 parent 35e8de5 commit 9f88b56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Place here your Mouser key for manipulating shopping carts. You find it in your
This is the client ID and the client secret that has been generated in the Digkey API admin WEB portal.
Copy it from there to the InvenTree settings.

### Digikey token and Digikey refrech token
### Digikey token and Digikey refresh token
These fields are filled automatically. The Digikey API requires two tokens with different life times.
Please refer to the Digikey section for more information.

Expand Down
3 changes: 2 additions & 1 deletion inventree_supplier_panel/supplier_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def get_custom_panels(self, view, request):
show_panel = False
for s in self.registered_suppliers:
show_panel = show_panel or self.registered_suppliers[s]['is_registered']
if has_permission and show_panel:
part = view.get_object()
if has_permission and show_panel and part.purchaseable:
panels.append({
'title': 'Automatic Supplier parts',
'icon': 'fa-user',
Expand Down

0 comments on commit 9f88b56

Please sign in to comment.