Skip to content

Comments

[18.0][IMP] rma: Improve delivery_picking_count (include next transfers)#532

Open
victoralmau wants to merge 1 commit intoOCA:18.0from
Tecnativa:18.0-imp-rma-delivery_picking_count
Open

[18.0][IMP] rma: Improve delivery_picking_count (include next transfers)#532
victoralmau wants to merge 1 commit intoOCA:18.0from
Tecnativa:18.0-imp-rma-delivery_picking_count

Conversation

@victoralmau
Copy link
Member

@victoralmau victoralmau commented Feb 5, 2026

Improve delivery_picking_count (include next transfers)

Please @pedrobaeza and @carlos-lopez-tecnativa can you review it?

@Tecnativa TT60705

@OCA-git-bot
Copy link
Contributor

Hi @pedrobaeza, @chienandalu,
some modules you are maintaining are being modified, check this out!

@victoralmau victoralmau force-pushed the 18.0-imp-rma-delivery_picking_count branch from 4da3a78 to 10df41e Compare February 5, 2026 09:51
@victoralmau victoralmau marked this pull request as ready for review February 5, 2026 10:34
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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants