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

[WIP]Add support for part query from TME #115

Closed
wants to merge 1 commit into from

Conversation

martonmiklos
Copy link
Contributor

@martonmiklos martonmiklos commented Jan 5, 2023

@eeintech
in the #87 this topic came up and I would rather continue the discussion here to prevent off-topic:

@martonmiklos What is TME? Happy to discuss it +1

TME is a polish supplier company for electrical parts. They have a quite comprehensive json based API.

The thing what I wanted to discuss (and why I started to work on the category selection) is the fact that they have a quite usable and localized! category tree which could be accessed via their API (~1500 categories).

For new InvenTree users (like me) it could be a reasonable action to pull their category tree.

I have implemented it in a dumb manner: I added a button to the TME settings, it retrieve the category tree and create all categories:
kép

During the process it blocks the UI at the moment.
What do you think about including this feature into Ki-n-tree?

As this feature for me was a one-shot thing I can remove it from the PR.
If you have willing to accept it I would like to sophisticate it with a messagebox saying something like:

This operation is going to copy the TME category tree into the InvenTree.
This means it going to create ~1500 or more categories, which is likely going to take long time.
The UI might be frozen during the operation, do you want to continue?

@eeintech
Copy link
Contributor

eeintech commented Jan 5, 2023

Oh I see what "TME" means now, I'm okay adding another supplier.
I was actually thinking that the supplier side of things is not really re-usable... should have created classes instead.
It works for now but it's not clean code. Anyway, for another day.

I understand the idea behind the create categories button, I will have to think about it as not everybody wants to setup their database the way we do, I am leaning towards not worrying about setting it up and leave this up to the users. However the really important part is to pull/sync all the categories from InvenTree and not rely on static/manual setup for adding parts.
My thinking was to add a "Update Categories" button actually to trigger the sync manually and hang the GUI every single time a part is added (categories are not things that change much over time).

@eeintech
Copy link
Contributor

@martonmiklos I'm currently working on 1.0.0 release. I think 0.6.6 will be the last release with the current UI, while 1.0.0 will feature a complete new UI made with Flet.
Would you mind waiting for the switch then re-implementing it in the new UI? Sorry about this, and if I made you waste your time 😟

@eeintech eeintech closed this Feb 16, 2023
@martonmiklos
Copy link
Contributor Author

a complete new UI made with Flet. Would you mind waiting for the switch then re-implementing it in the new UI?

Ah I wanted to bitching about replacing pysimpleui with PyQt before (I found the pysimpleui very problematic for more complex UI things). Anyway I will take a look on this Flet and get back. I have to admit that I am lacking of free time nowadays which negatively affect my contributions around InvenTree...

@eeintech
Copy link
Contributor

eeintech commented Feb 16, 2023

No problem, after trying Flet I'm not going back to PySimpleGUI that's for sure, this is soooo much better for building desktop/mobile apps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants