Thursday, September 3, 2026
1 change · saas-19.1
Enhancements to existing features
Rental stock calculations now reuse an existing shared rule for identifying products currently rented. This makes it easier for future extensions or custom modules to adjust rental quantity behavior consistently without duplicating logic.
Original PR description
There is already an existing hook on product.product ([sale_renting.models.product_product.ProductProduct._get_qty_in_rent_domain](https://github.com/acsone/enterprise/blob/2cd105c93bb7199a5ecea67a919a7ab5d9251cbf/sale_renting/models/product_product.py#L24)), use it to get the domain, so it can be inherited by other modules.
While the upstream method uses `('product_id', 'in', self.ids)` instead of this one's `('product_id', '=', self.id)`, this isn't an issue since there's a `self.ensure_one()` just above.
Forward-Port-Of: odoo/enterprise#129191