inventory question

96 views
Skip to first unread message

Nick Heylen

unread,
Sep 4, 2013, 3:45:06 AM9/4/13
to try...@googlegroups.com
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?

Thanks,

Nick

Guillem Barba Domingo

unread,
Sep 4, 2013, 11:48:11 AM9/4/13
to try...@googlegroups.com
2013/9/4 Nick Heylen <nick.zn....@gmail.com>
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.

Cédric Krier

unread,
Sep 5, 2013, 4:53:21 AM9/5/13
to try...@googlegroups.com
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.

--
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: cedric...@b2ck.com
Website: http://www.b2ck.com/

Guillem Barba Domingo

unread,
Sep 5, 2013, 9:00:32 AM9/5/13
to try...@googlegroups.com
2013/9/5 Cédric Krier <cedric...@b2ck.com>
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.

Cédric Krier

unread,
Sep 5, 2013, 10:21:05 AM9/5/13
to try...@googlegroups.com
> expected behaviour of an inventory) giving *always* the current expected
> quantity

No this is wrong. It can happens a lot of time between when you start to
work on the inventory and when you fill it and when you confirm it.
I could also have case where the inventory was counted some days ago and
fill only now but the delta must be computed base on the day it was
counted.
Having a function field is in no way a good solution.

Guillem Barba Domingo

unread,
Sep 5, 2013, 1:33:45 PM9/5/13
to try...@googlegroups.com


El 05/09/2013 16:21, "Cédric Krier" <cedric...@b2ck.com> va escriure:

The field could be filled in by on_change of product_id

Cédric Krier

unread,
Sep 5, 2013, 7:10:29 PM9/5/13
to try...@googlegroups.com
Yes but I was also thinking to keep it with None (and remove the
required) and compute it on validation. This will prevent to have to
compute products_by_location for each lines added and instead compute it
once for the set of product.
Reply all
Reply to author
Forward
0 new messages