[IMP] get company on common report class
bzr revid: mra@mra-laptop-20100719102104-iggepvbgg37u78mt
This commit is contained in:
parent
402c96cfb2
commit
bf465e7e07
|
@ -124,13 +124,13 @@ class common_report_header(object):
|
|||
return ''
|
||||
|
||||
def _get_company(self, data):
|
||||
if data.get('form', False) and data['form'].get('company_id', False):
|
||||
comp_obj = pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, data['form']['company_id'])
|
||||
return comp_obj.name
|
||||
|
||||
if data.get('form', False) and data['form'].get('chart_account_id', False):
|
||||
return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.name
|
||||
return ''
|
||||
|
||||
def _get_journal(self, journal_ids):
|
||||
self.cr.execute('select code from account_journal where id IN %s',(tuple(journal_ids),))
|
||||
codes = [x for x, in self.cr.fetchall()]
|
||||
return codes or ''
|
||||
return codes or ''
|
||||
|
||||
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
Loading…
Reference in New Issue