diff --git a/mrp_bom_reference_selection/README.rst b/mrp_bom_reference_selection/README.rst index bcabe5a10..2c106cbab 100644 --- a/mrp_bom_reference_selection/README.rst +++ b/mrp_bom_reference_selection/README.rst @@ -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 ============ diff --git a/mrp_bom_reference_selection/__init__.py b/mrp_bom_reference_selection/__init__.py index fd3ec9075..0083786b3 100644 --- a/mrp_bom_reference_selection/__init__.py +++ b/mrp_bom_reference_selection/__init__.py @@ -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, [])