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
=== modified file 'account_financial_report_web/wizard/wizard_account_balance_report.py'
--- account_financial_report_web/wizard/wizard_account_balance_report.py 2014-02-28 13:09:11 +0000
+++ account_financial_report_web/wizard/wizard_account_balance_report.py 2014-03-24 13:12:37 +0000
@@ -215,9 +215,10 @@
215 context = {}215 context = {}
216 216
217 data = {}217 data = {}
218 data['form'] = self.read(cr, uid, ids, [])[0]
218 data['ids'] = context.get('active_ids', [])219 data['ids'] = context.get('active_ids', [])
219 data['model'] = context.get('active_model', 'ir.ui.menu')220 data['model'] = context.get('active_model', 'ir.ui.menu')
220 data['form'] = self.read(cr, uid, ids[0])221
221 if data['form']['state'] == 'bydate':222 if data['form']['state'] == 'bydate':
222 sql = """SELECT f.id, f.date_start, f.date_stop223 sql = """SELECT f.id, f.date_start, f.date_stop
223 FROM account_fiscalyear f224 FROM account_fiscalyear f
224225
=== modified file 'report_cumulative_general_ledger_xls/wizard/cumulative_general_ledger.py'
--- report_cumulative_general_ledger_xls/wizard/cumulative_general_ledger.py 2014-02-28 13:09:11 +0000
+++ report_cumulative_general_ledger_xls/wizard/cumulative_general_ledger.py 2014-03-24 13:12:37 +0000
@@ -62,8 +62,8 @@
62 result=''62 result=''
63 if form.has_key('periods') and form['periods']:63 if form.has_key('periods') and form['periods']:
64 period_ids = ",".join([str(x) for x in form['periods'] if x])64 period_ids = ",".join([str(x) for x in form['periods'] if x])
65 self.cr.execute("SELECT name FROM account_period WHERE id in (%s)" % (period_ids))65 cr.execute("SELECT name FROM account_period WHERE id in (%s)" % (period_ids))
66 res = self.cr.fetchall()66 res = cr.fetchall()
67 len_res = len(res) 67 len_res = len(res)
68 for r in res:68 for r in res:
69 if (r == res[len_res-1]):69 if (r == res[len_res-1]):