Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Proposal: split of some website modules in _backend and _frontend

by
Leonardo Donelli
- 08/12/2016 11:33:07
On 7 December 2016 at 18:22, Pedro M. Baeza (Tecnativa)
<pedro.baeza@tecnativa.com> wrote:
> The module you mentioned has no sense to be decoupled, as recently viewed
> products are for the website part, not for any backend.

My point is that a lot of users, if not most, using the module would
completely redefine
the UI because e-commerce tend to be heavily customised, so they would
like to have
the functionality (models, controllers) but not the UI (templates,
static js and css).
Having completely unused JS, CSS and templates (less so in v10 I
guess?) only makes
the response time slower (and heavier)

For example, we are implementing an e-commerce where we use several
modules in this way:
we care about the functionality, but want our completely custom UI and
qweb/html:
* website_sale_recently_viewed_products (5 templates, 1 js file, 1 css file)
* website_sale_cart_preview (11 templates, 2 js files)
* website_sale_wishlist (3 templates, 1 js file, 1 css file)

For a total of 19 templates, 4 js files, and 2 css files that have to
be elaborated, template inheritance applied, js and css bundled and
checked at every request,
only to be completely discarded and have absolutely no effect in the end.

The customize_show option mentioned by Oscar could work at least for
the templates part, I have not looked into it,
but I assume that if set to False Odoo doesn't load and evaluate the templates?

Reference