Sunsetting inventory - key steps

@BethanOFN we are discussing process here Product price changes after editing cart · Issue #13885 · openfoodfoundation/openfoodnetwork · GitHub

1 Like

Brilliant, thank you!

Sorry @Rachel , think I may have uncovered another big barrier to sunsetting inventory for existing variant tag users. I was encouraging users to test out variant tags now the feature was live, and users flagged they couldn’t get it to work when creating a linked variant, adding tags etc, even with tag rules correctly set up.

User need:

As a hub, I take custom orders from customers which require me to create tagged variants only those customers can see. This means I tag customers, tag a variant, and set up my own tag rules to show/hide these custom variants. Formerly, I did this using Inventory. I would create a variant belonging to a producer (requiring me to have edit products permission), add it to my inventory (add to inventory permission) and add the tag there. When the customer ordered that variant, the Order Cycle Supplier Totals report/Pay Your Suppliers report would show that I needed to pay the producer for that variant, because they supplied it.

Problem:

Under the new iteration of linked variants, for tag rules to work, the variant must be owned by the enterprise with the tag rule for said tag rule to function. This means that I can’t create a linked variant from my producer’s variant and show/hide it for my custom order based on my tag rules, whilst also still ‘paying’ (owing, according to reports) the money for that variant to the original producer. See below

  1. When a hub creates a linked variant from a producer’s product, this defaults to being owned by the original variant producer, e.g. Test Producer 3:

  2. As the hub, if I want to show/hide a variant using a tag rule, under the current logic I therefore have to change the producer variant to my own hub in order for my hub’s tag rules to function, e.g. Test Hub below:

  3. What this means is that if I as the hub sell one of each Apples variant, the money for one would be due to Test Producer 3, and the money for the other would be due to Test Hub according to our reports:

Does that make sense? For now I’m therefore having to put new users manually onto the inventory feature to get them this functionality (they are new members of the UK Flower Growers Collective, for whom I’d advised the original members on the tag solution based on their requirements)

@BethanOFN apologies you had to find this out with a user :frowning:

We are currently analyzing what it means to have hub owning the linked variants from a technical perspective. From a product perspective, it seems the correct move forward to enable tags rules to work, but also for hubs to have the ability to add the linked variants to order cycle for other enterprises they own.

I should have documented on discourse why linked variants are still in beta and they are not done yet.

We should choose the solution this week or the next one, I will give a more detailed answer as soon as I have all the elements!

Note that if we choose to move ownership, there should be enough budget on the project to do it in the coming weeks.

1 Like

Is there any plan for stock reset to be included in upcoming development at all, or is that a feature we’re completely retiring?

@BethanOFN for now no upcoming development is funded :frowning:

But I can see this easily added as a bulk action, once bulk action are available on admin/products.

Regarding the option in inventory, I’ve always struggled to make it work. Maybe we need also a better way to define the default stock?