Odoo Help

Welcome!

This community 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.

0

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

By
Ralf Hilgenstock
on 3/21/15, 5:20 AM 523 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?

Ralf

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.

Vasanth
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
1

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

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

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