Odoo Help


Shop: How to limit the number of pieces a customer can buy?

Ralf Hilgenstock
on 3/21/15, 5:20 AM 794 views

In some cases its required to limit the number of pieces from a product a customer can buy. I.e.:
- Buying a membership plan
- reducing the number of items in a sales action (max 3 items per customer)

We didn't found an option to limit the number of items for a product. Is this a missing feature?


Hello... I think that it's not existing, but you can 'easily' do it with 2/3 updates in views and adding a field to specify the limit. In /shop, /shop/product, ... you don't add the button add_to_cart if quantity in basket for this product is bigger than your limit. But the limit is only 'client side'... To secure server side, you need to add a constraint for model order.

Jérémy Kersten (jke)
on 3/21/15, 2:22 PM

Hi Ralf, For Looking at the source code for the openerp, there is a hard limit of 2,147,483,647 partners, products, invoices, deliveries, purchases and users.

on 3/23/15, 3:04 AM

@vasanth not sure but it seems I have the same limitation on project and hr. Could you confirm ?

Martin Trigaux (mat)
on 4/9/15, 9:15 AM

@Vasanth , @Martin. It also looks like it is the same for the Karma. 

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

2 follower(s)


Asked: 3/21/15, 5:20 AM
Seen: 794 times
Last updated: 4/9/15, 9:22 AM