"Use supplier's 'on demand'" is not represented in the inventory page.
A variant override may have any of these three values for "on demand":
nil - Use the supplier's settingtrue - Override the supplier's setting with truefalse - Override the supplier's setting with falseAfter an inventory item has been added:
nil setting. This is displayed as an unticked checkbox.false.There are two problems here:
nil and false - both are represented by an unticked checkbox.nil.nil or false.nil.User cannot.
Signed in as producer:
Signed in as the distributor:
nil "on demand" - Using: supplier setting of "on demand" (true)true "on demand" - Using: VO setting of "on demand" (true)false "on demand" - Using: VO setting of "on demand" (false), supplier setting of "count on hand" (0)This demonstrates that the unticked checkbox in 5 and 7 are different. And, there is no way to go back to scenario 5.
Related to https://github.com/openfoodfoundation/openfoodnetwork/issues/3058.
bug-s2
We could have the checkbox to a SELECT field with three options:
nil - "Use producer setting"true - "On Demand"false - "Limited Stock"I thought we could make this more simple and say it can never be nil, ie., hub cannot use the producer setting? But I believe it's a valid feature we shouldnt kill: hub wants to use producer on_demand setting (use farmers stock config) but still override the price for example.
@luisramos0 Yes, I think it's a valid and used feature. For example, the variant in #3058 was supposed to have nil "on demand".
Of course we need to keep the nil option, it's the most use, mostly people will override price but not stock producer info.
I guess the value by default will be nil, by default the inventory use producer setting. So the dropdown menu will not even have the "select" option and then has to choose, by default it's on nil and then you can change if you want.
Given Slack discussion on bug channel, we need to move that forward as today, the workaround implies that if in today the producer says in its catalog there is no more product, as we have forced "on demand" in inventory product will remain in shop... with pretty bad consequences for the hub commercial activity.
So we keep this one as s2 bug.
As a reminder after we have done this one we need to check if ok not to move forward on https://github.com/openfoodfoundation/openfoodnetwork/issues/3067 and https://github.com/openfoodfoundation/openfoodnetwork/issues/3068 for now. The three issues were related to bug #3058
Yes, I think we can leave #3067 and #3068 for later. Thanks for updating the tags of those issues, @myriamboure.
After the initial review of PR #3104, I realized we don't need to add more terms to our vocabulary. Instead of the original proposal to use "Use producer settings", "On demand", and "Limited stock", how about we just use:
We already have the "On Demand" column heading to let us know what this field is about.
@myriamboure @luisramos0 @Matt-Yorkley
my favorite option would not include a blank entry (could be misleading for the user). I'd have 3 options: "Use producer settings", "Yes", and "No"
I think "Use producer settings" is much nicer than a blank option.
Thanks! "Use producer settings", "Yes", and "No" look nice together. :slightly_smiling_face: I'll update the PR.
For info the original issue has happened again on our user who has 15 shops, some products appear in no shop, we have to fix manually by going in each of the 15 inventories and forcing on demand... hope we can fix that quickly, it is very unstable...
@kristinalim @Matt-Yorkley the work that Kristina is doing on this is probably impacting product import... the values to put in csv to import in producer catalog or inventory (especially inventory) might change for on demand column for instance. We need to remember that and probably open a separate issue to take it into account as soon as this fix is ready.
Most helpful comment
my favorite option would not include a blank entry (could be misleading for the user). I'd have 3 options: "Use producer settings", "Yes", and "No"