You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this the correct behavior, or should it actually be removing tracking of inventory on the assembly's master? I don't understand why we would want to turn tracking off for the part's master, because it could also be individually sold and need its own tracking. The guard means it will only occur for parts that have multiple variants, so it seems the intent was to turn off tracking on the part, I just don't understand why and thought I'd see if someone more knowledgeable with the project could look at this to see if this is the correct behavior.
The text was updated successfully, but these errors were encountered:
I've run across this issue again in some work I'm doing. From what I've seen, undoing this step causes issues with the AvailabilityValidator since the inventory units are pulled for the master variant when a deferred variant selection is present. It basically fails to validate as a result, so we need to keep this in place. I'm going to look into the availability validator to figure out why it is validating inventory units that contain the master variant instead of the "deferred selection" for those products. If we can fix that, I believe this step of turning off inventory tracking on the master will be unnecessary.
In assemblies_part.rb, there is a after_create callback that disables inventory tracking for the master of the part.
https://github.com/spree-contrib/spree-product-assembly/blame/master/app/models/spree/assemblies_part.rb#L27
Is this the correct behavior, or should it actually be removing tracking of inventory on the assembly's master? I don't understand why we would want to turn tracking off for the part's master, because it could also be individually sold and need its own tracking. The guard means it will only occur for parts that have multiple variants, so it seems the intent was to turn off tracking on the part, I just don't understand why and thought I'd see if someone more knowledgeable with the project could look at this to see if this is the correct behavior.
The text was updated successfully, but these errors were encountered: