Asset Bundles in Odoo

Odoo's front-end assets are organised into bundles. What asset bundles are and why they matter.

Odoo's front end uses assets, the styling and the front-end code that make the interface. Those are organised into bundles. This piece is about asset bundles in Odoo.

What front-end assets are

Odoo's front end, the part of Odoo the user sees and interacts with in the browser, is made, in part, of assets: the styling that gives the interface its look, and the front-end code that gives it its behaviour. These assets have to be delivered to the browser for the front end to genuinely work. Asset bundles are how Odoo organises and delivers them.

What an asset bundle is

An asset bundle, in Odoo, is an organised collection of front-end assets. Rather than the front-end assets being a loose scatter, they are organised into bundles, defined collections of assets that are delivered together. The asset bundle is, in essence, how Odoo groups and manages the front-end assets, so the styling and front-end code are organised and delivered in a managed way.

Why asset bundles matter

Asset bundles matter because the organised delivery of front-end assets affects how the front end is delivered and, ultimately, how it performs. Front-end assets organised into bundles and delivered in a managed way are delivered more efficiently than a loose scatter of assets would be. So asset bundles are part of how Odoo's front end is delivered well. A developer doing front-end development, who adds front-end assets, styling, front-end code, works with asset bundles, adding the assets to the bundles, so they are part of the organised, managed delivery.

Asset bundles and adding front-end assets

The practical point for a developer is that, when development adds front-end assets, styling for a custom front-end thing, custom front-end code, those assets have to be put into the asset bundles, so they are genuinely delivered to the front end as part of the managed delivery. A developer adding front-end assets works with the asset bundles to do so. Getting this right is part of front-end development genuinely working: the custom front-end assets are delivered because they are properly part of the bundles.

Work with the framework

Asset bundles are part of how Odoo's framework organises and delivers the front end, and a developer should work with them the Odoo way, adding assets to the bundles as Odoo intends, in keeping with how the framework organises front-end delivery. This is the recurring principle: work with the framework's structure, here the structure of how front-end assets are organised, rather than against it.

The takeaway

Asset bundles in Odoo are organised collections of front-end assets, the styling and front-end code that make the interface, grouped into defined bundles delivered together. They matter because organised, managed delivery of front-end assets through bundles is how Odoo's front end is delivered well, more efficiently than a loose scatter of assets. A developer doing front-end development works with asset bundles, adding the front-end assets the development introduces to the bundles, so they are genuinely delivered. Work with asset bundles the Odoo way. For how we approach Odoo, see our ERP practice.

All posts

Got a Topic Worth Posting?

Suggest a Topic

If a question keeps coming up in your operations, it might be worth its own post.