Merge lp:~agilebg/account-financial-tools/7.0-add_account_invoice_template_fixes into lp:~bruno-bottacini/account-financial-tools/7.0-add_account_invoice_template
- 7.0-add_account_invoice_template_fixes
- Merge into 7.0-add_account_invoice_te...
Proposed by
Lorenzo Battistini
Status: | Merged |
---|---|
Approved by: | bruno bottacini |
Approved revision: | 117 |
Merge reported by: | bruno bottacini |
Merged at revision: | not available |
Proposed branch: | lp:~agilebg/account-financial-tools/7.0-add_account_invoice_template_fixes |
Merge into: | lp:~bruno-bottacini/account-financial-tools/7.0-add_account_invoice_template |
Diff against target: |
297 lines (+73/-57) 4 files modified
account_invoice_template/__init__.py (+1/-1) account_invoice_template/__openerp__.py (+8/-5) account_invoice_template/account_invoice_template.py (+22/-15) account_invoice_template/wizard/select_template.py (+42/-36) |
To merge this branch: | bzr merge lp:~agilebg/account-financial-tools/7.0-add_account_invoice_template_fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
bruno bottacini | Approve | ||
Nicolas Bessi - Camptocamp (community) | no test, code review | Approve | |
Review via email: mp+183205@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote : | # |
review:
Approve
(no test, code review)
- 117. By Lorenzo Battistini
-
[IMP] PEP8
Revision history for this message
Lorenzo Battistini (elbati) wrote : | # |
Hello Nicolas,
just made the changes, thanks.
Revision history for this message
bruno bottacini (bruno-bottacini) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'account_invoice_template/__init__.py' | |||
2 | --- account_invoice_template/__init__.py 2013-06-18 07:33:16 +0000 | |||
3 | +++ account_invoice_template/__init__.py 2013-09-26 08:59:58 +0000 | |||
4 | @@ -1,6 +1,6 @@ | |||
5 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
6 | 2 | ############################################################################## | 2 | ############################################################################## |
8 | 3 | # | 3 | # |
9 | 4 | # Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) | 4 | # Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) |
10 | 5 | # Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) | 5 | # Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) |
11 | 6 | # | 6 | # |
12 | 7 | 7 | ||
13 | === modified file 'account_invoice_template/__openerp__.py' | |||
14 | --- account_invoice_template/__openerp__.py 2013-06-18 07:33:16 +0000 | |||
15 | +++ account_invoice_template/__openerp__.py 2013-09-26 08:59:58 +0000 | |||
16 | @@ -1,6 +1,6 @@ | |||
17 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
18 | 2 | ############################################################################## | 2 | ############################################################################## |
20 | 3 | # | 3 | # |
21 | 4 | # Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) | 4 | # Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) |
22 | 5 | # Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) | 5 | # Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) |
23 | 6 | # | 6 | # |
24 | @@ -26,14 +26,17 @@ | |||
25 | 26 | Templates for Invoices | 26 | Templates for Invoices |
26 | 27 | 27 | ||
27 | 28 | User can configure invoice templates, useful for recurring invoices. | 28 | User can configure invoice templates, useful for recurring invoices. |
30 | 29 | The amount of each template line can be computed (through python code) or kept as user input. If user input, when using the template, user has to fill the amount of every input lines. | 29 | The amount of each template line can be computed (through python code) |
31 | 30 | The invoice form allows lo load, through a wizard, the template to use and the amounts to fill. | 30 | or kept as user input. If user input, when using the template, user has to fill |
32 | 31 | the amount of every input lines. | ||
33 | 32 | The invoice form allows lo load, through a wizard, the template to use and the | ||
34 | 33 | amounts to fill. | ||
35 | 31 | """, | 34 | """, |
36 | 32 | 'author': 'Agile Business Group', | 35 | 'author': 'Agile Business Group', |
37 | 33 | 'website': 'http://www.agilebg.com', | 36 | 'website': 'http://www.agilebg.com', |
38 | 34 | 'license': 'AGPL-3', | 37 | 'license': 'AGPL-3', |
41 | 35 | "depends" : ['account_move_template'], | 38 | "depends": ['account_move_template'], |
42 | 36 | "data" : [ | 39 | "data": [ |
43 | 37 | 'invoice_template.xml', | 40 | 'invoice_template.xml', |
44 | 38 | 'wizard/select_template.xml', | 41 | 'wizard/select_template.xml', |
45 | 39 | 'security/ir.model.access.csv', | 42 | 'security/ir.model.access.csv', |
46 | 40 | 43 | ||
47 | === modified file 'account_invoice_template/account_invoice_template.py' | |||
48 | --- account_invoice_template/account_invoice_template.py 2013-06-18 07:33:16 +0000 | |||
49 | +++ account_invoice_template/account_invoice_template.py 2013-09-26 08:59:58 +0000 | |||
50 | @@ -20,7 +20,7 @@ | |||
51 | 20 | ############################################################################## | 20 | ############################################################################## |
52 | 21 | 21 | ||
53 | 22 | from openerp.osv import fields, orm | 22 | from openerp.osv import fields, orm |
55 | 23 | from openerp.tools.translate import _ | 23 | |
56 | 24 | 24 | ||
57 | 25 | class account_invoice_template(orm.Model): | 25 | class account_invoice_template(orm.Model): |
58 | 26 | 26 | ||
59 | @@ -30,13 +30,14 @@ | |||
60 | 30 | _columns = { | 30 | _columns = { |
61 | 31 | 'partner_id': fields.many2one('res.partner', 'Partner', required=True), | 31 | 'partner_id': fields.many2one('res.partner', 'Partner', required=True), |
62 | 32 | 'account_id': fields.many2one('account.account', 'Account', required=True), | 32 | 'account_id': fields.many2one('account.account', 'Account', required=True), |
64 | 33 | 'template_line_ids': fields.one2many('account.invoice.template.line', 'template_id', 'Template Lines'), | 33 | 'template_line_ids': fields.one2many('account.invoice.template.line', |
65 | 34 | 'template_id', 'Template Lines'), | ||
66 | 34 | 'type': fields.selection([ | 35 | 'type': fields.selection([ |
72 | 35 | ('out_invoice','Customer Invoice'), | 36 | ('out_invoice', 'Customer Invoice'), |
73 | 36 | ('in_invoice','Supplier Invoice'), | 37 | ('in_invoice', 'Supplier Invoice'), |
74 | 37 | ('out_refund','Customer Refund'), | 38 | ('out_refund', 'Customer Refund'), |
75 | 38 | ('in_refund','Supplier Refund'), | 39 | ('in_refund', 'Supplier Refund'), |
76 | 39 | ],'Type', required=True ), | 40 | ], 'Type', required=True), |
77 | 40 | } | 41 | } |
78 | 41 | 42 | ||
79 | 42 | 43 | ||
80 | @@ -46,15 +47,21 @@ | |||
81 | 46 | _inherit = 'account.document.template.line' | 47 | _inherit = 'account.document.template.line' |
82 | 47 | 48 | ||
83 | 48 | _columns = { | 49 | _columns = { |
88 | 49 | 'account_id': fields.many2one('account.account', 'Account', required=True, domain=[('type','<>','view'), ('type', '<>', 'closed')]), | 50 | 'account_id': fields.many2one('account.account', 'Account', |
89 | 50 | 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', ondelete="cascade"), | 51 | required=True, domain=[('type', '<>', 'view'), ('type', '<>', 'closed')]), |
90 | 51 | 'invoice_line_tax_id': fields.many2many('account.tax', 'account_invoice_template_line_tax', 'invoice_line_id', 'tax_id', 'Taxes', domain=[('parent_id','=',False)]), | 52 | 'analytic_account_id': fields.many2one('account.analytic.account', |
91 | 52 | 'template_id': fields.many2one('account.invoice.template', 'Template', ondelete='cascade'), | 53 | 'Analytic Account', ondelete="cascade"), |
92 | 54 | 'invoice_line_tax_id': fields.many2many('account.tax', | ||
93 | 55 | 'account_invoice_template_line_tax', 'invoice_line_id', 'tax_id', | ||
94 | 56 | 'Taxes', domain=[('parent_id', '=', False)]), | ||
95 | 57 | 'template_id': fields.many2one('account.invoice.template', 'Template', | ||
96 | 58 | ondelete='cascade'), | ||
97 | 53 | 'product_id': fields.many2one('product.product', 'Product'), | 59 | 'product_id': fields.many2one('product.product', 'Product'), |
98 | 54 | } | 60 | } |
99 | 55 | 61 | ||
100 | 56 | _sql_constraints = [ | 62 | _sql_constraints = [ |
102 | 57 | ('sequence_template_uniq', 'unique (template_id,sequence)', 'The sequence of the line must be unique per template !') | 63 | ('sequence_template_uniq', 'unique (template_id,sequence)', |
103 | 64 | 'The sequence of the line must be unique per template !') | ||
104 | 58 | ] | 65 | ] |
105 | 59 | 66 | ||
106 | 60 | def product_id_change(self, cr, uid, ids, product_id, type, context=None): | 67 | def product_id_change(self, cr, uid, ids, product_id, type, context=None): |
107 | @@ -65,14 +72,15 @@ | |||
108 | 65 | if not product_id: | 72 | if not product_id: |
109 | 66 | return {} | 73 | return {} |
110 | 67 | 74 | ||
112 | 68 | product = self.pool.get('product.product').browse(cr, uid, product_id, context=context) | 75 | product = self.pool.get('product.product').browse(cr, uid, product_id, |
113 | 76 | context=context) | ||
114 | 69 | 77 | ||
115 | 70 | # name | 78 | # name |
116 | 71 | result.update({'name': product.name}) | 79 | result.update({'name': product.name}) |
117 | 72 | 80 | ||
118 | 73 | # account | 81 | # account |
119 | 74 | account_id = False | 82 | account_id = False |
121 | 75 | if type in ('out_invoice','out_refund'): | 83 | if type in ('out_invoice', 'out_refund'): |
122 | 76 | account_id = product.product_tmpl_id.property_account_income.id | 84 | account_id = product.product_tmpl_id.property_account_income.id |
123 | 77 | if not account_id: | 85 | if not account_id: |
124 | 78 | account_id = product.categ_id.property_account_income_categ.id | 86 | account_id = product.categ_id.property_account_income_categ.id |
125 | @@ -96,4 +104,3 @@ | |||
126 | 96 | result.update({'invoice_line_tax_id': tax_ids}) | 104 | result.update({'invoice_line_tax_id': tax_ids}) |
127 | 97 | 105 | ||
128 | 98 | return {'value': result} | 106 | return {'value': result} |
129 | 99 | |||
130 | 100 | 107 | ||
131 | === modified file 'account_invoice_template/wizard/select_template.py' | |||
132 | --- account_invoice_template/wizard/select_template.py 2013-06-18 13:59:38 +0000 | |||
133 | +++ account_invoice_template/wizard/select_template.py 2013-09-26 08:59:58 +0000 | |||
134 | @@ -19,91 +19,97 @@ | |||
135 | 19 | # | 19 | # |
136 | 20 | ############################################################################## | 20 | ############################################################################## |
137 | 21 | 21 | ||
140 | 22 | from openerp.osv import fields,orm | 22 | from openerp.osv import fields, orm |
139 | 23 | import time | ||
141 | 24 | from openerp.tools.translate import _ | 23 | from openerp.tools.translate import _ |
142 | 25 | 24 | ||
143 | 25 | |||
144 | 26 | class wizard_select_template(orm.TransientModel): | 26 | class wizard_select_template(orm.TransientModel): |
145 | 27 | 27 | ||
146 | 28 | _name = "wizard.select.invoice.template" | 28 | _name = "wizard.select.invoice.template" |
147 | 29 | _columns = { | 29 | _columns = { |
150 | 30 | 'template_id': fields.many2one('account.invoice.template', 'Invoice Template', required=True), | 30 | 'template_id': fields.many2one('account.invoice.template', |
151 | 31 | 'line_ids': fields.one2many('wizard.select.invoice.template.line', 'template_id', 'Lines'), | 31 | 'Invoice Template', required=True), |
152 | 32 | 'line_ids': fields.one2many('wizard.select.invoice.template.line', | ||
153 | 33 | 'template_id', 'Lines'), | ||
154 | 32 | 'state': fields.selection([ | 34 | 'state': fields.selection([ |
156 | 33 | ('template_selected','Template selected'), | 35 | ('template_selected', 'Template selected'), |
157 | 34 | ], 'State'), | 36 | ], 'State'), |
158 | 35 | } | 37 | } |
159 | 36 | 38 | ||
160 | 37 | def load_lines(self, cr, uid, ids, context=None): | 39 | def load_lines(self, cr, uid, ids, context=None): |
162 | 38 | wizard = self.browse(cr, uid, ids, context=context)[0] | 40 | wizard = self.browse(cr, uid, ids, context=context)[0] |
163 | 39 | template_pool = self.pool.get('account.invoice.template') | 41 | template_pool = self.pool.get('account.invoice.template') |
164 | 40 | wizard_line_pool = self.pool.get('wizard.select.invoice.template.line') | 42 | wizard_line_pool = self.pool.get('wizard.select.invoice.template.line') |
165 | 41 | model_data_obj = self.pool.get('ir.model.data') | 43 | model_data_obj = self.pool.get('ir.model.data') |
166 | 42 | 44 | ||
168 | 43 | template = template_pool.browse(cr, uid, wizard.template_id.id) | 45 | template = template_pool.browse(cr, uid, wizard.template_id.id, |
169 | 46 | context=context) | ||
170 | 44 | for line in template.template_line_ids: | 47 | for line in template.template_line_ids: |
171 | 45 | if line.type == 'input': | 48 | if line.type == 'input': |
173 | 46 | wizard_line_pool.create(cr, uid,{ | 49 | wizard_line_pool.create(cr, uid, { |
174 | 47 | 'template_id': wizard.id, | 50 | 'template_id': wizard.id, |
175 | 48 | 'sequence': line.sequence, | 51 | 'sequence': line.sequence, |
176 | 49 | 'name': line.name, | 52 | 'name': line.name, |
177 | 50 | 'amount': line.product_id and line.product_id.list_price or 0.0, | 53 | 'amount': line.product_id and line.product_id.list_price or 0.0, |
178 | 51 | 'account_id': line.account_id.id, | 54 | 'account_id': line.account_id.id, |
179 | 52 | 'product_id': line.product_id.id, | 55 | 'product_id': line.product_id.id, |
181 | 53 | }) | 56 | }, context=context) |
182 | 54 | if not wizard.line_ids: | 57 | if not wizard.line_ids: |
185 | 55 | return self.load_template(cr, uid, ids) | 58 | return self.load_template(cr, uid, ids, context=context) |
186 | 56 | wizard.write({'state': 'template_selected'}) | 59 | wizard.write({'state': 'template_selected'}, context=context) |
187 | 57 | 60 | ||
189 | 58 | view_rec = model_data_obj.get_object_reference(cr, uid, 'account_invoice_template', 'wizard_select_template') | 61 | view_rec = model_data_obj.get_object_reference(cr, uid, |
190 | 62 | 'account_invoice_template', 'wizard_select_template') | ||
191 | 59 | view_id = view_rec and view_rec[1] or False | 63 | view_id = view_rec and view_rec[1] or False |
192 | 60 | 64 | ||
193 | 61 | return { | 65 | return { |
202 | 62 | 'view_type': 'form', | 66 | 'view_type': 'form', |
203 | 63 | 'view_id' : [view_id], | 67 | 'view_id': [view_id], |
204 | 64 | 'view_mode': 'form', | 68 | 'view_mode': 'form', |
205 | 65 | 'res_model': 'wizard.select.invoice.template', | 69 | 'res_model': 'wizard.select.invoice.template', |
206 | 66 | 'res_id': wizard.id, | 70 | 'res_id': wizard.id, |
207 | 67 | 'type': 'ir.actions.act_window', | 71 | 'type': 'ir.actions.act_window', |
208 | 68 | 'target': 'new', | 72 | 'target': 'new', |
209 | 69 | 'context': context, | 73 | 'context': context, |
210 | 70 | } | 74 | } |
211 | 71 | 75 | ||
212 | 72 | def load_template(self, cr, uid, ids, context=None): | 76 | def load_template(self, cr, uid, ids, context=None): |
213 | 77 | if context is None: | ||
214 | 78 | context = {} | ||
215 | 73 | template_obj = self.pool.get('account.invoice.template') | 79 | template_obj = self.pool.get('account.invoice.template') |
216 | 74 | template_line_obj = self.pool.get('account.invoice.template.line') | ||
217 | 75 | account_period_obj = self.pool.get('account.period') | ||
218 | 76 | account_invoice_obj = self.pool.get('account.invoice') | 80 | account_invoice_obj = self.pool.get('account.invoice') |
219 | 77 | account_invoice_line_obj = self.pool.get('account.invoice.line') | 81 | account_invoice_line_obj = self.pool.get('account.invoice.line') |
220 | 78 | mod_obj = self.pool.get('ir.model.data') | 82 | mod_obj = self.pool.get('ir.model.data') |
221 | 79 | entry = {} | ||
222 | 80 | 83 | ||
224 | 81 | wizard = self.browse(cr, uid, ids, context=context)[0] | 84 | wizard = self.browse(cr, uid, ids, context=context)[0] |
225 | 82 | if not template_obj.check_zero_lines(cr, uid, wizard): | 85 | if not template_obj.check_zero_lines(cr, uid, wizard): |
227 | 83 | raise orm.except_orm(_('Error !'), _('At least one amount has to be non-zero!')) | 86 | raise orm.except_orm(_('Error !'), |
228 | 87 | _('At least one amount has to be non-zero!')) | ||
229 | 84 | input_lines = {} | 88 | input_lines = {} |
230 | 85 | for template_line in wizard.line_ids: | 89 | for template_line in wizard.line_ids: |
231 | 86 | input_lines[template_line.sequence] = template_line.amount | 90 | input_lines[template_line.sequence] = template_line.amount |
232 | 87 | 91 | ||
234 | 88 | computed_lines = template_obj.compute_lines(cr, uid, wizard.template_id.id, input_lines) | 92 | computed_lines = template_obj.compute_lines(cr, uid, |
235 | 93 | wizard.template_id.id, input_lines) | ||
236 | 89 | 94 | ||
237 | 90 | inv_values = account_invoice_obj.onchange_partner_id( | 95 | inv_values = account_invoice_obj.onchange_partner_id( |
239 | 91 | cr, uid, ids, wizard.template_id.type, wizard.template_id.partner_id.id)['value'] | 96 | cr, uid, ids, wizard.template_id.type, |
240 | 97 | wizard.template_id.partner_id.id)['value'] | ||
241 | 92 | inv_values['partner_id'] = wizard.template_id.partner_id.id | 98 | inv_values['partner_id'] = wizard.template_id.partner_id.id |
242 | 93 | inv_values['account_id'] = wizard.template_id.account_id.id | 99 | inv_values['account_id'] = wizard.template_id.account_id.id |
243 | 94 | inv_values['type'] = wizard.template_id.type | 100 | inv_values['type'] = wizard.template_id.type |
246 | 95 | 101 | context['type'] = wizard.template_id.type | |
247 | 96 | inv_id = account_invoice_obj.create(cr, uid, inv_values, context={'type':wizard.template_id.type}) | 102 | inv_id = account_invoice_obj.create(cr, uid, inv_values, context=context) |
248 | 97 | for line in wizard.template_id.template_line_ids: | 103 | for line in wizard.template_id.template_line_ids: |
249 | 98 | analytic_account_id = False | 104 | analytic_account_id = False |
250 | 99 | if line.analytic_account_id: | 105 | if line.analytic_account_id: |
251 | 100 | analytic_account_id = line.analytic_account_id.id | 106 | analytic_account_id = line.analytic_account_id.id |
252 | 101 | invoice_line_tax_id = [] | 107 | invoice_line_tax_id = [] |
253 | 102 | if line.invoice_line_tax_id: | 108 | if line.invoice_line_tax_id: |
255 | 103 | tax_ids=[] | 109 | tax_ids = [] |
256 | 104 | for tax in line.invoice_line_tax_id: | 110 | for tax in line.invoice_line_tax_id: |
257 | 105 | tax_ids.append(tax.id) | 111 | tax_ids.append(tax.id) |
259 | 106 | invoice_line_tax_id.append((6,0, tax_ids)) | 112 | invoice_line_tax_id.append((6, 0, tax_ids)) |
260 | 107 | val = { | 113 | val = { |
261 | 108 | 'name': line.name, | 114 | 'name': line.name, |
262 | 109 | 'invoice_id': inv_id, | 115 | 'invoice_id': inv_id, |
263 | @@ -113,7 +119,7 @@ | |||
264 | 113 | 'price_unit': computed_lines[line.sequence], | 119 | 'price_unit': computed_lines[line.sequence], |
265 | 114 | 'product_id': line.product_id.id, | 120 | 'product_id': line.product_id.id, |
266 | 115 | } | 121 | } |
268 | 116 | id_line = account_invoice_line_obj.create(cr, uid, val) | 122 | account_invoice_line_obj.create(cr, uid, val, context=context) |
269 | 117 | 123 | ||
270 | 118 | if wizard.template_id.type in ('out_invoice', 'out_refund'): | 124 | if wizard.template_id.type in ('out_invoice', 'out_refund'): |
271 | 119 | xml_id = 'invoice_form' | 125 | xml_id = 'invoice_form' |
272 | @@ -122,12 +128,12 @@ | |||
273 | 122 | resource_id = mod_obj.get_object_reference(cr, uid, 'account', xml_id)[1] | 128 | resource_id = mod_obj.get_object_reference(cr, uid, 'account', xml_id)[1] |
274 | 123 | 129 | ||
275 | 124 | return { | 130 | return { |
277 | 125 | 'domain': "[('id','in', ["+str(inv_id)+"])]", | 131 | 'domain': "[('id','in', [" + str(inv_id) + "])]", |
278 | 126 | 'name': 'Invoice', | 132 | 'name': 'Invoice', |
279 | 127 | 'view_type': 'form', | 133 | 'view_type': 'form', |
280 | 128 | 'view_mode': 'form', | 134 | 'view_mode': 'form', |
281 | 129 | 'res_model': 'account.invoice', | 135 | 'res_model': 'account.invoice', |
283 | 130 | 'views': [(resource_id,'form')], | 136 | 'views': [(resource_id, 'form')], |
284 | 131 | 'type': 'ir.actions.act_window', | 137 | 'type': 'ir.actions.act_window', |
285 | 132 | 'target': 'current', | 138 | 'target': 'current', |
286 | 133 | 'res_id': inv_id or False, | 139 | 'res_id': inv_id or False, |
287 | @@ -141,8 +147,8 @@ | |||
288 | 141 | 'template_id': fields.many2one('wizard.select.invoice.template', 'Template'), | 147 | 'template_id': fields.many2one('wizard.select.invoice.template', 'Template'), |
289 | 142 | 'sequence': fields.integer('Number', required=True), | 148 | 'sequence': fields.integer('Number', required=True), |
290 | 143 | 'name': fields.char('Name', size=64, required=True, readonly=True), | 149 | 'name': fields.char('Name', size=64, required=True, readonly=True), |
292 | 144 | 'account_id': fields.many2one('account.account', 'Account', required=True, readonly=True), | 150 | 'account_id': fields.many2one('account.account', 'Account', |
293 | 151 | required=True, readonly=True), | ||
294 | 145 | 'amount': fields.float('Amount', required=True), | 152 | 'amount': fields.float('Amount', required=True), |
295 | 146 | 'product_id': fields.many2one('product.product', 'Product'), | 153 | 'product_id': fields.many2one('product.product', 'Product'), |
296 | 147 | } | 154 | } |
297 | 148 |
Hello,
Thanks for the patch.
The diff looks good to me.
That said the module needs a general cleanup and review.
There is some oddities here and there and
a simple pass of the wizard file on flake 8 gave the following output:
select_ template. py:3:2: warning: W291 trailing whitespace (python-flake8) template. py:22:31: error: E231 missing whitespace after ',' (python-flake8) template. py:23:1: warning: F401 'time' imported but unused (python-flake8) template. py:26:1: error: E302 expected 2 blank lines, found 1 (python-flake8) template. py:30:101: error: E501 line too long (102 > 100 characters) (python-flake8) template. py:33:33: error: E231 missing whitespace after ',' (python-flake8) template. py:38:17: error: E222 multiple spaces after operator (python-flake8) template. py:46:48: error: E231 missing whitespace after ',' (python-flake8) template. py:58:101: error: E501 line too long (117 > 100 characters) (python-flake8) template. py:62:12: error: E121 continuation line indentation is not a multiple of four (python-flake8) template. py:63:21: error: E203 whitespace before ':' (python-flake8) template. py:76:1: warning: F841 local variable 'template_line_obj' is assigned to but never used (python-flake8) template. py:77:1: warning: F841 local variable 'account_ period_ obj' is assigned to but never used (python-flake8) template. py:81:1: warning: F841 local variable 'entry' is assigned to but never used (python-flake8) template. py:83:17: error: E222 multiple spaces after operator (python-flake8) template. py:105: 24:error: E225 missing whitespace around operator (python-flake8) template. py:108: 46:error: E231 missing whitespace after ',' (python-flake8) template. py:118: 1:warning: F841 local variable 'id_line' is assigned to but never used (python-flake8) template. py:132: 35:error: E231 missing whitespace after ',' (python-flake8) template. py:150: 1:warning: W391 blank line at end of file (python-flake8)
select_
select_
select_
select_
select_
select_
select_
select_
select_
select_
select_
select_
select_
select_
select_
select_
select_
select_
select_
Keep up the good work.
Regards
Nicolas