Merge lp:~factorlibre/openerp-spain/6.0-fix-filtro-por-periodo into lp:~openerp-spain-team/openerp-spain/6.0

Proposed by Alberto Garcia (Factor Libre)
Status: Merged
Merged at revision: 360
Proposed branch: lp:~factorlibre/openerp-spain/6.0-fix-filtro-por-periodo
Merge into: lp:~openerp-spain-team/openerp-spain/6.0
Diff against target: 30 lines (+4/-3)
2 files modified
account_financial_report_web/wizard/wizard_account_balance_report.py (+2/-1)
report_cumulative_general_ledger_xls/wizard/cumulative_general_ledger.py (+2/-2)
To merge this branch: bzr merge lp:~factorlibre/openerp-spain/6.0-fix-filtro-por-periodo
Reviewer Review Type Date Requested Status
OpenERP Spain Team Pending
Review via email: mp+212412@code.launchpad.net

Description of the change

[FIX] Corregido error filtro por periodo

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_financial_report_web/wizard/wizard_account_balance_report.py'
2--- account_financial_report_web/wizard/wizard_account_balance_report.py 2014-02-28 13:09:11 +0000
3+++ account_financial_report_web/wizard/wizard_account_balance_report.py 2014-03-24 13:12:37 +0000
4@@ -215,9 +215,10 @@
5 context = {}
6
7 data = {}
8+ data['form'] = self.read(cr, uid, ids, [])[0]
9 data['ids'] = context.get('active_ids', [])
10 data['model'] = context.get('active_model', 'ir.ui.menu')
11- data['form'] = self.read(cr, uid, ids[0])
12+
13 if data['form']['state'] == 'bydate':
14 sql = """SELECT f.id, f.date_start, f.date_stop
15 FROM account_fiscalyear f
16
17=== modified file 'report_cumulative_general_ledger_xls/wizard/cumulative_general_ledger.py'
18--- report_cumulative_general_ledger_xls/wizard/cumulative_general_ledger.py 2014-02-28 13:09:11 +0000
19+++ report_cumulative_general_ledger_xls/wizard/cumulative_general_ledger.py 2014-03-24 13:12:37 +0000
20@@ -62,8 +62,8 @@
21 result=''
22 if form.has_key('periods') and form['periods']:
23 period_ids = ",".join([str(x) for x in form['periods'] if x])
24- self.cr.execute("SELECT name FROM account_period WHERE id in (%s)" % (period_ids))
25- res = self.cr.fetchall()
26+ cr.execute("SELECT name FROM account_period WHERE id in (%s)" % (period_ids))
27+ res = cr.fetchall()
28 len_res = len(res)
29 for r in res:
30 if (r == res[len_res-1]):