From 7a42c21dd2ffeb046ee52cad5fde7677551891e6 Mon Sep 17 00:00:00 2001 From: moylop260 Date: Thu, 13 Nov 2014 21:32:02 -0600 Subject: [PATCH 1/2] [REF] auto-fix conventions --- mrp_bom_product_details/__init__.py | 2 +- mrp_industrial_design_bom/report/__init__.py | 2 +- .../report/bom_structure_industrial_design.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) 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..57499d974 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({ From 234fff8172ee94cbebe44925b841c6df32925c39 Mon Sep 17 00:00:00 2001 From: Alex Comba Date: Wed, 19 Nov 2014 22:25:14 +0100 Subject: [PATCH 2/2] [FIX] W0622(redefined-builtin) errors --- .../report/bom_structure_industrial_design.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 57499d974..9068e4395 100644 --- a/mrp_industrial_design_bom/report/bom_structure_industrial_design.py +++ b/mrp_industrial_design_bom/report/bom_structure_industrial_design.py @@ -32,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, @@ -56,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