Add docstring to post_init_hook

This commit is contained in:
dufresnedavid
2015-03-31 13:37:20 -04:00
parent 1e8f38dd82
commit de4f9d69b2
2 changed files with 6 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ MRP Bill of Material Reference Selection
This module allows to select the component in a bom when you have several bom for one product.
This is used to manage versions of a product.
Produced lot contain a reference to the bill of material used to compute the lot.
Produced lot contains a reference to the bill of material used to compute the lot.
Installation
============

View File

@@ -26,6 +26,11 @@ from openerp import SUPERUSER_ID
def set_bill_of_material_references(cr, registry):
"""
This function adds a reference record to each existing boms when the
module is installed. This ensures that each bom has a reference
so that the module works properly.
"""
bom_obj = registry['mrp.bom']
ref_obj = registry['mrp.bom.reference']
bom_ids = bom_obj.search(cr, SUPERUSER_ID, [])