[Merge] lp:~openerp-dev/openobject-addons/trunk-addons9-accounting-apa-customers-suppliers-journal-items-kbh
bzr revid: jam@tinyerp.com-20120914093805-jh2sjnb923h1mx9j
This commit is contained in:
commit
9e25673a45
|
@ -836,6 +836,10 @@ class account_journal(osv.osv):
|
|||
|
||||
@return: Returns a list of tupples containing id, name
|
||||
"""
|
||||
if not ids:
|
||||
return []
|
||||
if isinstance(ids, (int, long)):
|
||||
ids = [ids]
|
||||
result = self.browse(cr, user, ids, context=context)
|
||||
res = []
|
||||
for rs in result:
|
||||
|
|
|
@ -926,6 +926,8 @@ class account_move_line(osv.osv):
|
|||
return res
|
||||
if (not context.get('journal_id', False)) or (not context.get('period_id', False)):
|
||||
return False
|
||||
if context.get('search_default_journal_id', False):
|
||||
context['journal_id'] = context.get('search_default_journal_id')
|
||||
cr.execute('SELECT code FROM account_journal WHERE id = %s', (context['journal_id'], ))
|
||||
j = cr.fetchone()[0] or ''
|
||||
cr.execute('SELECT code FROM account_period WHERE id = %s', (context['period_id'], ))
|
||||
|
|
Loading…
Reference in New Issue