sparkmicro / Ki-nTree

Fast part creation for KiCad and InvenTree
GNU General Public License v3.0
171 stars 31 forks source link

Creating parts/stock items in inventree from Ki-nTree creates part with off by one quantity #235

Open timmyhadwen opened 3 weeks ago

timmyhadwen commented 3 weeks ago

What i did:

What happens:

Create part A with quantity 1 - creates part A with quantity 1 Create part B with quantity 2 - creates part B with quantity 1 Create part C with quantity 3 - creates part C with quantity 2 etc...

eeintech commented 2 weeks ago

@timmyhadwen Ummm will need to reproduce and fix this, thanks for reporting it!

T0jan commented 2 weeks ago

I can confirm this on Windows and Linux. There seems to be a problem with updating the value while the user is entering it. If you enter a value, switch to the Create view and create a part the stock number will be set to whatever was set before in the Stock Quantity. If you enter a value, switch to any other view, switch back to the InvenTree view and then create the part afterwards the correct quantity is set. It seems like the corresponding background variable is only updated when entering the view, not while exiting or changing the value.

T0jan commented 2 weeks ago

And it was as expected, some callbacks were missing, fix is ready: #237