mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
Fix pep8 on repo
This commit is contained in:
@@ -20,17 +20,16 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools.translate import _
|
||||
from openerp.osv import fields, orm
|
||||
|
||||
class mrp_bom(osv.osv):
|
||||
|
||||
class mrp_bom(orm.Model):
|
||||
_inherit = 'mrp.bom'
|
||||
|
||||
_columns = {
|
||||
'product_standard_price': fields.related('product_id', 'standard_price', type='float', string='Cost Price', readonly=True),
|
||||
'product_qty_available': fields.related('product_id', 'qty_available', type='float', string='Quantity On Hand', readonly=True),
|
||||
'product_standard_price': fields.related(
|
||||
'product_id', 'standard_price', type='float', string='Cost Price', readonly=True
|
||||
),
|
||||
'product_qty_available': fields.related(
|
||||
'product_id', 'qty_available', type='float', string='Quantity On Hand', readonly=True
|
||||
),
|
||||
}
|
||||
_defaults = {
|
||||
}
|
||||
|
||||
mrp_bom()
|
||||
|
||||
@@ -19,6 +19,4 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import industrial_design
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
from . import industrial_design
|
||||
|
||||
@@ -37,5 +37,3 @@ It also point the BOM Structure report to a new version that uses the new fields
|
||||
'auto_install': False,
|
||||
'installable': False
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
@@ -21,8 +21,7 @@
|
||||
|
||||
import time
|
||||
from openerp.report import report_sxw
|
||||
from openerp.osv import osv
|
||||
from openerp import pooler
|
||||
|
||||
|
||||
class bom_structure(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
@@ -37,21 +36,22 @@ class bom_structure(report_sxw.rml_parse):
|
||||
|
||||
def _get_rec(object, level):
|
||||
for l in object:
|
||||
res = {}
|
||||
res['name'] = l.name
|
||||
res['pname'] = l.product_id.name
|
||||
res['pcode'] = l.product_id.default_code
|
||||
res['pqty'] = l.product_qty
|
||||
res['uname'] = l.product_uom.name
|
||||
res['code'] = l.code
|
||||
res['level'] = level
|
||||
res['bnumber'] = l.bubble_number
|
||||
res = {
|
||||
'name': l.name,
|
||||
'pname': l.product_id.name,
|
||||
'pcode': l.product_id.default_code,
|
||||
'pqty': l.product_qty,
|
||||
'uname': l.product_uom.name,
|
||||
'code': l.code,
|
||||
'level': level,
|
||||
'bnumber': l.bubble_number,
|
||||
}
|
||||
result.append(res)
|
||||
if l.child_complete_ids:
|
||||
if level < 6:
|
||||
level += 1
|
||||
_get_rec(l.child_complete_ids, level)
|
||||
if level>0 and level<6:
|
||||
if 0 < level < 6:
|
||||
level -= 1
|
||||
return result
|
||||
|
||||
@@ -64,6 +64,3 @@ report_sxw.report_sxw('report.industrialdesign.bom.structure',
|
||||
'mrp_industrial_design_bom/report/bom_structure_industrial_design.rml',
|
||||
parser=bom_structure,
|
||||
header='internal')
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
Reference in New Issue
Block a user