bill_of_lading_webkit: fix PEP8 constraints

This commit is contained in:
Marc Cassuto
2014-07-28 23:00:44 -04:00
parent 97a8967503
commit 6d2d6f064d
3 changed files with 22 additions and 10 deletions

View File

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

View File

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

View File

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