Odoo Help


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.


Module linking "Stock" and "sales", quantity rules for sale on v.8

Nicolás Visús
on 2/15/14, 4:21 PM 946 views

I wanted to know if anyone can help me in building a module. I want to make a small module that adds The following features:

If the stock of a product "X" = 0, the box product "can be sold" is disabled (False). "Can be sold" is a box that is inside of "product".

If the stock of a product "X" = 0, the box for "published" (new feature of the ecommerce module) is disabled (False)

And on the other hand only allows me to sell the amount of products you have in stock. Example: product "X" can be sold from 1 to the number of stocks you have.

So far I have the following:


-- encoding: utf-8 --

{ "name": "Ventas con stock cuantificado", "version": "1.0", "description": """ Añade reglas la venta para que se venda únicamente lo que haya en stock. Cuando el stock es 0 desactiva el producto para la venta """, "author": "", "website": "", "category": "extra-tools", "depends": [ "sales", "stock", "website", "ecommerce", ], "active": False, "installable": True, "certificate" : "", }


-- coding: utf-8 --

import product_sale_quantify

product_sale_quantify.py: it's empty

I was looking at how to build a module in python but still do not understand how you could do to build rules.


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

1 follower(s)


Asked: 2/15/14, 4:21 PM
Seen: 946 times
Last updated: 3/16/15, 8:10 AM