[18.0][IMP] rma: Improve delivery_picking_count (include next transfers)#532
[18.0][IMP] rma: Improve delivery_picking_count (include next transfers)#532victoralmau wants to merge 1 commit intoOCA:18.0from
Conversation
|
Hi @pedrobaeza, @chienandalu, |
4da3a78 to
10df41e
Compare
| for rma in self: | ||
| rma.delivery_picking_count = len(rma.delivery_move_ids.picking_id) | ||
| moves = rma.delivery_move_ids | ||
| moves += moves.move_dest_ids |
There was a problem hiding this comment.
What happens if you have more delivery steps? This code only works for up to two steps, but what if you configure the route or the warehouse with more steps?
I think this could be recursive to get the move_dest_ids by using this function _rollup_move_dests . What do you think?
There was a problem hiding this comment.
It returns OrderedSet(), so you would have to do some work after the call; I don't see any module that does that.
Another possible approach (I didn't want to prepare it and open up a rather “complex” debate) would be to use all the movements from the same procurement.group by defining an rma_id field, but that change would be much more complex.
Improve
delivery_picking_count(include next transfers)Please @pedrobaeza and @carlos-lopez-tecnativa can you review it?
@Tecnativa TT60705