Panel plugin for Mouser to create a shopping cart from a PO #4694
Replies: 8 comments 5 replies
-
@SergeoLacruz I really like what you have done here! In future I would like to provide some of this functionality in a generic fashion - there is some stuff in the works here. It should be quite straight-forward to determine the supplier ID from the PurchaseOrderDetail page: SETTINGS = {
...,
{
'MOUSER_PK': {
'name': 'Mouser Supplier ID',
'description': 'Primary key of the Mouser supplier',
'model': 'company.company',
}
}
}
def get_custom_panels(self, view, request):
panels = []
# Extract ID for Mouser supplier
mouser_pk = int(self.get_setting('MOUSER_PK'))
# Only display this panel for orders from "Mouser"
if isinstance(view, PurchaseOrderDetail):
order = instance.get_object()
if order.supplier.pk == mouser_pk:
panels.append({
'title': 'Mouser Actions',
'icon': 'fa-user',
'content_template': 'supplier_panel/mouser.html',
})
return panels |
Beta Was this translation helpful? Give feedback.
-
Very nice plugin, keep up the great work!! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the hint. That's really easy. I pushed an update :-) |
Beta Was this translation helpful? Give feedback.
-
This is a really cool idea for a plugin. But I'm not sure what the scope of your plugin is. Are you planning to extend this to other suppliers as well as your generic title indicates? (Btw, your description contains a spelling mistake - chopping cart) |
Beta Was this translation helpful? Give feedback.
-
Fixwd. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Looks very nice Michael! |
Beta Was this translation helpful? Give feedback.
-
I did some additions to the plugin. The error handling of Mouser requests is improved. You can see now if there are problems with a spesicif part in our PO e.g. SKU not available. |
Beta Was this translation helpful? Give feedback.
-
I finished the Digikey integration and added the doku for it. Setting it up is a bit more complicated. It works at least in my environment. If anybody likes to try it, you are welcome. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I created a plugin that allows to transfer an InvenTree PO into a mouser shopping cart. The plugin is ready to be used. Anyhow there are things I'd like to impove in the near future. Some Ideas are at the end of the docs. Has anyone an idea how to come from the purchaseorderdetailview to the supplier in an easy way?
If you like have a look and send feedback. the code is here:
https://github.com/SergeoLacruz/inventree-supplier-panel
Michael
Beta Was this translation helpful? Give feedback.
All reactions