[IMP]:account:pass correct context in journal_id

bzr revid: apa@tinyerp.com-20120919114323-dkmciz9p698mgbo2
This commit is contained in:
Amit Patel 2012-09-19 17:13:23 +05:30
parent 31bd6deaa1
commit 87fbe7b883
1 changed files with 3 additions and 0 deletions

View File

@ -226,6 +226,9 @@ class account_move_line(osv.osv):
partner_obj = self.pool.get('res.partner')
currency_obj = self.pool.get('res.currency')
context = self.convert_to_period(cr, uid, context)
#pass the right context when search_defaul_journal_id
if context.get('search_default_journal_id',False):
context.update({'journal_id':context.get('search_default_journal_id',False)})
# Compute simple values
data = super(account_move_line, self).default_get(cr, uid, fields, context=context)
# Starts: Manual entry from account.move form