Odoo 20 moves is_storable from the stock module to the product module, and renames the compute method to _compute_is_storable.The field name stays the same, but its ownership and the method name have changed, so override points must be updated.
Scene
Custom developments often inherit product.template in the stock module, override the computation that tracks inventory, or use is_storable to filter and build dashboards. Once the ownership or method name changes, the override no longer applies after an upgrade.
How it looks in Odoo 19
In 19, both the field and the compute method are in the stock module, compute points to compute_is_storable, and the method has no underscore prefix.
# Odoo 19 · stock/models/product.py
is_storable = fields.Boolean(
'Track Inventory', store=True, compute='compute_is_storable', readonly=False,
default=False, precompute=True, tracking=True, help='A storable product is a product for which you manage stock.')
@api.depends('type')
def compute_is_storable(self):
self.filtered(lambda t: t.type != 'consu' and t.is_storable).is_storable = FalseHow it looks in Odoo 20
In 20, the field has moved to the product module and the method is renamed to _compute_is_storable, so modules that depend only on product can use it directly.
# Odoo 20 · product/models/product_template.py
is_storable = fields.Boolean(
'Track Inventory', store=True, compute='_compute_is_storable', readonly=False,
default=False, precompute=True, tracking=True,
help='A storable product is a product for which you manage stock.')
@api.depends('type')
def _compute_is_storable(self):
self.filtered(lambda t: t.type != 'consu' and t.is_storable).is_storable = FalseMigration checklist
- Change inheritance that overrides
compute_is_storableto_compute_is_storable. - Modules that depend only on product can use
is_storabledirectly, with no need to depend on stock. - The
is_storablefield name in search domains and views is unchanged, so no changes are needed. - Run migration scripts that filter by
is_storableafter stock is installed. - Regression-test the track inventory product computation and dashboards.
Summary
Module ownership has moved down a layer and the method has been renamed, while the field name remains stable. The key point is that override points and dependency declarations must be adjusted accordingly.
