Merge lp:~openerp-dev/openobject-addons/7.0-opw-598208-ado into lp:openobject-addons/7.0

Proposed by Amit Dodiya (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-598208-ado
Merge into: lp:openobject-addons/7.0
Diff against target: 116 lines (+12/-5)
8 files modified
account/report/account_print_overdue.py (+1/-1)
account/wizard/account_financial_report.py (+1/-0)
account_followup/report/account_followup_print.py (+2/-0)
base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py (+1/-0)
document_ftp/ftpserver/authorizer.py (+2/-0)
document_webdav/test_davclient.py (+3/-3)
mrp_repair/wizard/make_invoice.py (+1/-1)
report_webkit/webkit_report.py (+1/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-598208-ado
Reviewer Review Type Date Requested Status
Martin Trigaux (OpenERP) Pending
Naresh(OpenERP) Pending
Review via email: mp+191754@code.launchpad.net

Description of the change

Hello,

[FIX]: Fixes issues related to warning while running pylint script for undefined variables on some files

Run this command "pylint -E filename.py" on terminal for below files and you will find warnings related to undefined variables.
account/report/account_print_overdue.py
account/wizard/account_financial_report.py
account_followup/report/account_followup_print.py
base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py
document_ftp/ftpserver/authorizer.py
document_webdav/test_davclient.py
mrp_repair/wizard/make_invoice.py
report_webkit/webkit_report.py

Regards,
Amit

To post a comment you must log in.

Unmerged revisions

9526. By Amit Dodiya (OpenERP)

[FIX]: Fixes issues related warning while running pylint scrip for undefined variables

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/report/account_print_overdue.py'
2--- account/report/account_print_overdue.py 2012-12-06 14:56:32 +0000
3+++ account/report/account_print_overdue.py 2013-10-18 05:49:39 +0000
4@@ -42,7 +42,7 @@
5 addresses = res_partner.address_get(self.cr, self.uid, [partner.id], ['invoice'])
6 adr_id = addresses and addresses['invoice'] or False
7 if adr_id:
8- adr=res_partner_address.read(self.cr, self.uid, [adr_id])[0]
9+ adr=res_partner.read(self.cr, self.uid, [adr_id])[0]
10 return adr['phone']
11 else:
12 return partner.phone or False
13
14=== modified file 'account/wizard/account_financial_report.py'
15--- account/wizard/account_financial_report.py 2013-09-03 09:27:32 +0000
16+++ account/wizard/account_financial_report.py 2013-10-18 05:49:39 +0000
17@@ -20,6 +20,7 @@
18 ##############################################################################
19
20 from openerp.osv import fields, osv
21+from openerp.tools.translate import _
22
23 class accounting_report(osv.osv_memory):
24 _name = "accounting.report"
25
26=== modified file 'account_followup/report/account_followup_print.py'
27--- account_followup/report/account_followup_print.py 2013-01-03 09:48:18 +0000
28+++ account_followup/report/account_followup_print.py 2013-10-18 05:49:39 +0000
29@@ -24,6 +24,8 @@
30
31 from openerp import pooler
32 from openerp.report import report_sxw
33+from openerp.osv import osv
34+from openerp.tools.translate import _
35
36 class report_rappel(report_sxw.rml_parse):
37 _name = "account_followup.report.rappel"
38
39=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py'
40--- base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py 2013-03-04 17:31:32 +0000
41+++ base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py 2013-10-18 05:49:39 +0000
42@@ -20,6 +20,7 @@
43 #
44 ##############################################################################
45 import urllib
46+import os
47
48 def get_absolute_file_path(url):
49 url_unquoted = urllib.unquote(url)
50
51=== modified file 'document_ftp/ftpserver/authorizer.py'
52--- document_ftp/ftpserver/authorizer.py 2011-01-14 00:11:01 +0000
53+++ document_ftp/ftpserver/authorizer.py 2013-10-18 05:49:39 +0000
54@@ -1,4 +1,6 @@
55 # -*- encoding: utf-8 -*-
56+from openerp import pooler
57+from openerp.service import security
58
59 class authorizer:
60 read_perms = "elr"
61
62=== modified file 'document_webdav/test_davclient.py'
63--- document_webdav/test_davclient.py 2013-05-14 14:28:37 +0000
64+++ document_webdav/test_davclient.py 2013-10-18 05:49:39 +0000
65@@ -55,7 +55,7 @@
66 def __init__(self, use_datetime=0):
67 self._use_datetime = use_datetime
68 self._http = {}
69- log.debug("Using persistent transport")
70+ _logger.debug("Using persistent transport")
71
72 def make_connection(self, host):
73 # create a HTTP connection object from a host descriptor
74@@ -252,7 +252,7 @@
75 (atype,realm) = resp.msg.getheader('www-authenticate').split(' ',1)
76 data1 = resp.read()
77 if data1:
78- log.warning("Why have data on a 401 auth. message?")
79+ _logger.warning("Why have data on a 401 auth. message?")
80 if realm.startswith('realm="') and realm.endswith('"'):
81 realm = realm[7:-1]
82 _logger.debug("Resp: %r %r", resp.version,resp.isclosed(), resp.will_close)
83@@ -401,7 +401,7 @@
84 try:
85 r1 = conn.getresponse()
86 except httplib.BadStatusLine, bsl:
87- log.warning("Bad status line: %s", bsl.line)
88+ _logger.warning("Bad status line: %s", bsl.line)
89 raise Exception('Bad status line.')
90 if r1.status == 401: # and r1.headers:
91 if 'www-authenticate' in r1.msg:
92
93=== modified file 'mrp_repair/wizard/make_invoice.py'
94--- mrp_repair/wizard/make_invoice.py 2012-12-17 14:43:06 +0000
95+++ mrp_repair/wizard/make_invoice.py 2013-10-18 05:49:39 +0000
96@@ -57,7 +57,7 @@
97 form_res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_form')
98 form_id = form_res and form_res[1] or False
99 tree_res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_tree')
100- tree_id = tree_res and tree_res[1] or Fals
101+ tree_id = tree_res and tree_res[1] or False
102
103 return {
104 'domain': [('id','in', newinv.values())],
105
106=== modified file 'report_webkit/webkit_report.py'
107--- report_webkit/webkit_report.py 2013-06-11 14:10:16 +0000
108+++ report_webkit/webkit_report.py 2013-10-18 05:49:39 +0000
109@@ -46,6 +46,7 @@
110 from openerp import pooler
111 from report_helper import WebKitHelper
112 from openerp.report.report_sxw import *
113+from openerp.report.report_sxw import report_sxw
114 from openerp import addons
115 from openerp import tools
116 from openerp.tools.translate import _