Merge lp:~vauxoo/openerp-mexico-localization/7.0-oml_bug_tracking_id_dev_luis into lp:openerp-mexico-localization/7.0

Proposed by Luis Torres - http://www.vauxoo.com
Status: Needs review
Proposed branch: lp:~vauxoo/openerp-mexico-localization/7.0-oml_bug_tracking_id_dev_luis
Merge into: lp:openerp-mexico-localization/7.0
Diff against target: 35 lines (+9/-9)
1 file modified
l10n_mx_facturae/invoice.py (+9/-9)
To merge this branch: bzr merge lp:~vauxoo/openerp-mexico-localization/7.0-oml_bug_tracking_id_dev_luis
Reviewer Review Type Date Requested Status
Isaac López Zúñiga Pending
Moisés López - http://www.vauxoo.com Pending
Review via email: mp+185176@code.launchpad.net

Description of the change

Se modifico la sintaxis para asignar valor a la variable antes de mandarla llamar

To post a comment you must log in.

Unmerged revisions

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

[FIX][l10n_mx_facturae]Repair bug, that variable line is have reference before assgnment

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_mx_facturae/invoice.py'
2--- l10n_mx_facturae/invoice.py 2013-08-25 07:16:42 +0000
3+++ l10n_mx_facturae/invoice.py 2013-09-11 22:40:57 +0000
4@@ -528,14 +528,11 @@
5
6 invoice = self.browse(cr, uid, [facturae_data[
7 'invoice_id']], context=context)[0]
8- pedimento_numeros = ''
9- pedimento_fechas = ''
10- pedimento_aduanas = ''
11- if 'tracking_id' in line._columns:
12- pedimento_numeros = []
13- pedimento_fechas = []
14- pedimento_aduanas = []
15- for line in invoice.invoice_line:
16+ pedimento_numeros = []
17+ pedimento_fechas = []
18+ pedimento_aduanas = []
19+ for line in invoice.invoice_line:
20+ if 'tracking_id' in line._columns:
21 import_id = line.tracking_id and line.tracking_id.import_id or False
22 if import_id:
23 pedimento_numeros.append(
24@@ -550,7 +547,10 @@
25 lambda x: str(x) or '', pedimento_fechas))
26 pedimento_aduanas = ','.join(map(
27 lambda x: str(x) or '', pedimento_aduanas))
28-
29+ if not invoice.invoice_line:
30+ pedimento_numeros = ''
31+ pedimento_fechas = ''
32+ pedimento_aduanas = ''
33 facturae_data_txt_list = [
34 invoice_comprobante_data['Receptor']['rfc'] or '',
35 invoice_comprobante_data.get('serie', False) or '',