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

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

View File

@@ -26,6 +26,7 @@ import time
class BillOfLadingOut(report_sxw.rml_parse):
def _get_invoice_address(self, picking):
if picking.sale_id:
return picking.sale_id.partner_invoice_id
@@ -64,6 +65,7 @@ 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

View File

@@ -18,4 +18,4 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
import stock_report
from . import stock_report

View File

@@ -28,7 +28,9 @@ import time
class NullMove(object):
"""helper class to generate empty lines in the delivery report"""
def __init__(self):
self.product_id = NullObj()
self.picking_id = NullObj()
@@ -36,8 +38,10 @@ class NullMove(object):
class NullObj(object):
"""the null obj has any attribute you want with an empty string
as the value"""
def __getattr__(self, attr):
return ''
@@ -122,7 +126,6 @@ class PrintPick(report_sxw.rml_parse):
agreg.setdefault(key, []).append(move)
objects = []
for agr in agreg:
print agr
objects.append(PickingAgregation(agr[0], agr[1], agreg[agr]))
return super(PrintPick, self).set_context(objects, data, ids,
report_type=report_type)