This question has been flagged
1 Reply
8817 Views

If you check "Allow several bill of materials per products using properties" in the manufacturing settings, you will be able to specify several bill of materials to a single product and specify properties on them.

In Manufacturing => Configuration => Properties, there is a "Properties composition" field that can take several values: min/max/plus.

Does anyone know what those values represent, functionally?

Avatar
Discard

For the life of me I can't find any code that operates on the values in that field. In 7.0 the help text even states that the value is NOT used for computation. In a broader sense, the mrp.property object seems to be an incomplete framework that requires python code to expand on it in some way to make it useful.

Best Answer

Hi

There a bug that disable this functionally. I have found these step to solve the problem patching the mrp module:
On module mrp modify the "__init__.py" adding the line:

import sale_stock

And add a new file "sale_stock.py" in the module mrp with:

from openerp.osv import osv,fields

class sale_order(osv.osv):
    _inherit = 'sale.order'

    def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, date_planned, context=None):
        result = super(sale_order, self)._prepare_order_line_procurement(cr, uid, order, line, move_id, date_planned, context)
        properties = [x.id for x in line.property_ids]
        result['bom_id'] = self.pool.get('mrp.bom')._bom_find(cr, uid, line.product_id.id, line.product_uom.id, properties) or False
        return result
Avatar
Discard