diff --git a/mrp_bom_product_details/__init__.py b/mrp_bom_product_details/__init__.py index 1d82e0db7..5cf76c097 100644 --- a/mrp_bom_product_details/__init__.py +++ b/mrp_bom_product_details/__init__.py @@ -20,4 +20,4 @@ # ############################################################################## -import mrp_bom_product_details +from . import mrp_bom_product_details diff --git a/mrp_industrial_design_bom/report/__init__.py b/mrp_industrial_design_bom/report/__init__.py index 0be3c550d..a7ad209bd 100644 --- a/mrp_industrial_design_bom/report/__init__.py +++ b/mrp_industrial_design_bom/report/__init__.py @@ -20,4 +20,4 @@ # ############################################################################## -import bom_structure_industrial_design +from . import bom_structure_industrial_design diff --git a/mrp_industrial_design_bom/report/bom_structure_industrial_design.py b/mrp_industrial_design_bom/report/bom_structure_industrial_design.py index c57bb9b94..9068e4395 100644 --- a/mrp_industrial_design_bom/report/bom_structure_industrial_design.py +++ b/mrp_industrial_design_bom/report/bom_structure_industrial_design.py @@ -24,6 +24,7 @@ from openerp.report import report_sxw class bom_structure(report_sxw.rml_parse): + def __init__(self, cr, uid, name, context): super(bom_structure, self).__init__(cr, uid, name, context=context) self.localcontext.update({ @@ -31,11 +32,11 @@ class bom_structure(report_sxw.rml_parse): 'get_children': self.get_children, }) - def get_children(self, object, level=0): + def get_children(self, obj, level=0): result = [] - def _get_rec(object, level): - for l in object: + def _get_rec(obj, level): + for l in obj: res = { 'name': l.name, 'pname': l.product_id.name, @@ -55,7 +56,7 @@ class bom_structure(report_sxw.rml_parse): level -= 1 return result - children = _get_rec(object, level) + children = _get_rec(obj, level) return children