Merge lp:~vauxoo/addons-vauxoo/7.0-pylint-addons-vauxoo-4-dev-sergio into lp:addons-vauxoo/7.0

Status: Needs review
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0-pylint-addons-vauxoo-4-dev-sergio
Merge into: lp:addons-vauxoo/7.0
Diff against target: 325 lines (+78/-59)
10 files modified
bzr_to_task/bzr_to_task.py (+32/-22)
email_template_att_dinamic/model/email_template.py (+22/-16)
group_xml_id/groups.py (+8/-4)
project_contract_validations/__init__.py (+0/-1)
sale_order_copy_line/__init__.py (+1/-2)
sale_order_copy_line/model/__init__.py (+1/-2)
sale_order_copy_line/model/sale_order_line.py (+5/-4)
sale_order_line_seq/__init__.py (+1/-2)
sale_order_line_seq/model/__init__.py (+1/-2)
sale_order_line_seq/model/sale_order.py (+7/-4)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0-pylint-addons-vauxoo-4-dev-sergio
Reviewer Review Type Date Requested Status
Moisés López - http://www.vauxoo.com Pending
Review via email: mp+241748@code.launchpad.net

Description of the change

Pylint was applied to this modules:

- sale_order_copy_line
- sale_order_line_seq
- project_contract_validations
- group_xml_id

To post a comment you must log in.
1154. By Sergio Ernesto Tostado Sánchez - http://www.vauxoo.com

[FIX][email_template_att_dinamic] Pylint and conflict troubleshooting was resolved

Unmerged revisions

1154. By Sergio Ernesto Tostado Sánchez - http://www.vauxoo.com

[FIX][email_template_att_dinamic] Pylint and conflict troubleshooting was resolved

1153. By Sergio Ernesto Tostado Sánchez - http://www.vauxoo.com

[PYLINT][sale_order_copy_line,sale_order_line_seq,project_contract_validations,group_xml_id] Pylint was applied to this modules

1152. By Luis Torres - http://www.vauxoo.com

[IMP][email_template_att_dinamic]Added pylint to module.

1151. By Luis Torres - http://www.vauxoo.com

