Merge pull request #6 from oca-travis/7.0-autofix-script-01-dev-moylop260

[REF] auto-fix conventions
This commit is contained in:
Pedro M. Baeza
2014-11-20 08:43:44 +01:00
3 changed files with 7 additions and 6 deletions

View File

@@ -20,4 +20,4 @@
#
##############################################################################
import mrp_bom_product_details
from . import mrp_bom_product_details

View File

@@ -20,4 +20,4 @@
#
##############################################################################
import bom_structure_industrial_design
from . import bom_structure_industrial_design

View File

@@ -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