~openerp-dev/openobject-addons/acct_prj_hr_logs

« back to all changes in this revision

Viewing changes to account/wizard/account_partner_balance_report.py

  • Committer: pap(openerp)
  • Date: 2010-06-21 05:19:03 UTC
  • mfrom: (3638.1.26 trunk-dev-addons3)
  • Revision ID: pap@tinyerp.co.in-20100621051903-lm0gpjuehqakpntg
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
            'model': 'res.partner',
73
73
            'form': self.read(cr, uid, ids, [])[0],
74
74
            }
75
 
 
76
75
        if data['form']['state'] == 'bydate'  :
77
76
           return self._check_date(cr, uid, data, context)
78
77
        if data['form']['state'] == 'byperiod':
89
88
    def _check_date(self, cr, uid, data, context):
90
89
        sql = """
91
90
            SELECT f.id, f.date_start, f.date_stop FROM account_fiscalyear f  Where %s between f.date_start and f.date_stop """
92
 
        cr.execute(sql,(data['form']['date1'],))
 
91
        cr.execute(sql, (data['form']['date1'],))
93
92
        res = cr.dictfetchall()
94
93
        if res:
95
94
            if (data['form']['date2'] > res[0]['date_stop'] or data['form']['date2'] < res[0]['date_start']):