A Divendres, 27 de gener de 2012 10:12:17, Cédric Krier va escriure: > > I agree it gives a bad UX. At the same time, I must admit that when > > working with serial numbers, splitting the lines can also be > > cumbersome. We've got a customer that can create a production of more > > than a thousand units and that creates shippments with a large number of > > lines. > > You will still have thousand of lot lines. So still the same issue.
Sure, but it's not exactly the same. Let's say you have to ship, 500 hundred units of each products A, B and C. All of them use serial numbers. With a lot per stock move you have a shipping with 1.500 lines and so there is no way you know you're actually shipping 500 units of A, 500 of B, and 500 of C. At most you're informed that there are 1.500 lines in the shippment. With sharoon's approach you've got three lines which clearly describe what you're sending. > > So if we found a good way of managing it, maybe Sharoon's idea would not > > be so bad. > > I don't think there is a good way. More over it is also about DB design > an this is also bad because you have duplication of information > quantity = sum(lot quantity) Yes. At the same time, I don't know if this could somehow help in the cache issue you were discussing with Bertrand. Maybe doing another cache at stock.move.lot level independent from stock.move? > > One idea would be to have two One2Many widgets in the shippment and once > > the user selects a stock.move line the second One2Many field is filled > > in with all related lots? > > Looks like the board communication but having it at the form level will > break the behavior concept of Model for the on_change(_with) and states. I think having something like that in the form view could be very useful in other cases. It would allow, for example, to design current import and export dialogs with simple forms. For example, you can have a One2Many field with the list of all fields in the database. When you double-click on one of them, the selected item triggers an on-change and the field is added to a second One2Many where all selected items are added. We've also found several other circumstances in the past in which we would have used that feature. -- Albert Cervera i Areny http://www.NaN-tic.com Tel: +34 93 553 18 03 http://twitter.com/albertnan http://www.nan-tic.com/blog -- [email protected] mailing list
