On 05/09/13 19:33 +0200, Guillem Barba Domingo wrote:
> El 05/09/2013 16:21, "Cédric Krier" <[email protected]> va escriure:
> >
> > On 05/09/13 15:00 +0200, Guillem Barba Domingo wrote:
> > >
> > > 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
> >
> > 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.
> 
> The field could be filled in by on_change of product_id

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.

-- 
Cédric Krier

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

Attachment: pgpsnbq_AKBaK.pgp
Description: PGP signature

Reply via email to