Odoo Help


How to show the available stock in the shop website in odoo 8?

Jose Andres Artavia
on 3/5/15, 1:01 PM 1,505 views


I have added the following variable on the product website to show the available stock for that product: <h1 t-field="product.virtual_available"></h1> 

It is working fine while I'm logged as administrator. However it is not showing anymore when I logged as a customer (restricted profile).

Does someone have any idea how can I fix this?


Thank you in advance. 

zbik, I already did this, and it is showing fine what I'm needing. The problem I'm still facing is when log in with a restricted profile, as a customer for example. When I'm loging in as administrator it is working, the problem is when I'm not loged as admin.

Jose Andres Artavia
on 3/5/15, 7:48 PM


| 6 4 7
Lodz, Poland

On 3/5/15, 4:12 PM

You customize Template ID: website_sale.product and insert tag like this:

<span t-field="product.qty_available"/>



Jérémy Kersten (jke)

--Jérémy Kersten (jke)--
Jérémy Kersten (jke)
| 3 2 5
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013. He developed several projects for OpenERP version 8 including the eCommerce, the Google Calendar synchronization and the new product variants/configurator. Now, he manages Odoo website and themes for saas.

Jérémy Kersten (jke)
On 8/22/15, 9:41 AM

Hi Joseph,

It's a security issue ! Public User (Default user for website) don't have the right to read this field ! 

So if you want really show it, you can change rights, or simply browse with more rights the record in QWEB view...

Eg. replacing : 

<h1 t-field="product.virtual_available"></h1>


<h1 t-field="product.sudo().virtual_available"></h1>


Joseph Andrade
On 8/22/15, 9:07 AM

Hello Jose Andres,

I am relatively new to Odoo, could you help me in getting this working for my Odoo website/shop?

I assume I need to have the Website Shop ready, I need some consumable products, and I guess that I also need the Warehouse module, correct?

Then how do I make the shop listed products to show the available stock within their description?.

Many thanks.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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

Question tools

4 follower(s)


Asked: 3/5/15, 1:01 PM
Seen: 1505 times
Last updated: 8/24/15, 4:46 AM