2013/9/5 Cédric Krier <[email protected]>

> On 04/09/13 17:48 +0200, Guillem Barba Domingo wrote:
> > 2013/9/4 Nick Heylen <[email protected]>
> >
> > > If I create a new inventory and use the 'complete inventory' button I
> get
> > > a list off all products on the location and when I set the quantity to
> a
> > > certain value the stock quantity gets updated to that value.
> > >
> > > But if I do not use the 'complete inventory' button and add a single
> > > reccord and set the quantity of that product to a certain value the
> stock
> > > does not gets updated to that value but the value gets added to the
> current
> > > stock. Not what I expected.
> > >
> > > Is this intended? If so how can I set the stock of a single product to
> a
> > > certain value? I don't want to force the user into an uneeded long
> list of
> > > simillar products when he needs to update just one product?
> > >
> >
> > I already found this issue. It was pending to comment with my partners
> > before to submit the bug.
> > So, for me, it should be changed to allow to inventory some products
> > independently.
>
> The inventory was design to be used exclusivly with the "complete
> inventory" to compute the expected quantity because it works with delta.
> So now, if the expected quantity is not computed (manually added), it
> makes a delta with 0 (default value that should be removed).
> Normally this patch will fix it: http://codereview.tryton.org/230004/
> But I'm not sure if the design is right because somehow it change the
> expected quantity into a Function field.
>


I think the best solution is to convert expected quantity to a Function
field because:
- you ensure the final stock is the quantity you put (what I think is the
expected behaviour of an inventory) giving *always* the current expected
quantity
- you can create a complete inventory or only an inventory for a few
products

If we want a history of the "expected quantity" before the inventory, we
can add a field, readonly and visible only when the inventory is done, with
the *historical expected quantity*.

Reply via email to