From 6d2d6f064dda6daa2da5583101559e84e5ac5ae1 Mon Sep 17 00:00:00 2001 From: Marc Cassuto Date: Mon, 28 Jul 2014 23:00:44 -0400 Subject: [PATCH] bill_of_lading_webkit: fix PEP8 constraints --- bill_of_lading_webkit/__openerp__.py | 17 +++++++++++++---- bill_of_lading_webkit/report/stock_report.py | 9 ++++++--- bill_of_lading_webkit/stock.py | 6 +++--- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/bill_of_lading_webkit/__openerp__.py b/bill_of_lading_webkit/__openerp__.py index 3eb7cb1..e6e4bae 100644 --- a/bill_of_lading_webkit/__openerp__.py +++ b/bill_of_lading_webkit/__openerp__.py @@ -33,15 +33,18 @@ It is a negotiable instrument, and it serves three purposes: - it evidences the contract of carriage; - it serves as a document of title (i.e. ownership). -This document could be different from a Delivery Order as it has some legal issues. +This document could be different from a Delivery Order as it has some legal +issues. Two reports are provided in this module - Bill of Lading for Delivey Orders; - - Bill of Lading for Incoming Shipment (the use-case is shipment from an international Warehouse + - Bill of Lading for Incoming Shipment (the use-case is shipment from an + international Warehouse to the local Warehouse). This module also add a new field for a warehouse to pick form or deliver to; -this field will be used if the default warehouse_id is not set (normally from a PO). +this field will be used if the default warehouse_id is not set +(normally from a PO). Contributors ------------ @@ -51,7 +54,13 @@ Contributors """, 'author': 'Savoir-faire Linux', 'website': 'http://www.savoirfairelinux.com', - 'depends': ['base', 'report_webkit', 'base_headers_webkit', 'stock', 'delivery'], + 'depends': [ + 'base', + 'report_webkit', + 'base_headers_webkit', + 'stock', + 'delivery' + ], 'data': ['report.xml', 'stock_view.xml'], 'installable': True, 'auto_install': False, diff --git a/bill_of_lading_webkit/report/stock_report.py b/bill_of_lading_webkit/report/stock_report.py index ffade9c..30b85b0 100644 --- a/bill_of_lading_webkit/report/stock_report.py +++ b/bill_of_lading_webkit/report/stock_report.py @@ -41,7 +41,8 @@ class BillOfLadingOut(report_sxw.rml_parse): # By default, print the warehouse selected manually if picking.manual_warehouse_id: return picking.manual_warehouse_id.partner_id - # if not set, print the shipping address of the default company's warehouse + # if not set, print the shipping address of the default company's + # warehouse partner_obj = self.pool.get('res.partner') warehouse_address_id = picking.company_id.partner_id.address_get( adr_pref=['shipping'] @@ -65,13 +66,15 @@ report_sxw.report_sxw('report.webkit.bill_of_lading_out', class BillOfLadingIn(report_sxw.rml_parse): def _get_warehouse_address(self, picking): - # By default, print the warehouse selected from the related purchase order + # By default, print the warehouse selected from the related + # purchase order if picking.purchase_id: return picking.purchase_id.warehouse_id.partner_id # else, print the warehouse selected manually if picking.manual_warehouse_id: return picking.manual_warehouse_id.partner_id - # if none of the above, print the shipping address of the default company's warehouse + # if none of the above, print the shipping address of the default + # company's warehouse partner_obj = self.pool.get('res.partner') warehouse_address_id = picking.company_id.partner_id.address_get( adr_pref=['shipping'] diff --git a/bill_of_lading_webkit/stock.py b/bill_of_lading_webkit/stock.py index 3f122cb..183857e 100644 --- a/bill_of_lading_webkit/stock.py +++ b/bill_of_lading_webkit/stock.py @@ -22,7 +22,7 @@ from openerp.osv import fields, orm -class stock_picking_out_warehouse(orm.Model): +class StockPickingOutWarehouse(orm.Model): _inherit = "stock.picking.out" _columns = { 'manual_warehouse_id': fields.many2one( @@ -38,7 +38,7 @@ class stock_picking_out_warehouse(orm.Model): } -class stock_picking_in_warehouse(orm.Model): +class StockPickingInWarehouse(orm.Model): _inherit = "stock.picking.in" _columns = { 'manual_warehouse_id': fields.many2one( @@ -54,7 +54,7 @@ class stock_picking_in_warehouse(orm.Model): } -class stock_picking_warehouse(orm.Model): +class StockPickingWarehouse(orm.Model): _inherit = "stock.picking" _columns = { 'manual_warehouse_id': fields.many2one(