mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
bill_of_lading_webkit: fix PEP8 constraints
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user