~openerp-chinese-team/openerp-china/openerp-china

« back to all changes in this revision

Viewing changes to oecn_account_print/report/oecn_account_print_report.py

  • Committer: JoshuaJan
  • Date: 2012-08-24 05:27:14 UTC
  • Revision ID: popkar77@gmail.com-20120824052714-az7x5huju9e4onb4
调整格式

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
        self.all_date = self.get_date(data)
101
101
        data['all_date'] = self.all_date
102
102
        self.sql_condition = self.get_threecolumns_ledger_type(data)
103
 
        #new_ids = []
104
 
        #if (data.get('model', False) == 'account.account'):
105
 
        #    new_ids = ids
106
 
        #else:
107
 
        #   new_ids.append(data['Account_list'])
108
 
        #    objects = self.pool.get('account.account').browse(self.cr, self.uid, new_ids)
109
 
 
110
103
        super(detail_ledger_parser, self).set_context(objects, data, ids, report_type)
 
104
        
111
105
 
 
106
    
112
107
    def get_date(self, data):
113
108
        """
114
109
        分析日期
209
204
            all_days = []
210
205
            period_balance = 0
211
206
            journal_ids = journal_obj.search(self.cr, self.uid, [('type','!=','situation')])
212
 
            account_move_line_ids = account_move_line_obj.search(self.cr, self.uid, [('account_id','in',account_child_ids),('date','<=',period.date_stop),('date','>=',period.date_start),('state','=','valid'),('journal_id','in',journal_ids)],order='date')
 
207
            account_move_line_ids = account_move_line_obj.search(self.cr, self.uid, [('account_id','in',account_child_ids),('date','<=',period.date_stop),('date','>=',period.date_start),('state','=','valid'),('journal_id','in',journal_ids)],order='date,move_id')
213
208
            if self.partner:
214
209
                account_move_line_ids = account_move_line_obj.search(self.cr, self.uid, [('id','in',account_move_line_ids),('partner_id','=',self.partner[0])])
215
210
            if self.product:
251
246
            str = u'贷'
252
247
        return str
253
248
 
254
 
    def _get_account_name(self,account):
255
 
        """
256
 
        获取完整的科目名称
257
 
        """
258
 
        id = str(account.id)
259
 
        account_name = self.pool.get('account.account').name_get(self.cr, self.uid, id,{})
260
 
        return account_name[0][1]
 
249
 
261
250
 
262
251
 
263
252