Odoo Help

1

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

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

Scenario: 

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
2
Zbik
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"/>

 

0

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>

by 

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

 


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

Register

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)

Stats

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