mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
Add docstring to post_init_hook
This commit is contained in:
@@ -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
|
||||
============
|
||||
|
||||
@@ -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, [])
|
||||
|
||||
Reference in New Issue
Block a user