Odoo Help


2 Answers

Axel Mendoza Cuba

--Axel Mendoza--
| 8 8 10
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza Cuba
12/16/15, 4:30 AM

This could be solved in several ways like those referred in the follow up question, I have developed at least two ways to solve it. 

The first one and more simple way is to use the widget website_products. 
What widget is that?
It's a new widget that you could use after install the module solt_qweb_widgets from https://github.com/aek/odoo_public/tree/8.0/addons/solt_qweb_widgets
How can I use that widget to display the products?

<div class="row" t-esc="website" t-esc-options='{"widget":"website_products"}'/>

That will display all the products you have, 4 products per row and 20 total products per page like in the original shop

How can I filter what products will be displayed?

<div class="row" t-esc="website" t-esc-options='{"widget":"website_products", "domain": [["sale_ok", "=", true], ["service_quotation", "=", false], ["website_published", "=", true]]}'/>

As you see in the options you could specify a domain to filter the products to display

How can I change the template used?

There is a default template that it's a clean of the original website_sale.products template without the layout that will include the header and footer stuffs. You don't need to specify a template, but if you wanna provide your own template you could do it like this:

<div class="row" t-esc="website" t-esc-options='{"widget":"website_products", "template": "solt_qweb_widgets.website_products", "domain": [["sale_ok", "=", true], ["service_quotation", "=", false], ["website_published", "=", true]]}'/>

Take as a base the template solt_qweb_widgets.website_products for your modifications

See an example of how this works at my Odoo website version of my site: https://saas.soltein.org

The second way to display the products table it's using another qweb component of that module that allow you to use t-call-xpath to select the nodes from an existing template. It's functional but not complete yet. The use of that tag attribute in combination with a widget to provide the additional data that the template need to render will give the same result of the first way when you retrieve the content of the <t t-call="website.layout"> to remove the header and footer of the /shop page , but have more use for other scenarios

The first way it's the recommended one right now since it's in production right now.

Hope that helps to others, the same technique apply for whatever you want to use it on your page like partners that it's also available and you could see it on my site too


Business Solutions For Africa Congo, Democratic Republic of the
12/12/17, 3:28 AM


The link you gave is broken.

I'd be interested to see your addon.

How can I find it now?

Kind regards,

Axel Mendoza Cuba
12/12/17, 4:10 AM

I have remove it from the repo, please drop me an email

Ask a Question
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now