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 2,180 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 5 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"/>


walter capote
On 4/3/18, 8:56 AM

Genius Genius Genius! Thank you very much! My Odoo 11 installation give me Internal Error 500 when I was trying to use qty_available on Portal. I use your "<h1 t-field="product.sudo().virtual_available"></h1>" and help me a lot! Thanks Again! :D


If you are in V11, you should not add a field from v8 !

So just remove your line, and enable the feature website_sale_stock that will do it for you automatically without any customization ;)

Jérémy Kersten (jke)
on 4/3/18, 9:01 AM

PS: this field still exist in actual code, so you probably make another issue.

Could you provide the complete traceback?


Jérémy Kersten (jke)
on 4/3/18, 9:08 AM

Jérémy Kersten (jke)

--Jérémy Kersten (jke)--

| 3 3 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.

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: 2180 times
Last updated: 4/3/18, 8:56 AM