[IMP][bzr_to_task]Completed pylint

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzr_to_task/bzr_to_task.py'
2--- bzr_to_task/bzr_to_task.py 2014-09-30 14:38:46 +0000
3+++ bzr_to_task/bzr_to_task.py 2014-11-13 21:54:59 +0000
4@@ -1,4 +1,4 @@
5-#-*- coding:utf-8 -*-
6+# -*- coding:utf-8 -*-
7 #
8 #
9 # OpenERP, Open Source Management Solution
10@@ -31,9 +31,10 @@
11 _columns = {
12 'sprint_id': fields.many2one('sprint.kanban', 'Sprint',
13 ondelete="cascade"),
14- 'url_branch': fields.char('Url Branch', 264, help="Here you must place"
15- " the bazar url without 's' in the protocol ie."
16- " http://bazaar.launchpad.net/~vauxoo/addons-vauxoo/7.0"),
17+ 'url_branch': fields.char(
18+ 'Url Branch', 264, help="Here you must place the bazar url "
19+ "without 's' in the protocol ie."
20+ " http://bazaar.launchpad.net/~vauxoo/addons-vauxoo/7.0"),
21 'merge_proposal': fields.char('Merge Proposal', 264),
22 'blueprint': fields.char('Blueprint', 264),
23 'res_id': fields.char('Revno', 64),
24@@ -73,15 +74,19 @@
25 }
26 if user_ids:
27 task_data['user_id'] = user_ids[0]
28- task_ids = task_obj.search(cr, uid, [('project_id', '=', ids[
29- 0]), ('revno', '=', task_data['revno'])])
30+ task_ids = task_obj.search(
31+ cr, uid, [('project_id', '=', ids[0]),
32+ ('revno', '=', task_data['revno'])])
33 if not task_ids:
34- if inferior and inferior <= task_data['revno'] and int(res_id) >= task_data['revno']:
35- self.write(cr, uid, ids, {
36- 'tasks': [(0, 0, task_data)]})
37+ if inferior and inferior <= task_data['revno'] and\
38+ int(res_id) >= task_data['revno']:
39+ self._write(cr, uid, ids, {
40+ 'tasks': [(0, 0, task_data)]})
41 else:
42- raise osv.except_osv(('Error'), ('Fields: URL Branch, From Revno and Revno are required to execute this operation, \
43- also From Revno must be minor than Revno'))
44+ raise osv.except_osv(('Error'), (
45+ 'Fields: URL Branch, From Revno and Revno are required to '
46+ 'execute this operation, also From Revno must be minor than '
47+ 'Revno'))
48 return True
49
50
51@@ -90,9 +95,10 @@
52 _columns = {
53 'revno': fields.integer('Revno'),
54 'from_revno': fields.integer('From Revno'),
55- 'url_branch': fields.char('Url Branch', 264, help="Here you must place"
56- " the bazar url without 's' in the protocol ie."
57- " http://bazaar.launchpad.net/~vauxoo/addons-vauxoo/7.0"),
58+ 'url_branch': fields.char(
59+ 'Url Branch', 264, help="Here you must place the bazar url "
60+ "without 's' in the protocol ie. "
61+ "http://bazaar.launchpad.net/~vauxoo/addons-vauxoo/7.0"),
62 }
63 _defaults = {
64 'res_id': 0,
65@@ -157,17 +163,21 @@
66 tw_data['user_id'] = user_ids[0]
67 else:
68 tw_data['user_id'] = uid
69- tw_ids = tw_obj.search(cr, uid, [('task_id', '=', ids[
70- 0]), ('revno', '=', tw_data['revno'])])
71+ tw_ids = tw_obj.search(
72+ cr, uid, [('task_id', '=', ids[0]),
73+ ('revno', '=', tw_data['revno'])])
74 if not tw_ids:
75- if inferior and inferior <= tw_data['revno'] and int(res_id) >= tw_data['revno']:
76- self.write(cr, uid, ids, {
77- 'work_ids': [(0, 0, tw_data), ], })
78+ if inferior and inferior <= tw_data['revno'] and\
79+ int(res_id) >= tw_data['revno']:
80+ self._write(cr, uid, ids, {
81+ 'work_ids': [(0, 0, tw_data), ], })
82 deadline = self.set_work_time(cr, uid, ids, context)
83- self.write(cr, uid, ids, {'date_deadline': deadline})
84+ self._write(cr, uid, ids, {'date_deadline': deadline})
85 else:
86- raise osv.except_osv(('Error'), ('Fields: URL Branch, From Revno and Revno are required to execute this operation, \
87- also From Revno must be minor than Revno'))
88+ raise osv.except_osv(('Error'), (
89+ 'Fields: URL Branch, From Revno and Revno are required to '
90+ 'execute this operation, also From Revno must be minor than '
91+ 'Revno'))
92 return True
93
94
95
96=== modified file 'email_template_att_dinamic/model/email_template.py'
97--- email_template_att_dinamic/model/email_template.py 2014-11-12 22:19:44 +0000
98+++ email_template_att_dinamic/model/email_template.py 2014-11-13 21:54:59 +0000
99@@ -4,12 +4,12 @@
100 # Module Writen to OpenERP, Open Source Management Solution
101 # Copyright (C) 2013 Vauxoo (<http://vauxoo.com>).
102 # All Rights Reserved
103-###############Credits######################################################
104+# ##############Credits######################################################
105 # Coded by: vauxoo consultores (info@vauxoo.com)
106 #############################################################################
107 # This program is free software: you can redistribute it and/or modify
108-# it under the terms of the GNU Affero General Public License as published by
109-# the Free Software Foundation, either version 3 of the License, or
110+# it under the terms of the GNU Affero General Public License as published
111+# by the Free Software Foundation, either version 3 of the License, or
112 # (at your option) any later version.
113 #
114 # This program is distributed in the hope that it will be useful,
115@@ -19,7 +19,7 @@
116 #
117 # You should have received a copy of the GNU Affero General Public License
118 # along with this program. If not, see <http://www.gnu.org/licenses/>.
119-################################################################################
120+#############################################################################
121
122
123 from openerp.osv import osv, fields
124@@ -31,10 +31,12 @@
125 _inherit = "email.template"
126
127 _columns = {
128- 'att_default': fields.boolean('Add attachment', help='Add attachment of record by default'),
129- 'att_other_field': fields.text('Add attachment from other filed',
130- help='specify from which fields are to get attachments'
131- '(only fields with relation to ir.attachment)')
132+ 'att_default': fields.boolean(
133+ 'Add attachment', help='Add attachment of record by default'),
134+ 'att_other_field': fields.text(
135+ 'Add attachment from other filed', help='specify from which fields'
136+ ' are to get attachments (only fields with relation to ir.'
137+ 'attachment)')
138 }
139
140
141@@ -42,28 +44,32 @@
142 _inherit = 'mail.compose.message'
143
144 def onchange_template_id(self, cr, uid, ids, template_id,
145- composition_mode, model, res_id, context=None):
146+ composition_mode, model, res_id, context=None):
147 if not context:
148 context = {}
149
150 template_obj = self.pool.get('email.template')
151
152 res = super(mail_compose_message,
153- self).onchange_template_id(cr, uid, ids, template_id,
154- composition_mode, model, res_id, context=context)
155+ self).onchange_template_id(
156+ cr, uid, ids, template_id,
157+ composition_mode, model, res_id, context=context)
158 attach = []
159 if template_id:
160
161 template = template_obj.browse(cr, uid, template_id, context)
162
163 if template and template.att_default:
164- attach = self.pool.get('ir.attachment').search(cr, uid,
165- [('res_id', '=', res_id), ('res_model', '=', model)])
166+ attach = self.pool.get('ir.attachment').search(
167+ cr, uid, [('res_id', '=', res_id),
168+ ('res_model', '=', model)])
169
170 if template and template.att_other_field:
171- att_field_render = template_obj.render_template(cr, uid,
172- template.att_other_field, template.model, res_id, context=context)
173- attach += [id_att for id_att in ast.literal_eval("[" + att_field_render + "]") if att_field_render]
174+ att_field_render = template_obj.render_template(
175+ cr, uid, template.att_other_field, template.model,
176+ res_id, context=context)
177+ attach += [id_att for id_att in ast.literal_eval(
178+ "[" + att_field_render + "]") if att_field_render]
179
180 attach += res.get('value', {}).pop('attachment_ids', [])
181 res.get('value', {}).update({'attachment_ids': [(6, 0, attach)]})
182
183=== modified file 'group_xml_id/groups.py'
184--- group_xml_id/groups.py 2014-10-03 07:19:35 +0000
185+++ group_xml_id/groups.py 2014-11-13 21:54:59 +0000
186@@ -8,8 +8,8 @@
187 # Coded by: Rodo(rodo@vauxoo.com)
188 #############################################################################
189 # This program is free software: you can redistribute it and/or modify
190-# it under the terms of the GNU Affero General Public License as published by
191-# the Free Software Foundation, either version 3 of the License, or
192+# it under the terms of the GNU Affero General Public License as published
193+# by the Free Software Foundation, either version 3 of the License, or
194 # (at your option) any later version.
195 #
196 # This program is distributed in the hope that it will be useful,
197@@ -28,6 +28,10 @@
198 _inherit = 'res.groups'
199
200 _columns = {
201- 'xml_id': fields.function(osv.osv.get_xml_id, type='char', size=128, string="External ID",
202- help="ID of the view defined in xml file"),
203+ 'xml_id': fields.function(
204+ osv.osv.get_xml_id,
205+ type='char',
206+ size=128,
207+ string="External ID",
208+ help="ID of the view defined in xml file"),
209 }
210
211=== modified file 'project_contract_validations/__init__.py'
212--- project_contract_validations/__init__.py 2014-08-01 23:10:00 +0000
213+++ project_contract_validations/__init__.py 2014-11-13 21:54:59 +0000
214@@ -1,1 +0,0 @@
215-
216
217=== modified file 'sale_order_copy_line/__init__.py'
218--- sale_order_copy_line/__init__.py 2014-10-03 00:28:23 +0000
219+++ sale_order_copy_line/__init__.py 2014-11-13 21:54:59 +0000
220@@ -21,6 +21,5 @@
221 #
222 # You should have received a copy of the GNU Affero General Public License
223 # along with this program. If not, see <http://www.gnu.org/licenses/>.
224-#
225-#
226+
227 from . import model
228
229=== modified file 'sale_order_copy_line/model/__init__.py'
230--- sale_order_copy_line/model/__init__.py 2014-10-03 00:28:23 +0000
231+++ sale_order_copy_line/model/__init__.py 2014-11-13 21:54:59 +0000
232@@ -21,6 +21,5 @@
233 #
234 # You should have received a copy of the GNU Affero General Public License
235 # along with this program. If not, see <http://www.gnu.org/licenses/>.
236-#
237-#
238+
239 from . import sale_order_line
240
241=== modified file 'sale_order_copy_line/model/sale_order_line.py'
242--- sale_order_copy_line/model/sale_order_line.py 2014-10-03 07:19:35 +0000
243+++ sale_order_copy_line/model/sale_order_line.py 2014-11-13 21:54:59 +0000
244@@ -1,4 +1,4 @@
245-##############################################################################
246+# #############################################################################
247 #
248 # OpenERP, Open Source Management Solution
249 # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
250@@ -18,7 +18,7 @@
251 # You should have received a copy of the GNU General Public License
252 # along with this program. If not, see <http://www.gnu.org/licenses/>.
253 #
254-##############################################################################
255+# #############################################################################
256
257 from openerp.osv import osv
258 from openerp.tools.translate import _
259@@ -34,7 +34,7 @@
260 data_sale_order = sale_order_obj.browse(cr, uid, data.get('order_id'))
261
262 if data_sale_order.state == 'draft':
263- sale_order_id = self.create(cr, uid, data, context=context)
264+ self.create(cr, uid, data, context=context)
265 return {
266 'type': 'ir.actions.act_window',
267 'name': _('Sales Order'),
268@@ -45,4 +45,5 @@
269 'target': 'current',
270 'nodestroy': True, }
271 else:
272- raise osv.except_osv(_('Error!'), _("This sale order is not in draft state"))
273+ raise osv.except_osv(_('Error!'),
274+ _("This sale order is not in draft state"))
275
276=== modified file 'sale_order_line_seq/__init__.py'
277--- sale_order_line_seq/__init__.py 2014-10-03 00:28:23 +0000
278+++ sale_order_line_seq/__init__.py 2014-11-13 21:54:59 +0000
279@@ -21,6 +21,5 @@
280 #
281 # You should have received a copy of the GNU Affero General Public License
282 # along with this program. If not, see <http://www.gnu.org/licenses/>.
283-#
284-#
285+
286 from . import model
287
288=== modified file 'sale_order_line_seq/model/__init__.py'
289--- sale_order_line_seq/model/__init__.py 2014-10-03 00:28:23 +0000
290+++ sale_order_line_seq/model/__init__.py 2014-11-13 21:54:59 +0000
291@@ -21,6 +21,5 @@
292 #
293 # You should have received a copy of the GNU Affero General Public License
294 # along with this program. If not, see <http://www.gnu.org/licenses/>.
295-#
296-#
297+
298 from . import sale_order
299
300=== modified file 'sale_order_line_seq/model/sale_order.py'
301--- sale_order_line_seq/model/sale_order.py 2014-10-03 07:19:35 +0000
302+++ sale_order_line_seq/model/sale_order.py 2014-11-13 21:54:59 +0000
303@@ -21,8 +21,7 @@
304 #
305 # You should have received a copy of the GNU Affero General Public License
306 # along with this program. If not, see <http://www.gnu.org/licenses/>.
307-#
308-#
309+
310 from openerp.osv import osv, fields
311
312
313@@ -30,6 +29,10 @@
314 _inherit = 'sale.order.line'
315
316 _columns = {
317- 'sequence2': fields.related('sequence', type='integer', relation='sale.order.line',
318- string='Sequence', help='Field to show the number of sequence in line')
319+ 'sequence2': fields.related(
320+ 'sequence',
321+ type='integer',
322+ relation='sale.order.line',
323+ string='Sequence',
324+ help='Field to show the number of sequence in line')
325 }