Merged lp:~openerp-dev/openobject-addons/trunk-remove-warnings-server-installation-accounting-journal_items_menu-psa
bzr revid: jam@tinyerp.com-20120910051903-w5neelpw5o5zkdub
This commit is contained in:
parent
6c7cdd7712
commit
6971bbd2d4
|
@ -160,6 +160,7 @@ class account_move_line(osv.osv):
|
|||
return res
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
context['journal_id'] = context.get('search_default_journal_id')
|
||||
data = self._default_get(cr, uid, fields, context=context)
|
||||
for f in data.keys():
|
||||
if f not in fields:
|
||||
|
@ -926,6 +927,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('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