In our Odoo installation, we track serial numbers. So when we create an order, the system automatically assigns a serial number to each device ordered. So for example, for order S001that has an line corresponding to an order for a device, the system it may assign serial number 12345 to that device. After that happens though, there is another sales order S002 where that same device is being ordered . This order is of higher priority and if there are no more stocks what we will do is unreserve the device in sales order S001 so that now we can use that device with that serial number (12345) to sales order number S002.
Unfortunately, when a new stock arrives with serial number 67890, that serial number is not automatically assigned to sales order number S001. So if a new sales order is created, let's say S007, and the same device is ordered, the system will automatically assign that serial number (67890) to the new sales order S007.
We would prefer that the system automatically assigned (reserved) the new device with serial number 67890 to sales order number S001.
What's the best way to do this?