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.

2

How to add a default minimum stock rules for newly created products ?

By
Ahmet Altinisik
on 2/13/13, 4:23 AM 2,401 views

How to add a default minimum stock rule for newly created products ?

When creating a new product I want a default minimum stock rule to be added automatically. I am not asking how to define minimum stock rule to the product. For normal fields I can define by set defaults menu. However it does not work with minimum stock rule field since there is a create button and a seperate rule is created and selected.

ok I've deleted both answers since they are not related to your question

Gilles Major (gim)
on 2/13/13, 5:08 AM

Where is "minimum order quantity field"?

Jānis
on 2/13/13, 5:13 AM

sorry it is "minimum stock rules" since I am using openerp in my native such errors occurs. I just corrected the question.

Altınkaya Elektronik Cihaz Kutuları imalat Ticaret ltd sti, Ahmet Altinisik
on 2/13/13, 5:56 AM

Just tried editing the default value directly in the database "stock_warehouse_orderpoint" but had no affect - Sorry - i'll bump the question

Cameron
on 2/14/13, 10:21 AM

Maybe by creating an automatic action to be triggered when creating new products? I've seen that this is possible in administrator settings

Marcel Linke
on 2/21/13, 8:42 AM
2

Andreas Brueckl

--Andreas Brueckl--
5056
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 2/22/13, 5:01 AM

If you are familiar with OpenERP modules I would suggest to override the create()-method in product.product:

class product_product(osv.Model):
    _inherit = 'product.product'

    def create(self, cr, uid, data, context=None):
        prod_id = super(product_product, self).create(cr, uid, data, context=context)

        vals = {
           'product_id': prod_id,
           ....
        }
        self.pool.get('stock.warehouse.orderpoint').create(cr, uid, vals, context=context)
        return prod_id

But it is not that easy because there are other required fields in stock.warehouse.orderpoint which you would have to populate. (e.g. warehouse_id, location_id).

If you use 'Automated Actions', the problem with the required fields also exist. However I do not think that is possible apply Automated Actions on created objects.

i can not find the create method of the product?? from which method the product creation is handled?

Hachem Chraiti
on 5/9/14, 7:28 AM
0
Jānis
On 2/13/13, 4:49 AM

Hope this will help you:

go to product card and open page Procurements and in section Suppliers make new entry with minimal quantity.

sorry maybe question was not clear enogh, I updated the question

Altınkaya Elektronik Cihaz Kutuları imalat Ticaret ltd sti, Ahmet Altinisik
on 2/13/13, 5:02 AM
0
Gilles Major (gim)
On 2/13/13, 4:57 AM

I'm not exactly sure what you mean.

If what you're concerned about is defining minimum quantities for purchases: - go to the product form => procurements tab. In the Suppliers section, you can define a minimal order quantity for a given supplier (you need to activate "Manage pricelist per supplier" in the purchase settings first).

When creating a new product I want a default minimum order quantitiy value to be added automatically. I am not asking how to define minimum order quantitiy.

Altınkaya Elektronik Cihaz Kutuları imalat Ticaret ltd sti, Ahmet Altinisik
on 2/13/13, 4:59 AM

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)

Stats

Asked: 2/13/13, 4:23 AM
Seen: 2401 times
Last updated: 3/16/15, 8:10 AM