Skip to content

Conversation

@TDu
Copy link
Member

@TDu TDu commented Nov 10, 2025

Before this change when searching for a device to use for the batch, the order of the devices was not guaranteed although important. And it could cause some batch split not happening.

Now the possible devices will be sorted by their default order, which is by sequence and name.

@OCA-git-bot
Copy link
Contributor

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

@simahawk
Copy link
Contributor

no need to update tests?

Before this change when searching for a device to use for the batch,
the order of the devices was not guaranteed although important.
And it could cause some batch split not happening.

Now the possible devices will be sorted by their default order, which is
by sequence and name.
@TDu TDu force-pushed the 18-stock-picking-batch-creation-force-device-order branch from 305181b to d469448 Compare November 11, 2025 12:08
@TDu
Copy link
Member Author

TDu commented Nov 11, 2025

no need to update tests?

I have added 2 in relation to the changes


def _split_first_picking_for_limit(self, picking):
last_device = self.stock_device_type_ids[-1]
last_device = self.stock_device_type_ids.sorted()[-1]
Copy link
Contributor

Choose a reason for hiding this comment

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

We could use a method to get the list of devices in order to centralize the required logic to ensure the right order etc...

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.

4 participants